The command could not be located because '/bin' is not included in the
PATH environment variable.
This error means you overwrite your default path with the added PATH vairable above.
How to restore the old PATH?
The default PATH variable is defined in /etc/environment.
To restore the default PATH first delete the add line export PATH="~/.composer/vendor/bin/lumen"
from your .bashrc
Then save and source using command:
source .bashrc
then delete from .bash_profile
then save and source:
source .bash_profile
Now source /etc/environment to restore the default path
source /etc/environment
Now your default PATH is restored, you can check by running echo $PATH
Adding new path to PATH variable
Now to add a new PATH use:
export PATH=$PATH:$HOME/.composer/vendor/bin/
EDIT: The error here raises because we add the binary itself so check the above line
Add the line to .bashrc
then save and source:
source .bashrc
Check running $PATH
you should see your new added path.