Ubuntu 20.04 - Composer és Drush telepítése

Fórumok

Sziasztok.

Szeretném feltelepíteni a Drush-t ehhez a https://tubemint.com/installing-drush-with-composer/ link alapján estem meik a telepítésnek, de elkadatam vele. A következő a hiba:

 

#composer global require drush/drush
Changed current directory to /root/.config/composer
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]?
Using version ^10.5 for drush/drush
./composer.json has been updated
Running composer update drush/drush
Loading composer repositories with package information
Updating dependencies
Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead.
Generating autoload files
18 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
#composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]?
Composer could not find a composer.json file in /tmp
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section

 

#composer --version
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]?
Composer version 2.0.14 2021-05-21 17:03:37

 

#composer diagnose
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]?
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: 57815BA2 7E54DC31 7ECC7CC5 573090D0  87719BA6 8F3BB723 4E5D42D0 84A14642
Dev Public Key Fingerprint: 4AC45767 E5EC2265 2F0C1167 CBBB8A2B  0C708369 153E328C AD90147D AFE50952
OK
Checking composer version: OK
Composer version: 2.0.14
PHP version: 7.4.3
PHP binary path: /usr/bin/php7.4
OpenSSL version: OpenSSL 1.1.1f  31 Mar 2020
cURL version: 7.68.0 libz 1.2.11 ssl OpenSSL/1.1.1f
zip: extension present, unzip present

Ha jól értem a "Package container-interop/container-interop is abandoned, you should avoid using it. Use psr/container instead." modullal van a hiba, illetve a "composer.json" file hiányzik.

 

Kérdésem, hogy ezt hogy lehetne kijavítani mik lennének a hiányzó láncszemek?

 

Köszi!

 

Kalmi

Hozzászólások

Nekem mukodott, es amugy nem latom, hogy hibat dobott volna neked, a vastaggal jelolt az nem hiba, csak egy deprecation warning.

En igy csinaltam:

wget -O /usr/local/bin/composer https://getcomposer.org/composer-stable.phar
chmod +x /usr/local/bin/composer
hash -r
composer require drush/drush 

Es a /root/.composer/vendor/bin/drush utvonalon ott volt a Drush. A /root/.composer/vendor/bin/ mappat kell PATH-ra tenned.

Blog | @hron84

valahol egy üzemeltetőmaci most mérgesen toppant a lábával 

via @snq-

Köszönöm a válaszodat. Igazából nem értem teljesen, hogy mi a hiba a lényeg, hogy a #drush --version a következőt adja vissza:

Command 'drush' not found, did you mean:

  command 'rush' from deb rush (1.8+dfsg-1.1)

Try: apt install <deb name>

Egy kis segítséget kérhetek, hogy hogy lesz elérhető a #drush --version parancs? Nem igazán látom át a problémát. Nagyon régen használtam és telepítettem a drush-t, de akkor a megadott lépésekkel sikerült.

Köszönöm!

Kalmi