Install Ruby 1.9.3 after Ruby 2.0.0 has been installed

喜夏-厌秋 提交于 2019-12-11 15:06:48

问题


I installed the gcc-4.2 and got Ruby 2.0.0 installed, but in the process I deleted some older versions of ruby. Specifically, Ruby 1.9.3, now I want to go back and install that version using rvm install 1.9.3 but I keep getting errors. It is using gcc-4.2 to install, but gcc-4.2 is buggy to install 1.9.3. How do I install 1.9.3 now that I am in this state? Any thoughts or suggestions?

These are the errors:

Error running '__rvm_package_extract /Users/marty/.rvm/archives/yaml-0.1.4.tar.gz /Users/marty/.rvm/src', please read /Users/marty/.rvm/log/ruby-1.9.3-p392/yaml/extract.log
There has been an error while trying to extract the source. Halting the installation.

Error running './configure --disable-install-doc --prefix=/Users/marty/.rvm/rubies/ruby-1.9.3-p392 --with-opt-dir=/Users/marty/.rvm/usr --disable-shared', please read /Users/marty/.rvm/log/ruby-1.9.3-p392/configure.log
There has been an error while running configure. Halting the installation.

Here are the logs

Extract.log

[2013-03-04 12:08:08] __rvm_package_extract
yaml-0.1.4/: Can't update time for yaml-0.1.4
yaml-0.1.4/tests/: Can't update time for yaml-0.1.4/tests
yaml-0.1.4/tests/example-reformatter-alt.c: Can't unlink already-existing object
yaml-0.1.4/tests/example-deconstructor.c: Can't unlink already-existing object
yaml-0.1.4/tests/test-reader.c: Can't unlink already-existing object
yaml-0.1.4/tests/Makefile.am: Can't unlink already-existing object
yaml-0.1.4/tests/test-version.c: Can't unlink already-existing object
yaml-0.1.4/tests/run-dumper.c: Can't unlink already-existing object
yaml-0.1.4/tests/run-emitter.c: Can't unlink already-existing object
yaml-0.1.4/tests/run-parser.c: Can't unlink already-existing object
yaml-0.1.4/tests/run-scanner.c: Can't unlink already-existing object
yaml-0.1.4/tests/run-loader.c: Can't unlink already-existing object
yaml-0.1.4/tests/Makefile.in: Can't unlink already-existing object
yaml-0.1.4/tests/example-reformatter.c: Can't unlink already-existing object
yaml-0.1.4/tests/example-deconstructor-alt.c: Can't unlink already-existing object
yaml-0.1.4/config.h.in: Can't unlink already-existing object
yaml-0.1.4/aclocal.m4: Can't unlink already-existing object
yaml-0.1.4/Makefile.am: Can't unlink already-existing object
yaml-0.1.4/configure: Can't unlink already-existing object
yaml-0.1.4/yaml-0.1.pc.in: Can't unlink already-existing object
yaml-0.1.4/LICENSE: Can't unlink already-existing object
yaml-0.1.4/README: Can't unlink already-existing object
yaml-0.1.4/include/: Can't update time for yaml-0.1.4/include
yaml-0.1.4/include/Makefile.am: Can't unlink already-existing object
yaml-0.1.4/include/yaml.h: Can't unlink already-existing object
yaml-0.1.4/include/Makefile.in: Can't unlink already-existing object
yaml-0.1.4/Makefile.in: Can't unlink already-existing object
yaml-0.1.4/configure.ac: Can't unlink already-existing object
yaml-0.1.4/config/: Can't update time for yaml-0.1.4/config
yaml-0.1.4/config/ltmain.sh: Can't unlink already-existing object
yaml-0.1.4/config/config.sub: Can't unlink already-existing object
yaml-0.1.4/config/missing: Can't unlink already-existing object
yaml-0.1.4/config/config.guess: Can't unlink already-existing object
yaml-0.1.4/config/install-sh: Can't unlink already-existing object
yaml-0.1.4/config/depcomp: Can't unlink already-existing object
yaml-0.1.4/doc/: Can't update time for yaml-0.1.4/doc
yaml-0.1.4/doc/doxygen.cfg: Can't unlink already-existing object
yaml-0.1.4/doc/html/: Can't update time for yaml-0.1.4/doc/html
yaml-0.1.4/doc/html/functions_vars_0x6c.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x74.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/doxygen.css: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x69.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x6f.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/structyaml__event__s.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/files.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/tab_h.png: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x74.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x72.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/group__tokens.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x64.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/group__emitter.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/bc_s.png: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x77.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x6b.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/structyaml__parser__s.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x62.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x76.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x66.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x72.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/index.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x63.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/structyaml__mark__s.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/structyaml__alias__data__s.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/closed.png: Can't unlink already-existing object
yaml-0.1.4/doc/html/group__version.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x75.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/annotated.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x64.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/structyaml__document__s.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/modules.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x65.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x6d.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x6d.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/tabs.css: Can't unlink already-existing object
yaml-0.1.4/doc/html/globals_enum.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x71.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x63.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/structyaml__tag__directive__s.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/classes.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x77.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x68.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x6b.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x71.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/doxygen.png: Can't unlink already-existing object
yaml-0.1.4/doc/html/open.png: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x70.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/yaml_8h.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/structyaml__node__s.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x75.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x68.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/tab_a.png: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x73.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/nav_f.png: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x73.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/tab_s.png: Can't unlink already-existing object
yaml-0.1.4/doc/html/globals_eval.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x69.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/structyaml__token__s.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x65.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x62.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/group__nodes.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/structyaml__emitter__s.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/group__export.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x6e.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/group__parser.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/globals_type.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x6f.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x76.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/globals_defs.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/globals.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/structyaml__node__pair__s.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x6e.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/group__events.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x66.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_0x6c.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/globals_func.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/tab_b.png: Can't unlink already-existing object
yaml-0.1.4/doc/html/nav_h.png: Can't unlink already-existing object
yaml-0.1.4/doc/html/functions_vars_0x70.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/group__basic.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/structyaml__simple__key__s.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/group__styles.html: Can't unlink already-existing object
yaml-0.1.4/doc/html/structyaml__version__directive__s.html: Can't unlink already-existing object
yaml-0.1.4/src/: Can't update time for yaml-0.1.4/src
yaml-0.1.4/src/parser.c: Can't unlink already-existing object
yaml-0.1.4/src/reader.c: Can't unlink already-existing object
yaml-0.1.4/src/Makefile.am: Can't unlink already-existing object
yaml-0.1.4/src/emitter.c: Can't unlink already-existing object
yaml-0.1.4/src/writer.c: Can't unlink already-existing object
yaml-0.1.4/src/api.c: Can't unlink already-existing object
yaml-0.1.4/src/dumper.c: Can't unlink already-existing object
yaml-0.1.4/src/Makefile.in: Can't unlink already-existing object
yaml-0.1.4/src/yaml_private.h: Can't unlink already-existing object
yaml-0.1.4/src/scanner.c: Can't unlink already-existing object
yaml-0.1.4/src/loader.c: Can't unlink already-existing object
yaml-0.1.4/win32/: Can't update time for yaml-0.1.4/win32
yaml-0.1.4/win32/Makefile.am: Can't unlink already-existing object
yaml-0.1.4/win32/vs2003/: Can't update time for yaml-0.1.4/win32/vs2003
yaml-0.1.4/win32/vs2003/example_deconstructor_alt.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2003/run_scanner.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2003/example_reformatter_alt.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2003/test_reader.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2003/example_deconstructor.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2003/run_dumper.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2003/libyaml.sln: Can't unlink already-existing object
yaml-0.1.4/win32/vs2003/run_parser.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2003/yaml.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2003/test_version.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2003/run_emitter.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2003/example_reformatter.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2003/run_loader.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2003/yamldll.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vc6/: Can't update time for yaml-0.1.4/win32/vc6
yaml-0.1.4/win32/vc6/run_emitter.dsp: Can't unlink already-existing object
yaml-0.1.4/win32/vc6/run_dumper.dsp: Can't unlink already-existing object
yaml-0.1.4/win32/vc6/example_deconstructor_alt.dsp: Can't unlink already-existing object
yaml-0.1.4/win32/vc6/yaml.dsp: Can't unlink already-existing object
yaml-0.1.4/win32/vc6/run_parser.dsp: Can't unlink already-existing object
yaml-0.1.4/win32/vc6/example_deconstructor.dsp: Can't unlink already-existing object
yaml-0.1.4/win32/vc6/example_reformatter_alt.dsp: Can't unlink already-existing object
yaml-0.1.4/win32/vc6/run_scanner.dsp: Can't unlink already-existing object
yaml-0.1.4/win32/vc6/run_loader.dsp: Can't unlink already-existing object
yaml-0.1.4/win32/vc6/test_reader.dsp: Can't unlink already-existing object
yaml-0.1.4/win32/vc6/libyaml.dsw: Can't unlink already-existing object
yaml-0.1.4/win32/vc6/example_reformatter.dsp: Can't unlink already-existing object
yaml-0.1.4/win32/vc6/yamldll.dsp: Can't unlink already-existing object
yaml-0.1.4/win32/vc6/test_version.dsp: Can't unlink already-existing object
yaml-0.1.4/win32/Makefile.in: Can't unlink already-existing object
yaml-0.1.4/win32/vs2008/: Can't update time for yaml-0.1.4/win32/vs2008
yaml-0.1.4/win32/vs2008/example_deconstructor_alt.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2008/run_scanner.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2008/example_reformatter_alt.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2008/test_reader.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2008/example_deconstructor.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2008/run_dumper.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2008/libyaml.sln: Can't unlink already-existing object
yaml-0.1.4/win32/vs2008/run_parser.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2008/yaml.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2008/test_version.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2008/run_emitter.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2008/example_reformatter.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2008/run_loader.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/vs2008/yamldll.vcproj: Can't unlink already-existing object
yaml-0.1.4/win32/config.h: Can't unlink already-existing object
tar: Error exit delayed from previous errors.

Configure.log

[2013-03-04 12:08:08] ./configure
checking build system type... x86_64-apple-darwin12.2.1
checking host system type... x86_64-apple-darwin12.2.1
checking target system type... x86_64-apple-darwin12.2.1
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking whether we are using the GNU C++ compiler... no
checking whether /usr/bin/g++-4.2 accepts -g... no
checking how to run the C preprocessor... /usr/bin/cpp-4.2
configure: error: in `/Users/marty/.rvm/src/ruby-1.9.3-p392':
configure: error: C preprocessor "/usr/bin/cpp-4.2" fails sanity check

回答1:


After chatting with @mpapis the issue was 2 fold.

First, you have to unset CC and make sure that gcc-4.2 is in the /usr/local/bin NOT /usr/bin.

Second, apple-gcc42 did not link in brew, so you have to run:

brew unlink apple-gcc42 && brew link apple-gcc42

then run

rvm install 1.9.3 --debug --autolibs=3

And ruby 1.9.3 installed.

Thanks again to @mpapis



来源:https://stackoverflow.com/questions/15207480/install-ruby-1-9-3-after-ruby-2-0-0-has-been-installed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!