在 Snow Leopard 上安装 ruby​​ 1.9.3 时出现问题

在 Snow Leopard 上安装 ruby​​ 1.9.3 时出现问题

我正在尝试使用以下命令安装 ruby​​ 1.9.3(我正在运行 xCode 4.2):

rvm install 1.9.3 --with-gcc=clang

Fetching yaml-0.1.4.tar.gz to /Users/myusername/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/myusername/.rvm/src
Error running 'tar mzxf /Users/myusername/.rvm/archives/yaml-0.1.4.tar.gz -C /Users/myusername/.rvm/src ', please read /Users/myusername/.rvm/log/yaml/extract.log
Configuring yaml in /Users/myusername/.rvm/src/yaml-0.1.4.
Error running ' ./configure --prefix="/Users/myusername/.rvm/usr"  ', please read /Users/myusername/.rvm/log/yaml/configure.log
Uninstalling yaml from /Users/myusername/.rvm/usr
Error running 'make uninstall', please read /Users/myusername/.rvm/log/yaml/make.uninstall.log

当我查看 extract.log 时,我看到:

yaml-0.1.4/tests/example-reformatter-alt.c: Can't unlink already-existing object: Permission denied
yaml-0.1.4/tests/example-deconstructor.c: Can't unlink already-existing object: Permission denied
yaml-0.1.4/tests/test-reader.c: Can't unlink already-existing object: Permission denied
yaml-0.1.4/tests/Makefile.am: Can't unlink already-existing object: Permission denied
yaml-0.1.4/tests/test-version.c: Can't unlink already-existing object: Permission denied
yaml-0.1.4/tests/run-dumper.c: Can't unlink already-existing object: Permission denied
yaml-0.1.4/tests/run-emitter.c: Can't unlink already-existing object: Permission denied
yaml-0.1.4/tests/run-parser.c: Can't unlink already-existing object: Permission denied
yaml-0.1.4/tests/run-scanner.c: Can't unlink already-existing object: Permission denied
yaml-0.1.4/tests/run-loader.c: Can't unlink already-existing object: Permission denied
yaml-0.1.4/tests/Makefile.in: Can't unlink already-existing object: Permission denied
yaml-0.1.4/tests/example-reformatter.c: Can't unlink already-existing object: Permission denied
yaml-0.1.4/tests/example-deconstructor-alt.c: Can't unlink already-existing object: Permission denied
yaml-0.1.4/config.h.in: Can't unlink already-existing object: Permission denied
yaml-0.1.4/aclocal.m4: Can't unlink already-existing object: Permission denied
yaml-0.1.4/Makefile.am: Can't unlink already-existing object: Permission denied
yaml-0.1.4/configure: Can't unlink already-existing object: Permission denied
yaml-0.1.4/yaml-0.1.pc.in: Can't unlink already-existing object: Permission denied
yaml-0.1.4/LICENSE: Can't unlink already-existing object: Permission denied
yaml-0.1.4/README: Can't unlink already-existing object: Permission denied
yaml-0.1.4/include/Makefile.am: Can't unlink already-existing object: Permission denied
yaml-0.1.4/include/yaml.h: Can't unlink already-existing object: Permission denied
yaml-0.1.4/include/Makefile.in: Can't unlink already-existing object: Permission denied
yaml-0.1.4/Makefile.in: Can't unlink already-existing object: Permission denied
yaml-0.1.4/configure.ac: Can't unlink already-existing object: Permission denied
yaml-0.1.4/config/ltmain.sh: Can't unlink already-existing object: Permission denied

答案1

可能你使用了sudo其中一个 rvm 命令,请尝试:

sudo rm -rf $rvm_path/usr

这将清除所有使用 rvm 安装的库,您现在需要重新安装所有 ruby​​:

rvm reinstall 1.8.7,1.9.2

相关内容