Reputation: 261
I am trying to migrate a ZF3 app to laminas. I have installed composer via apt, and added its vendor/bin to the PATH environment variable, for global usage:
$ composer -V
Composer version 2.2.4 2022-01-08 12:30:42
$ composer global config home
Changed current directory to /home/me/.config/composer
/home/me/.config/composer
$ export PATH={/home/me/.config/composer}:$PATH
Then globally installed laminas/laminas-migrate. Running it gets a "command not found" error:
$ composer global require laminas/laminas-migration
(output snip)
$ cd /var/www/my-project
/var/www/my-project $ laminas-migration migrate
laminas-migration: command not found
Output of PATH section from printenv:
PATH=/home/me/.yarn/bin:/home/me/.config/yarn/global/node_modules/.bin:/home/me/.yarn/bin:/home/me/.config/yarn/global/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
Upvotes: 3
Views: 626
Reputation: 1
I use Go version go1.22.5 linux/amd64 and the follow commands worked for me:
export PATH=~/go/bin:$PATH
I discovered reading the doc bellow: https://pkg.go.dev/cmd/go#hdr-GOPATH_and_Modules
Upvotes: 0
Reputation: 55
Do this instead.
export PATH=/home/me/.config/composer/vendor/bin:$PATH
Then close and reopen your terminal
Upvotes: 0
Reputation: 4960
Bob Allen did a great job describing once how to install composer libraries globally. I don't know if this still applies after all these years, but worth a try. For what I have seen in your description, I think you migh have lost the very important bit of extending your PATH with folder, that contains executables:
export PATH=~/.composer/vendor/bin:$PATH
This line added to yours user account .bash_profile
file will add ~/.composer/vendor/bin/
to the binarries collection that is scanned in case of executing a command.
Upvotes: 3