I was really stuck to install Truffle. Speaking more, I could completely install Truffle however it did not work at all with obtaining this error:
command not found: truffle .
I thought that the pass is missing somehow.
Measure
Step 1
To confirm the directly pass of npm.
It would be probably popped up /usr/local
with execution of npm config get prefix
.
Step 2
to change the default directly of npm to another one.
I made a directly for global install
mkdir ~/.npm-global
Setting to use a new directly with npm
npm config set prefix '~/.npm-global'
Open or create a ~/.profile
and add below,
export PATH=~/.npm-global/bin:$PATH
Issue
I could not make it with execution above and I obtained same error again.
command not found: truffle .
Solution
It worked correctly with sudo install beta version.
After just uninstall all of package which I have installed and executed below
sudo npm install -g truffle@beta
I have already amended the global install directly then, I must make it back to initial setting.
npm config set prefix '/usr/local'
It should be checked whether it corrected just in case.
npm config get prefix.