2011-10-17 69 views
3
$ rvm install ruby-1.8.7-p249 
Installing Ruby from source to: /home/sayuj/.rvm/rubies/ruby-1.8.7-p249, this may take a while depending on your cpu(s)... 

ruby-1.8.7-p249 - #fetching 
ruby-1.8.7-p249 - #extracted to /home/sayuj/.rvm/src/ruby-1.8.7-p249 (already extracted) 
ruby-1.8.7-p249 - #configuring 
ruby-1.8.7-p249 - #compiling 
ERROR: Error running 'make ', please read /home/sayuj/.rvm/log/ruby-1.8.7-p249/make.log 
ERROR: There has been an error while running make. Halting the installation. 

編輯不能RVM安裝Ruby-1.8.7-P249

我使用Ubuntu 11.10

$ cat /home/sayuj/.rvm/log/ruby-1.8.7-p249/make.log

[2011-10-17 15:34:49] make 
gcc -g -O2 -fPIC -DRUBY_EXPORT -D_GNU_SOURCE=1 -L. -rdynamic -Wl,-export-dynamic main.o libruby-static.a -lrt -ldl -lcrypt -lm -o miniruby 
rbconfig.rb updated 
gcc -shared -Wl,-soname,libruby.so.1.8 array.o bignum.o class.o compar.o dir.o dln.o enum.o enumerator.o error.o eval.o file.o gc.o hash.o inits.o io.o marshal.o math.o numeric.o object.o pack.o parse.o process.o prec.o random.o range.o re.o regex.o ruby.o signal.o sprintf.o st.o string.o struct.o time.o util.o variable.o version.o dmyext.o -lrt -ldl -lcrypt -lm -o libruby.so.1.8.7 
compiling Win32API 
compiling bigdecimal 
make[1]: Entering directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/bigdecimal' 
gcc -shared -o ../../.ext/x86_64-linux/bigdecimal.so bigdecimal.o -L. -L../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -L/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -lruby -lrt -ldl -lcrypt -lm -lc 
make[1]: Leaving directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/bigdecimal' 
compiling curses 
make[1]: Entering directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/curses' 
gcc -shared -o ../../.ext/x86_64-linux/curses.so curses.o -L. -L../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -L/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -lruby -lncurses -ltinfo -lrt -ldl -lcrypt -lm -lc 
make[1]: Leaving directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/curses' 
compiling dbm 
compiling digest 
make[1]: Entering directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/digest' 
gcc -shared -o ../../.ext/x86_64-linux/digest.so digest.o -L. -L../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -L/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -lruby -lrt -ldl -lcrypt -lm -lc 
cp ../.././ext/digest/digest.h ../../.ext/x86_64-linux 
make[1]: Leaving directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/digest' 
compiling digest/bubblebabble 
make[1]: Entering directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/digest/bubblebabble' 
gcc -shared -o ../../../.ext/x86_64-linux/digest/bubblebabble.so bubblebabble.o -L. -L../../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -L/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -lruby -lrt -ldl -lcrypt -lm -lc 
make[1]: Leaving directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/digest/bubblebabble' 
compiling digest/md5 
make[1]: Entering directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/digest/md5' 
gcc -shared -o ../../../.ext/x86_64-linux/digest/md5.so md5init.o md5ossl.o -L. -L../../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -L/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -lruby -lcrypto -lrt -ldl -lcrypt -lm -lc 
make[1]: Leaving directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/digest/md5' 
compiling digest/rmd160 
make[1]: Entering directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/digest/rmd160' 
gcc -shared -o ../../../.ext/x86_64-linux/digest/rmd160.so rmd160init.o rmd160ossl.o -L. -L../../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -L/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -lruby -lcrypto -lrt -ldl -lcrypt -lm -lc 
make[1]: Leaving directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/digest/rmd160' 
compiling digest/sha1 
make[1]: Entering directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/digest/sha1' 
gcc -shared -o ../../../.ext/x86_64-linux/digest/sha1.so sha1init.o sha1ossl.o -L. -L../../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -L/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -lruby -lcrypto -lrt -ldl -lcrypt -lm -lc 
make[1]: Leaving directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/digest/sha1' 
compiling digest/sha2 
make[1]: Entering directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/digest/sha2' 
gcc -shared -o ../../../.ext/x86_64-linux/digest/sha2.so sha2.o sha2init.o -L. -L../../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -L/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -lruby -lrt -ldl -lcrypt -lm -lc 
make[1]: Leaving directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/digest/sha2' 
compiling dl 
make[1]: Entering directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/dl' 
gcc -shared -o ../../.ext/x86_64-linux/dl.so handle.o ptr.o dl.o sym.o -L. -L../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -L/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -lruby -ldl -lrt -ldl -lcrypt -lm -lc 
cp dlconfig.h ../../.ext/x86_64-linux 
cp ../.././ext/dl/dl.h ../../.ext/x86_64-linux 
make[1]: Leaving directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/dl' 
compiling etc 
make[1]: Entering directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/etc' 
gcc -shared -o ../../.ext/x86_64-linux/etc.so etc.o -L. -L../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -L/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -lruby -lrt -ldl -lcrypt -lm -lc 
make[1]: Leaving directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/etc' 
compiling fcntl 
make[1]: Entering directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/fcntl' 
gcc -shared -o ../../.ext/x86_64-linux/fcntl.so fcntl.o -L. -L../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -L/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -lruby -lrt -ldl -lcrypt -lm -lc 
make[1]: Leaving directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/fcntl' 
compiling gdbm 
compiling iconv 
make[1]: Entering directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/iconv' 
gcc -shared -o ../../.ext/x86_64-linux/iconv.so iconv.o -L. -L../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -L/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -lruby -lrt -ldl -lcrypt -lm -lc 
make[1]: Leaving directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/iconv' 
compiling io/wait 
make[1]: Entering directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/io/wait' 
gcc -shared -o ../../../.ext/x86_64-linux/io/wait.so wait.o -L. -L../../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -L/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -lruby -lrt -ldl -lcrypt -lm -lc 
make[1]: Leaving directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/io/wait' 
compiling nkf 
make[1]: Entering directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/nkf' 
gcc -shared -o ../../.ext/x86_64-linux/nkf.so nkf.o -L. -L../.. -L. -rdynamic -Wl,-export-dynamic -Wl,-R -Wl,/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -L/home/sayuj/.rvm/rubies/ruby-1.8.7-p249/lib -lruby -lrt -ldl -lcrypt -lm -lc 
make[1]: Leaving directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/nkf' 
compiling openssl 
make[1]: Entering directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/openssl' 
gcc -I. -I../.. -I../../. -I../.././ext/openssl -DRUBY_EXTCONF_H=\"extconf.h\" -fPIC -g -O2 -fPIC -c ossl_pkcs7.c 
ossl_pkcs7.c: In function ‘ossl_pkcs7si_new’: 
ossl_pkcs7.c:89:5: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type [enabled by default] 
/usr/include/openssl/asn1.h:955:7: note: expected ‘void * (*)(void **, const unsigned char **, long int)’ but argument is of type ‘char * (*)()’ 
ossl_pkcs7.c: In function ‘DupPKCS7SignerPtr’: 
ossl_pkcs7.c:102:5: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type [enabled by default] 
/usr/include/openssl/asn1.h:955:7: note: expected ‘void * (*)(void **, const unsigned char **, long int)’ but argument is of type ‘char * (*)()’ 
ossl_pkcs7.c: In function ‘ossl_pkcs7ri_new’: 
ossl_pkcs7.c:115:5: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type [enabled by default] 
/usr/include/openssl/asn1.h:955:7: note: expected ‘void * (*)(void **, const unsigned char **, long int)’ but argument is of type ‘char * (*)()’ 
ossl_pkcs7.c: In function ‘DupPKCS7RecipientPtr’: 
ossl_pkcs7.c:128:5: warning: passing argument 2 of ‘ASN1_dup’ from incompatible pointer type [enabled by default] 
/usr/include/openssl/asn1.h:955:7: note: expected ‘void * (*)(void **, const unsigned char **, long int)’ but argument is of type ‘char * (*)()’ 
ossl_pkcs7.c: At top level: 
ossl_pkcs7.c:573:1: error: unknown type name ‘STACK’ 
ossl_pkcs7.c: In function ‘pkcs7_get_certs_or_crls’: 
ossl_pkcs7.c:593:15: warning: assignment from incompatible pointer type [enabled by default] 
ossl_pkcs7.c:596:31: warning: pointer type mismatch in conditional expression [enabled by default] 
ossl_pkcs7.c: In function ‘ossl_pkcs7_set_certificates’: 
ossl_pkcs7.c:611:11: warning: assignment from incompatible pointer type [enabled by default] 
ossl_pkcs7.c: In function ‘ossl_pkcs7_get_certificates’: 
ossl_pkcs7.c:621:5: warning: passing argument 1 of ‘ossl_x509_sk2ary’ from incompatible pointer type [enabled by default] 
ossl.h:121:7: note: expected ‘struct stack_st_X509 *’ but argument is of type ‘int *’ 
ossl_pkcs7.c: In function ‘ossl_pkcs7_set_crls’: 
ossl_pkcs7.c:651:10: warning: assignment from incompatible pointer type [enabled by default] 
ossl_pkcs7.c: In function ‘ossl_pkcs7_get_crls’: 
ossl_pkcs7.c:661:5: warning: passing argument 1 of ‘ossl_x509crl_sk2ary’ from incompatible pointer type [enabled by default] 
ossl.h:122:7: note: expected ‘struct stack_st_X509_CRL *’ but argument is of type ‘int *’ 
make[1]: *** [ossl_pkcs7.o] Error 1 
make[1]: Leaving directory `/home/sayuj/.rvm/src/ruby-1.8.7-p249/ext/openssl' 
make: *** [all] Error 1 

我該如何解決這個問題?

+0

是第一個安裝ruby還是讓別人工作正常?哪個OS?如果是OSX,你是否安裝了gcc或XCode?日誌文件中是否有任何內容 - /home/sayuj/.rvm/log/ruby-1.8.7-p249/make.log? –

+0

我使用的是Ubuntu 11.10。編輯了這個問題。我無法理解日誌文件中的任何內容! – Sayuj

+0

好的 - 你安裝了gcc/build依賴嗎?請將日誌文件發佈到你的問題 - 也許有人在這裏會明白它:)通往最後的錯誤,說最後50行左右... –

回答

2

貌似問題是:

ossl_pkcs7.c:573:1: error: unknown type name ‘STACK’ 

我的猜測是它的一個扶養問題。

看的輸出:

rvm notes 

,並確保你遵循了Ubuntu的所有步驟。

一個顯而易見的事情是,Ubuntu 11.10只是剛剛出來 - 可能值得在Ubuntu論壇上搜索/張貼,看看是否有人有任何問題,它和rvm。

2

一定要與RVM安裝Ruby,給開了SSL的目錄明確這樣的:

rvm cleanup 
rvm install ruby-1.8.7 --with-openssl-dir=$HOME/.rvm/usr