Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresh install instructions not working #1330

Closed
johnbillion opened this issue Aug 13, 2014 · 5 comments
Closed

Fresh install instructions not working #1330

johnbillion opened this issue Aug 13, 2014 · 5 comments

Comments

@johnbillion
Copy link
Contributor

This is most likely user error, but I can't see what I'm doing wrong, so any help would be appreciated.

I'm attempting a fresh install of WP-CLI using the install instructions on wp-cli.org. After installing, running the wp command gives the error -bash: /usr/bin/wp: No such file or directory.

Any pointers?

I'm running OS X 10.9.2 and PHP5-FPM installed at /usr/local/php5/bin/php. PHP is working fine.

$ curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 1206k  100 1206k    0     0   424k      0  0:00:02  0:00:02 --:--:--  510k
$ php wp-cli.phar --info
PHP binary: 
PHP version:    5.3.25
php.ini used:   /usr/local/php5-5.3.25-20130615-024255/lib/php.ini
WP-CLI root dir:    phar://wp-cli.phar
WP-CLI global config:   
WP-CLI project config:  
WP-CLI version: 0.16.0
$ chmod +x wp-cli.phar
$ sudo mv wp-cli.phar /usr/local/bin/wp
$ wp --info
-bash: /usr/bin/wp: No such file or directory
$ echo $PATH
/usr/local/php5/bin:/Users/john/bin:/usr/local/bin:/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin
$ which wp
/usr/local/bin/wp
$ wp
-bash: /usr/bin/wp: No such file or directory
@danielbachhuber
Copy link
Member

Do you have a bash alias for wp=/usr/bin/wp?

You're moving the Phar file to /usr/local/bin/wp, but something is telling your session that wp should actually be /usr/bin/wp?

@johnbillion
Copy link
Contributor Author

Nope, no alias in place. which wp gives the correct location for wp:

$ which wp
/usr/local/bin/wp
$ wp
-bash: /usr/bin/wp: No such file or directory

@johnbillion
Copy link
Contributor Author

Calling the full path ($ /usr/local/bin/wp) works as expected and outputs WP-CLI's command list.

@johnbillion
Copy link
Contributor Author

Hurrah! User error after all. I restarted Terminal and all is well.

I previously had a shortcut for wp in /usr/bin which I deleted but I'm guessing Terminal was still using that and a restart fixed it.

Sorry for the noise.

@danielbachhuber
Copy link
Member

Glad you got it sorted :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants