RVM 不适用于 1.9.1,但适用于 1.8.6 和 1.8.7

发布于 2024-09-02 14:07:11 字数 5577 浏览 4 评论 0 原文

更新 6/25/10

使用 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

更新 II

遵循上述更新的建议(编译 readline),导致我遇到了与 libxml2 相关的新问题, 此处详细介绍。我运行了以下命令: sudo port install libxml2


Update III 6/26/10

编译 readline 后,并按照 Readline 的 RVM 文档 我遇到了一个新错误:(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 正常工作。在此处查看类似问题

  1. 我导航到 usr/local/lib/
  2. sudo rm -rf libsqlite3.dylib (注意,这可能是一件非常糟糕的事情;但它可以解决这个问题)< /strong>
  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 或 Profile 文件有什么问题吗?

非常感谢!

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

UPDATE 6/25/10

Using Google, I am not the only person to encounter this problem. Apparently this problem has to do with readline. Has anyone out there encountered this issue? (see error at make.error.log below) As google suggests, I compiled 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

Update II

Following the advice of the above update (compile readline), has led me to new problems associated with libxml2, described in detail here. I ran this command: sudo port install libxml2


Update III 6/26/10

After compiling readline, and following the steps outlined at the RVM Documentation for Readline I'm met with a new error: (rvm install 1.8.7 and rvm install 1.9.1 produces this error)

This command: rvm install 1.9.1 -C --with-readline-dir=$HOME/.rvm/usr
results in this:

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

SOLUTION!!!! Update IV 6/27/10

I was able to get rvm to function by doing 3 things. See a similar problem here :

  1. I navigated to usr/local/lib/
  2. sudo rm -rf libsqlite3.dylib (Caution this could be a really bad thing to do; but it worked to solve this problem)
  3. I did sudo port upgrade --force sqlite3 +universal and got sqlite3 and all its dependencies to build x86_64/i386 universal libraries

All Green:
.

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$ 

I'm running into problems properly setting up RVM, I am really interested in using RVM, but it aborts after I attempt to install a new version of ruby; can you see anything wrong with my Bashrc or Profile file(s)?

Many Thanks in advance!

Bash Terminal

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

make.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

Profile

# 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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

傾城如夢未必闌珊 2024-09-09 14:07:11

根据这篇文章,你应该先安装readline:

rvm package install readline

According to this post, you should install readline first:

rvm package install readline
快乐很简单 2024-09-09 14:07:11

试试这个:首先安装并使用(!)1.8.7。

$ rvm install 1.8.7

$ rvm use 1.8.7

然后尝试再次安装 1.9.1。

Try this: install and use (!) 1.8.7 first.

$ rvm install 1.8.7

$ rvm use 1.8.7

Then try installing 1.9.1 again.

沙沙粒小 2024-09-09 14:07:11

解决方案!!!
我可以通过做三件事让 rvm 运行:

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

SOLUTION!!!!
I was able to get rvm to function by doing 3 things:

  1. Navigate to usr/local/lib/
  2. sudo rm -rf libsqlite3.dylib (Caution this could be a really bad thing to do; but it worked to solve this problem)
  3. sudo port upgrade --force sqlite3 +universal and got sqlite3 and all its dependencies to build x86_64/i386 universal libraries
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文