0

我在 x86-64 架构上运行 Fedora 18。我可以使用 RVM 安装 Ruby 1.9.3。但是,当我尝试安装 Ruby 1.9.2 时,它给了我以下错误:

ruby-1.9.2-p320 - #extracting ruby-1.9.2-p320 to /home/abhay/.rvm/src/ruby-1.9.2-p320
ruby-1.9.2-p320 - #extracted to /home/abhay/.rvm/src/ruby-1.9.2-p320
ruby-1.9.2-p320 - #configuring
ruby-1.9.2-p320 - #compiling
Error running 'make', please read /home/abhay/.rvm/log/ruby-1.9.2-p320/make.log
There has been an error while running make. Halting the installation.

以下是 make.log 文件的内容:

compiling bigdecimal
make[1]: Entering directory `/home/abhay/.rvm/src/ruby-1.9.2-p320/ext/bigdecimal'
gcc -I. -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/bigdecimal -DRUBY_EXTCONF_H=\"extconf.h\" -I/home/abhay/.rvm/usr/include    -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC  -o bigdecimal.o -c bigdecimal.c
gcc -shared -o ../../.ext/x86_64-linux/bigdecimal.so bigdecimal.o -L. -L../.. -L/home/abhay/.rvm/usr/lib -Wl,-R/home/abhay/.rvm/usr/lib -L.  -rdynamic -Wl,-export-dynamic   -Wl,-R -Wl,/home/abhay/.rvm/rubies/ruby-1.9.2-p320/lib -L/home/abhay/.rvm/rubies/ruby-1.9.2-p320/lib -lruby  -lpthread -lrt -ldl -lcrypt -lm   -lc
/usr/bin/mkdir -p ../../.ext/common/bigdecimal
cp ../.././ext/bigdecimal/lib/bigdecimal/newton.rb ../../.ext/common/bigdecimal
cp ../.././ext/bigdecimal/lib/bigdecimal/math.rb ../../.ext/common/bigdecimal
cp ../.././ext/bigdecimal/lib/bigdecimal/jacobian.rb ../../.ext/common/bigdecimal
cp ../.././ext/bigdecimal/lib/bigdecimal/ludcmp.rb ../../.ext/common/bigdecimal
cp ../.././ext/bigdecimal/lib/bigdecimal/util.rb ../../.ext/common/bigdecimal
make[1]: Leaving directory `/home/abhay/.rvm/src/ruby-1.9.2-p320/ext/bigdecimal'
compiling continuation
make[1]: Entering directory `/home/abhay/.rvm/src/ruby-1.9.2-p320/ext/continuation'
gcc -I. -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/continuation -DRUBY_EXTCONF_H=\"extconf.h\" -I/home/abhay/.rvm/usr/include    -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC  -o continuation.o -c continuation.c
gcc -shared -o ../../.ext/x86_64-linux/continuation.so continuation.o -L. -L../.. -L/home/abhay/.rvm/usr/lib -Wl,-R/home/abhay/.rvm/usr/lib -L.  -rdynamic -Wl,-export-dynamic   -Wl,-R -Wl,/home/abhay/.rvm/rubies/ruby-1.9.2-p320/lib -L/home/abhay/.rvm/rubies/ruby-1.9.2-p320/lib -lruby  -lpthread -lrt -ldl -lcrypt -lm   -lc
make[1]: Leaving directory `/home/abhay/.rvm/src/ruby-1.9.2-p320/ext/continuation'
compiling coverage
make[1]: Entering directory `/home/abhay/.rvm/src/ruby-1.9.2-p320/ext/coverage'
gcc -I. -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/coverage -DRUBY_EXTCONF_H=\"extconf.h\" -I/home/abhay/.rvm/usr/include    -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC  -o coverage.o -c coverage.c
gcc -shared -o ../../.ext/x86_64-linux/coverage.so coverage.o -L. -L../.. -L/home/abhay/.rvm/usr/lib -Wl,-R/home/abhay/.rvm/usr/lib -L.  -rdynamic -Wl,-export-dynamic   -Wl,-R -Wl,/home/abhay/.rvm/rubies/ruby-1.9.2-p320/lib -L/home/abhay/.rvm/rubies/ruby-1.9.2-p320/lib -lruby  -lpthread -lrt -ldl -lcrypt -lm   -lc
make[1]: Leaving directory `/home/abhay/.rvm/src/ruby-1.9.2-p320/ext/coverage'
compiling curses
make[1]: Entering directory `/home/abhay/.rvm/src/ruby-1.9.2-p320/ext/curses'
gcc -I. -I../../.ext/include/x86_64-linux -I../.././include -I../.././ext/curses -DRUBY_EXTCONF_H=\"extconf.h\" -I/home/abhay/.rvm/usr/include    -fPIC -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wno-long-long  -fPIC  -o curses.o -c curses.c
gcc -shared -o ../../.ext/x86_64-linux/curses.so curses.o -L. -L../.. -L/home/abhay/.rvm/usr/lib -Wl,-R/home/abhay/.rvm/usr/lib -L.  -rdynamic -Wl,-export-dynamic   -Wl,-R -Wl,/home/abhay/.rvm/rubies/ruby-1.9.2-p320/lib -L/home/abhay/.rvm/rubies/ruby-1.9.2-p320/lib -lruby -lncursesw -ltinfo  -lpthread -lrt -ldl -lcrypt -lm   -lc
curses.o: file not recognized: File truncated
collect2: error: ld returned 1 exit status
make[1]: *** [../../.ext/x86_64-linux/curses.so] Error 1
make[1]: Leaving directory `/home/abhay/.rvm/src/ruby-1.9.2-p320/ext/curses'
make: *** [mkmain.sh] Error 1

谁能告诉我我做错了什么。

4

1 回答 1

0

我不像以前那样使用 Fedora,但是在我的 Debian x86_64 机器上,这条线略有不同。在那,你的呼唤libncursesw,我的呼唤libncurses;这两个库在源代码上相当兼容,但可能会根据您的语言环境设置导致轻微的渲染差异。请参阅下面代码块的第一行,了解我的机器如何调用 gcc 将 curses.so 编译为 curses.o 与你的在底线:

gcc -shared -o ../../.ext/x86_64-linux/curses.so curses.o -L. -L../.. -L. -L/home/schade/.rvm/usr/lib -Wl,-rpath,/home/schade/.rvm/usr/lib -rdynamic -Wl,-export-dynamic   -Wl,-R -Wl,/home/schade/.rvm/rubies/ruby-1.9.2-p320/lib -L/home/schade/.rvm/rubies/ruby-1.9.2-p320/lib -lruby -lncurses -ltinfo  -lpthread -lrt -ldl -lcrypt -lm   -lc

gcc -shared -o ../../.ext/x86_64-linux/curses.so curses.o -L. -L../.. -L/home/abhay/.rvm/usr/lib -Wl,-R/home/abhay/.rvm/usr/lib -L.  -rdynamic -Wl,-export-dynamic   -Wl,-R -Wl,/home/abhay/.rvm/rubies/ruby-1.9.2-p320/lib -L/home/abhay/.rvm/rubies/ruby-1.9.2-p320/lib -lruby -lncursesw -ltinfo  -lpthread -lrt -ldl -lcrypt -lm   -lc

正如您所看到的,除了我们的用户名之外,唯一的区别是-lncurses-lncursesw.

如果您可以在没有 unicode 支持的情况下进行管理,那么对此SuperUser 问题的解决方案的类似修复可能会为您解决此问题。

于 2013-02-06T21:37:31.840 回答