@Anatoli777

Как правильно установить composer и drush на ubuntu 16.04?

Как правильно установить composer и drush на ubuntu 16.04 - от кого правильнее устанавливать и т.д. ?
a18a652e4e774307b2b3f00558b88010.jpg
  • Вопрос задан
  • 1882 просмотра
Решения вопроса 1
@Anatoli777 Автор вопроса
Пробовал установить composer и drush, но ...
admin@x1drupal:~$ sudo curl -sS https://getcomposer.org/installer | php
All settings correct for using Composer
Downloading 1.1.2...

Composer successfully installed to: /home/admin/composer.phar
Use it: php composer.phar

admin@x1drupal:~$ sudo mv composer.phar /usr/local/bin/composer
admin@x1drupal:~$ sed -i '1i export PATH="$HOME/.composer/vendor/bin:$PATH"' $HOME/.bashrc
admin@x1drupal:~$ source $HOME/.bashrc
admin@x1drupal:~$ composer global require drush/drush:dev-master
Changed current directory to /home/admin/.config/composer
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for drush/drush dev-master -> satisfiable by drush/drush[dev-master].
    - drush/drush dev-master requires codegyre/robo ~1.0.0-beta1 -> satisfiable by codegyre/robo[1.0.0-beta1] but these conflict with your requirements or minimum-stability.

Installation failed, deleting ./composer.json.

Другой вариант:
admin@x1drupal:~$ cd ~/drush8
admin@x1drupal:~/drush8$ composer require "drush/drush:8.*"
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
    Failed to download pear/console_table from dist: The zip extension and unzip command are both missing, skipping.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
    Now trying to download from source
  - Installing pear/console_table (v1.3.0)
    Cloning 64100b9ee81852f4fa17823e55d0b385a544f976

    Failed to download symfony/polyfill-mbstring from dist: The zip extension and unzip command are both missing, skipping.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
    Now trying to download from source
  - Installing symfony/polyfill-mbstring (v1.2.0)
    Cloning dff51f72b0706335131b00a7f49606168c582594

    Failed to download symfony/console from dist: The zip extension and unzip command are both missing, skipping.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
    Now trying to download from source
  - Installing symfony/console (v2.8.6)
    Cloning 48221d3de4dc22d2cd57c97e8b9361821da86609

    Failed to download symfony/var-dumper from dist: The zip extension and unzip command are both missing, skipping.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
    Now trying to download from source
  - Installing symfony/var-dumper (v2.8.6)
    Cloning 7528e78e0d7c78650a41fc011ac9f152bdf4c2b3

    Failed to download symfony/yaml from dist: The zip extension and unzip command are both missing, skipping.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
    Now trying to download from source
  - Installing symfony/yaml (v2.8.6)
    Cloning e4fbcc65f90909c999ac3b4dfa699ee6563a9940

    Failed to download jakub-onderka/php-console-color from dist: The zip extension and unzip command are both missing, skipping.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
    Now trying to download from source
  - Installing jakub-onderka/php-console-color (0.1)
    Cloning e0b393dacf7703fc36a4efc3df1435485197e6c1

    Failed to download jakub-onderka/php-console-highlighter from dist: The zip extension and unzip command are both missing, skipping.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
    Now trying to download from source
  - Installing jakub-onderka/php-console-highlighter (v0.3.2)
    Cloning 7daa75df45242c8d5b75a22c00a201e7954e4fb5

    Failed to download dnoegel/php-xdg-base-dir from dist: The zip extension and unzip command are both missing, skipping.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
    Now trying to download from source
  - Installing dnoegel/php-xdg-base-dir (0.1)
    Cloning 265b8593498b997dc2d31e75b89f053b5cc9621a

    Failed to download nikic/php-parser from dist: The zip extension and unzip command are both missing, skipping.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
    Now trying to download from source
  - Installing nikic/php-parser (v2.1.0)
    Cloning 47b254ea51f1d6d5dc04b9b299e88346bf2369e3

    Failed to download psy/psysh from dist: The zip extension and unzip command are both missing, skipping.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
    Now trying to download from source
  - Installing psy/psysh (v0.7.2)
    Cloning e64e10b20f8d229cac76399e1f3edddb57a0f280

    Failed to download psr/log from dist: The zip extension and unzip command are both missing, skipping.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
    Now trying to download from source
  - Installing psr/log (1.0.0)
    Cloning fe0936ee26643249e916849d48e3a51d5f5e278b

    Failed to download drush/drush from dist: The zip extension and unzip command are both missing, skipping.
The php.ini used by your command-line PHP is: /etc/php/7.0/cli/php.ini
    Now trying to download from source
  - Installing drush/drush (8.1.2)
    Cloning 85b58140d576cfdb9546a23c3ff44b72d0dae5bc

pear/console_table suggests installing pear/Console_Color2 (>=0.1.2)
symfony/polyfill-mbstring suggests installing ext-mbstring (For best performance)
symfony/console suggests installing symfony/event-dispatcher ()
symfony/console suggests installing symfony/process ()
symfony/var-dumper suggests installing ext-symfony_debug ()
psy/psysh suggests installing ext-pdo-sqlite (The doc command requires SQLite to work.)
drush/drush suggests installing drush/config-extra (Provides configuration workflow commands, such as config-merge.)
Writing lock file
Generating autoload files
admin@x1drupal:~/drush8$ drush --version
The program 'drush' is currently not installed. You can install it by typing:
sudo apt install drush
admin@x1drupal:~/drush8$ sudo apt install drush
[sudo] password for admin: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  php-cli php-console-table php-mbstring php7.0-mbstring
Suggested packages:
  mysql-client drupal7
Recommended packages:
  php-console-color2
The following NEW packages will be installed:
  drush php-cli php-console-table php-mbstring php7.0-mbstring
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 760 kB of archives.
After this operation, 2,972 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 php-cli all 1:7.0+35ubuntu6 [2,920 B]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 php7.0-mbstring amd64 7.0.4-7ubuntu2.1 [464 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial/universe amd64 php-mbstring all 1:7.0+35ubuntu6 [1,940 B]
Get:4 http://archive.ubuntu.com/ubuntu xenial/universe amd64 php-console-table all 1.3.0-1ubuntu2 [14.8 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial/universe amd64 drush all 5.10.0-2ubuntu1 [276 kB]
Fetched 760 kB in 0s (3,944 kB/s)
Selecting previously unselected package php-cli.
(Reading database ... 92820 files and directories currently installed.)
Preparing to unpack .../php-cli_1%3a7.0+35ubuntu6_all.deb ...
Unpacking php-cli (1:7.0+35ubuntu6) ...
Selecting previously unselected package php7.0-mbstring.
Preparing to unpack .../php7.0-mbstring_7.0.4-7ubuntu2.1_amd64.deb ...
Unpacking php7.0-mbstring (7.0.4-7ubuntu2.1) ...
Selecting previously unselected package php-mbstring.
Preparing to unpack .../php-mbstring_1%3a7.0+35ubuntu6_all.deb ...
Unpacking php-mbstring (1:7.0+35ubuntu6) ...
Selecting previously unselected package php-console-table.
Preparing to unpack .../php-console-table_1.3.0-1ubuntu2_all.deb ...
Unpacking php-console-table (1.3.0-1ubuntu2) ...
Selecting previously unselected package drush.
Preparing to unpack .../drush_5.10.0-2ubuntu1_all.deb ...
Unpacking drush (5.10.0-2ubuntu1) ...
Processing triggers for php7.0-fpm (7.0.4-7ubuntu2.1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up php-cli (1:7.0+35ubuntu6) ...
Setting up php7.0-mbstring (7.0.4-7ubuntu2.1) ...

Creating config file /etc/php/7.0/mods-available/mbstring.ini with new version
Setting up php-mbstring (1:7.0+35ubuntu6) ...
Setting up php-console-table (1.3.0-1ubuntu2) ...
Setting up drush (5.10.0-2ubuntu1) ...
Processing triggers for php7.0-fpm (7.0.4-7ubuntu2.1) ...
admin@x1drupal:~/drush8$ drush version
drush version 5.10.0
admin@x1drupal:~/drush8$ sudo drush dl drush --destination='/usr/share'
There are no releases for project drush.
Choose one of the available releases for drush:
 [0]  :  Cancel                                               
 [1]  :  7.x-5.x-dev           -  2013-Sep-30  -  Development 
 [2]  :  All-versions-4.x-dev  -  2013-Sep-30  -  Development 
 [3]  :  7.x-1.x-dev           -  2013-Sep-30  -  Development

А я то хотел 8 версию.
Что делать? - Подскажите, плиз!
Ответ написан
Комментировать
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы