简体   繁体   中英

Can't uninstall and reinstall Truffle?

Pls help me with command unstall/ install Truffle.

ubuntu@ubuntu-vbox:~$ sudo npm uninstall -g truffle 
[sudo] password for ubuntu: 
removed 82 packages in 1.793s

ubuntu@ubuntu-vbox:~$ truffle v
Truffle v4.0.4 (core: 4.0.4)
Solidity v0.4.18 (solc-js)

ubuntu@ubuntu-vbox:~$ sudo npm install -g truffle@4.1.15
npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
/home/ubuntu/.npm-global/bin/truffle -> /home/ubuntu/.npm-global/lib/node_modules/truffle/build/cli.bundled.js
+ truffle@4.1.15
added 82 packages in 9.783s

ubuntu@ubuntu-vbox:~$ truffle v
Truffle v4.0.4 (core: 4.0.4)
Solidity v0.4.18 (solc-js)

It's still version Truffle v4.0.4 after reinstall version 4.1.15

https://ethereum.stackexchange.com/a/62956

I have used this in the past.

You will need to:

which truffle

will return:

/usr/local/bin/truffle

rm -f /usr/local/bin/truffle

Then proceed with the re-installation procedure. I hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM