program story

RVM Ruby 1.9.1 설치는 zlib를 찾을 수 없지만 런타임 및 개발 라이브러리가 있습니다.

inputbox 2021. 1. 9. 09:53
반응형

RVM Ruby 1.9.1 설치는 zlib를 찾을 수 없지만 런타임 및 개발 라이브러리가 있습니다.


새로운 설치 (fedora)에서 Ruby 1.9.1을 설치하고 RVM과 함께 실행하려고합니다.

를 한 후 rvm install 1.9.1rubygems 오류 로그에 zlib를 찾을 수 없음이 표시됩니다.

로드 할 파일 없음-zlib (LoadError)

그러나 zlib 런타임 및 개발 라이브러리가 모두 설치되어 있으며 최신 상태입니다.

나는 현재 이것에 대해 다소 난처한 것입니다.


rvm을 사용하여 zlib 설치

https://rvm.io/packages/zlib/

rvm package install zlib
rvm remove 1.9.1
rvm install 1.9.1 -C --with-zlib-dir=$rvm_path/usr

편집 : rvm package명령은 rvm pkgv1.6.25에서 이름이 변경되었습니다 .


zlibRuby를 컴파일 / 설치하기 전에 설치해야합니다 . 이렇게하지 않았다면 Ruby 1.9.1과 관련된 모든 것을 ~/.rvm폴더 에서 제거해야 합니다 (처음부터 빌드되도록).

zlib선호하는 패키지 관리자를 사용하여 설치 :

sudo apt-get install zlib1g-dev

OpenSSL,
Nokogiri, IRB 또는 SQLite 와 같은 도구에 필요하므로 다음 패키지를 설치할 수도 있습니다 .

 libssl-dev libreadline6-dev libxml2-dev libsqlite3-dev

그런 다음 Ruby 1.9.1을 다시 설치하십시오 (요즘에는 최신 버전을 사용하는 것이 좋습니다).

rvm install 1.9.1

"컴파일 중 ..."을 확인하십시오. 시간이 좀 걸립니다. 그렇지 않은 경우, 루비 1.9.1은 여전히 캐시 할 수
귀하의 ~/.rvm폴더.


다음을 시도 할 때이 문제가 발생했습니다.

gem install gruff

실제로 저에게 효과가 있었던 것은 (Ubunut 10.10, 루비 MRI 1.8.7) 다음과 같습니다.

  • rvm 노트를 읽고 루비 버전에 대한 종속성 설치

sudo apt-get install build-essential bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev autoconf

  1. rvm 패키지 설치 zlib
  2. rvm 제거 1.8.7
  3. rvm 설치 1.8.7

따라서 기본적으로 rvm 매뉴얼을 따르십시오.


최신 버전의 rvm 패키지 인수는 pkg 인수 로 대체되었습니다 .

이제 rvm 용 zlib 패키지를 설치하려면 다음이 필요합니다.

rvm pkg install zlib


Fedora를 사용하고 있으므로 다음을 실행 해보십시오.

yum install zlib-devel.i686

그런 다음 RVM을 사용하여 루비 1.9.1을 설치하십시오.

rvm install 1.9.1

Also, you do know that 1.9.1 is horribly broken which is why no one uses it seriously, right? The importance this has to the question asked is that many people do not realize this and attempt to use it with such APIs as Ruby On Rails. However, as rubyonrails.org/download states, Ruby 1.9.1 is not supported for use with Rails as it is broken.


On the latest Ubuntu (11.10) there is also an issue with readline.

Readline was unable to be required, if you need completion or history install readline then reinstall ruby.

So my entire rvm and latest ruby install process for ubunutu 11.10 was:

# install rvm
sudo apt-get install curl
curl -L get.rvm.io | bash -s stable

# install dependencies
rvm pkg install zlib
rvm pkg install readline

# install additional dependencies -- follow instructions for your distribution/version
rvm requirements

# install ruby
rvm install [ruby-version]

I'm posting this for my future reference and in case anyone else bumps into this issue as well.


For me, the solution was very simple: I had forgotten to close/reopen the shell, as rvm setup had instructed me to do. After I did that, the zlib error was gone and I was able to: gem install bundler

ReferenceURL : https://stackoverflow.com/questions/2441248/rvm-ruby-1-9-1-install-cant-locate-zlib-but-its-runtime-and-dev-library-are-the

반응형