[Command Line Interface: WP-CLI]: unable to run wp-cli/dev-build
-
When connected to bluehost server on SSH, I git cloned wp-cli successfully but cannot run the command to install the script on ~/wp-cli.
Here is the command that I run:wp-cli/utils/dev-build
And here is the response I get:
ln: creating symbolic link
/usr/bin/wp’: Read-only file system`I’m a terminal newb so am probably overlooking something obvious. Any and all help is appreciated, thanks.
-
Has anybody else ran into or been able to resolve this problem? I called bluehost but they are unwilling to give me sudo access…
[email protected] [~/wp-cli]# utils/dev-build Content-type: text/html #!/usr/bin/env php All settings correct for using Composer Downloading... Composer successfully installed to: /home2/username/wp-cli/composer.phar Use it: php composer.phar sudo: unable to stat /etc/sudoers: No such file or directory sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin utils/dev-build: line 16: composer: command not found sudo: unable to stat /etc/sudoers: No such file or directory sudo: no valid sudoers sources found, quitting sudo: unable to initialize policy plugin
Have you tried the new installer?
curl https://wp-cli.org/installer.sh | bash
This will allow you to run ~/.composer/bin/wp.
More info https://wp-cli.org/
I just tried and this is my output. Thanks for the help. Although it says it was installed, it was not. I am on bluehost and have changed some output information that I’m unsure if I should make public.
[email protected] [~]# curl https://wp-cli.org/installer.sh | bash % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1971 100 1971 0 0 6331 0 --:--:-- --:--:-- --:--:-- 9082 Installing the main WP-CLI package... ------------------------------------- Content-type: text/html Warning: Composer should be invoked via the CLI version of PHP, not the cgi-fcgi SAPI Fatal error: Uncaught exception 'ErrorException' with message 'Undefined index: argv' in phar:///bluehost-home-directory/my-bluehost-username/.composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php:57 Stack trace: #0 phar:///bluehost-home-directory/my-bluehost-username/.composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php(57): Composer\Util\ErrorHandler::handle(8, 'Undefined index...', 'phar:///bluehost-home-directory/l...', 57, Array) #1 phar:///bluehost-home-directory/my-bluehost-username/.composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php(111): Symfony\Component\Console\Input\ArgvInput->__construct() #2 phar:///bluehost-home-directory/my-bluehost-username/.composer/composer.phar/src/Composer/Console/Application.php(83): Symfony\Component\Console\Application->run(NULL, Object(Symfony\Component\Console\Output\ConsoleOutput)) #3 phar:///bluehost-home-directory/my-bluehost-username/.composer/composer.phar/bin/composer(43): Composer\Console\Application->run() #4 /bluehost-home-directory/my-bluehost-username/.composer/composer.phar(15): require('phar:///bluehost-home-directory/l...') #5 {main} thrown in phar:///bluehost-home-directory/my-bluehost-username/.composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php on line 57 Trying to install the optional Boris package... Content-type: text/html Warning: Composer should be invoked via the CLI version of PHP, not the cgi-fcgi SAPI Fatal error: Uncaught exception 'ErrorException' with message 'Undefined index: argv' in phar:///bluehost-home-directory/my-bluehost-username/.composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php:57 Stack trace: #0 phar:///bluehost-home-directory/my-bluehost-username/.composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php(57): Composer\Util\ErrorHandler::handle(8, 'Undefined index...', 'phar:///bluehost-home-directory/l...', 57, Array) #1 phar:///bluehost-home-directory/my-bluehost-username/.composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php(111): Symfony\Component\Console\Input\ArgvInput->__construct() #2 phar:///bluehost-home-directory/my-bluehost-username/.composer/composer.phar/src/Composer/Console/Application.php(83): Symfony\Component\Console\Application->run(NULL, Object(Symfony\Component\Console\Output\ConsoleOutput)) #3 phar:///bluehost-home-directory/my-bluehost-username/.composer/composer.phar/bin/composer(43): Composer\Console\Application->run() #4 /bluehost-home-directory/my-bluehost-username/.composer/composer.phar(15): require('phar:///bluehost-home-directory/l...') #5 {main} thrown in phar:///bluehost-home-directory/my-bluehost-username/.composer/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php on line 57 failed. WP-CLI files have been succesfully installed. To test, run: /bluehost-home-directory/my-bluehost-username/.composer/bin/wp --info [email protected] [~]# /bluehost-home-directory/my-bluehost-username/.composer/bin/wp --info -bash: /bluehost-home-directory/my-bluehost-username/.composer/bin/wp: No such file or directory [email protected] [~]#
I get a very similar warning tring to install wp-cli on JustHost
Warning: Composer should be invoked via the CLI version of PHP, not the cgi-fcgi SAPI <br /> <b>Fatal error</b>: Uncaught exception 'ErrorException' with message 'Undefined index: argv' in phar:///HOMEDIRECTORY/USERNAME/.wp-cli/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php:57 Stack trace: #0 phar:///HOMEDIRECTORY/USERNAME/.wp-cli/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php(57): Composer\Util\ErrorHandler::handle(8, 'Undefined index...', 'phar:///HOMEDIRECTORY/f...', 57, Array) #1 phar:///HOMEDIRECTORY/USERNAME/.wp-cli/composer.phar/vendor/symfony/console/Symfony/Component/Console/Application.php(111): Symfony\Component\Console\Input\ArgvInput->__construct() #2 phar:///HOMEDIRECTORY/USERNAME/.wp-cli/composer.phar/src/Composer/Console/Application.php(83): Symfony\Component\Console\Application->run(NULL, Object(Symfony\Component\Console\Output\ConsoleOutput)) #3 phar:///HOMEDIRECTORY/USERNAME/.wp-cli/composer.phar/bin/composer(43): Composer\Console\Application->run() #4 /HOMEDIRECTORY/USERNAME/.wp-cli/composer.phar(14): require('phar:///HOMEDIRECTORY/f...') #5 {main} thrown in <b>phar:///HOMEDIRECTORY/USERNAME/.wp-cli/composer.phar/vendor/symfony/console/Symfony/Component/Console/Input/ArgvInput.php</b> on line <b>57</b><br /> WP-CLI was not successfully installed.
Looks like this issue is related to PHP using cgi-fcgi instead of CLI SAPI. I don’t really fully understand what that means, but it looks like Composer relies on variables that CLI SAPI allows you to pass applications but CGI and FCGI do not. Is there someone that knows a bit more about PHP configuration out there?
- The topic ‘[Command Line Interface: WP-CLI]: unable to run wp-cli/dev-build’ is closed to new replies.