简体   繁体   中英

Nvm perl error after El Capitan upgrade

I upgraded to El Capitan on two laptops. For some reason on one I am having trouble installing any node versions with nvm (installed through homebrew). If I nvm install v0.12.7 this is what I get:

######################################################################## 100.0%
perl version 5.18.2 can't run /USR/BIN/shasum.  Try the alternative(s):

/USR/BIN/shasum5.16 (uses perl 5.16)
/USR/BIN/shasum5.18 (uses perl 5.18)

Run "man perl" for more information about multiple version support in
Mac OS X.
Checksums do not match.
Binary download failed, trying source.
Downloading https://nodejs.org/dist/v0.12.7/node-v0.12.7.tar.gz...
######################################################################## 100.0%
perl version 5.18.2 can't run /USR/BIN/shasum.  Try the alternative(s):

/USR/BIN/shasum5.16 (uses perl 5.16)
/USR/BIN/shasum5.18 (uses perl 5.18)

Run "man perl" for more information about multiple version support in
Mac OS X.
Checksums do not match.

I don't know what happened, but I've looked into the error message and various mentions of how to fix the Perl issue but have came up with nothing.

I had the same problem - for some reason, on my Mac I had at least 2 versions of Perl, if not 3 - 5.16, 5.18 and I think also 5.18.2. This broke many of the Perl libraries and command line tools, some of them used by homebrew, such as shasum.

I believe this could have happened during an XCode upgrade, because this could have changed the Perl installation.

I fixed it by re-installing a new version of Perl manually. I chose the latest one and followed these instructions:

I had the same problem, no idea how it happened. I suspect it somehow happened during an XCode Update. I fixed this by re-installing Perl on my Mac manually. I used the latest version as described here:

  curl -O http://www.cpan.org/src/perl-5.26.1.tar.gz
  tar -xzf perl-5.26.1.tar.gz
  cd perl-5.26.1
  ./Configure -des -Dprefix=/usr/local/
  make
  make test
  sudo make install

See also http://search.cpan.org/~shay/perl/README.macosx

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