gpt4 book ai didi

ruby - RVM 不适用于 1.9.1 但适用于 1.8.6 和 1.8.7

转载 作者:数据小太阳 更新时间:2023-10-29 08:06:24 26 4
gpt4 key购买 nike

2010 年 6 月 25 日更新

使用 Google ,我不是唯一遇到这个问题的人。显然这个问题与 readline 有关。有没有人遇到过这个问题? (请参阅下面的 make.error.log 中的错误)正如谷歌所建议的那样,我编译了 readline:

curl -O ftp://ftp.gnu.org/gnu/readline/readline-6.1.tar.gz
tar xzvf readline-6.1.tar.gz
cd readline-6.1
./configure --prefix=/usr/local
make
sudo make install

更新二

按照上述更新(编译阅读行)的建议,我遇到了与 libxml2 相关的新问题,详细描述 here .我运行了这个命令:sudo port install libxml2


更新 III 6/26/10

编译 readline 并按照 RVM Documentation 中列出的步骤操作后对于 Readline,我遇到了一个新错误:(rvm install 1.8.7 和 rvm install 1.9.1 产生了这个错误)

此命令:rvm install 1.9.1 -C --with-readline-dir=$HOME/.rvm/usr结果是:

main.c: In function ‘objcdummyfunction’:
main.c:19: warning: implicit declaration of function ‘objc_msgSend’
main.c: At top level:
main.c:19: warning: ‘objcdummyfunction’ defined but not used
eval.c: In function ‘ruby_cleanup’:
eval.c:139: warning: passing argument 1 of ‘ruby_init_stack’ discards qualifiers from pointer target type
gc.c: In function ‘garbage_collect_with_gvl’:
gc.c:597: warning: cast from pointer to integer of different size
w: illegal option -- L
usage: w [hi] [user ...]
make: [libruby.1.9.1.dylib] Error 1 (ignored)
ld: in /usr/local/lib/libsqlite3.dylib, file was built for i386 which is not the architecture being linked (x86_64)
collect2: ld returned 1 exit status
make[1]: *** [../../.ext/i386-darwin10.4.0/tcltklib.bundle] Error 1
make: *** [mkmain.sh] Error 1

解决方案!!!!更新 IV 6/27/10

我可以通过做 3 件事来让 rvm 正常工作。见类似问题here :

  1. 我导航到 usr/local/lib/
  2. sudo rm -rf libsqlite3.dylib (注意这可能是一件非常糟糕的事情;但它可以解决这个问题)
  3. 我执行了 sudo port upgrade --force sqlite3 +universal 并获取了 sqlite3 及其所有依赖项来构建 x86_64/i386 通用库

全绿:.

justinz$ rvm remove 1.9.1

info: Removing /Users/justinz/.rvm/src/ruby-1.9.1-p378...

info: it seems that /Users/justinz/.rvm/rubies/ruby-1.9.1-p378 is already non existent.

info: Removing ruby-1.9.1-p378 aliases...

info: Removing ruby-1.9.1-p378 wrappers...

info: Removing ruby-1.9.1-p378 environments...

info: Removing ruby-1.9.1-p378 binaries...
justin-zollarss-mac-pro:ruby-1.9.1-p378 justinz$ rvm install 1.9.1 -C --with-readline-dir=$HOME/.rvm/usr

info: Installing Ruby from source to: /Users/justinz/.rvm/rubies/ruby-1.9.1-p378

info: Extracting ruby-1.9.1-p378 ...

info: Configuring ruby-1.9.1-p378, this may take a while depending on your cpu(s)...

info: Compiling ruby-1.9.1-p378, this may take a while, depending on your cpu(s)...

info: Installing ruby-1.9.1-p378

info: Installation of ruby-1.9.1-p378 is complete.

info: Updating rubygems for /Users/justinz/.rvm/gems/ruby-1.9.1-p378

info: adjusting shebangs for ruby-1.9.1-p378 (gem irb erb ri rdoc testrb rake).

info: Importing initial gems...
justin-zollarss-mac-pro:ruby-1.9.1-p378 justinz$ rvm list

rvm rubies

ruby-1.8.6-p399 [ x86_64 ]
ruby-1.8.7-p299 [ x86_64 ]
ruby-1.9.1-p378 [ x86_64 ]

justin-zollarss-mac-pro:ruby-1.9.1-p378 justinz$

我在正确设置 RVM 时遇到问题,我真的对使用 RVM 很感兴趣,但是在我尝试安装新版本的 ruby​​ 后它中止了;你能看到我的 Bashrc 或配置文件有什么问题吗?

非常感谢!

Bash 终端

justin-zollarss-mac-pro:~ justinz$ rvm install 1.9.1

Installing Ruby from source to: /Users/justinz/.rvm/rubies/ruby-1.9.1-p378

/Users/justinz/.rvm/src/ruby-1.9.1-p378 has already been extracted.

Configuring ruby-1.9.1-p378, this may take a while depending on your cpu(s)...

Compiling ruby-1.9.1-p378, this may take a while, depending on your cpu(s)...

Error running 'make ', please check /Users/justinz/.rvm/log/ruby-1.9.1-p378/make*.log

There has been an error while running make. Aborting the installation.

Bashrc

# System-wide .bashrc file for interactive bash(1) shells.
if [ -z "$PS1" ]; then
return
fi
PS1='\h:\W \u\$ '
# Make bash check its window size after a process completes
shopt -s checkwinsize
if [[ -s /Users/justinz/.rvm/scripts/rvm ]] ; then source /Users/justinz/.rvm/scripts/rvm ; fi

ma​​ke.error.log

[2010-05-25 23:14:45] make 
readline.c: In function ‘username_completion_proc_call’:
readline.c:1159: error: ‘username_completion_function’ undeclared (first use in this function)
readline.c:1159: error: (Each undeclared identifier is reported only once
readline.c:1159: error: for each function it appears in.)
make[1]: *** [readline.o] Error 1
make: *** [mkmain.sh] Error 1

简介

# System-wide .profile for sh(1)

if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi

if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi
if [[ -s /Users/justinz/.rvm/scripts/rvm ]] ; then source /Users/justinz/.rvm/scripts/rvm ; fi

最佳答案

根据 this post , 你应该先安装 readline:

rvm package install readline

关于ruby - RVM 不适用于 1.9.1 但适用于 1.8.6 和 1.8.7,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2910507/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com