使用[相当普通的] OpenBSD 6.0 x64 VM来试用RVM。我按照如何安装RVM的说明进行操作,并执行以下操作:
# curl -sSL https://get.rvm.io | bash -s stable --ruby ksh: bash: not found ksh: curl: not found # pkg_add curl bash quirks-2.241 signed on 2016-07-26T16:56:10Z curl-7.49.0:libidn-1.32p1: ok curl-7.49.0: ok bash-4.3.46: ok # curl -sSL https://get.rvm.io | bash -s stable --ruby Trying to install GNU version of tar, might require sudo password quirks-2.241 signed on 2016-07-26T16:56:10Z gtar-1.29: ok Downloading https://github.com/rvm/rvm/archive/1.28.0.tar.gz Downloading https://github.com/rvm/rvm/releases/download/1.28.0/1.28.0.tar.gz.asc curl: (22) The requested URL returned error: 404 Not Found Could not download 'https://github.com/rvm/rvm/releases/download/1.28.0/1.28.0.tar.gz.asc'. curl returned status '22'. Creating group 'rvm' Installing RVM to /usr/local/rvm/ Installation of RVM in /usr/local/rvm/ is almost complete: * First you need to add all users that will be using rvm to 'rvm' group, and logout - login again, anyone using rvm will be operating with `umask u=rwx,g=rwx,o=rx`. * To start using RVM you need to run `source /etc/profile.d/rvm.sh` in all your open shell windows, in rare cases you need to reopen all shell windows. # Administrator, # # Thank you for using RVM! # We sincerely hope that RVM helps to make your life easier and more enjoyable!!! # # ~Wayne, Michal & team. In case of problems: https://rvm.io/help and https://twitter.com/rvm_io rvm 1.28.0 (latest) by Wayne E. Seguin , Michal Papis [https://rvm.io/] Searching for binary rubies, this might take some time. No binary rubies available for: openbsd/6.0/x86_64/ruby-2.3.3. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. Checking requirements for openbsd. WARNING: $PKG_PATH was not set, using fallback 'http://ftp.openbsd.org/pub/OpenBSD/6.0/packages/amd64/', see http://www.openbsd.org/ftp.html for list of available mirrors. Installing requirements for openbsd. Updating system. Installing required packages: gcc-4, automake-1, libtool, bison, readline-6, libyaml-0. Requirements installation successful. Found user configured '-j' flag in 'rvm_make_flags', please note that RVM can detect number of CPU threads and set the '-j' flag automatically if you do not set it. Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.3.3, this may take a while depending on your cpu(s)... ruby-2.3.3 - #downloading ruby-2.3.3, this may take a while depending on your connection... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 13.7M 100 13.7M 0 0 3734k 0 0:00:03 0:00:03 --:--:-- 4000k ruby-2.3.3 - #extracting ruby-2.3.3 to /usr/local/rvm/src/ruby-2.3.3.... ruby-2.3.3 - #configuring.......................................................... ruby-2.3.3 - #post-configuration. ruby-2.3.3 - #compiling................................................................................................ ruby-2.3.3 - #installing........ ruby-2.3.3 - #making binaries executable.. ruby-2.3.3 - #downloading rubygems-2.6.8 % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 736k 100 736k 0 0 1087k 0 --:--:-- --:--:-- --:--:-- 1089k ruby-2.3.3 - #extracting rubygems-2.6.8.... ruby-2.3.3 - #removing old rubygems......... $LANG was empty, setting up LANG=en_US.UTF-8, if it fails again try setting LANG to something sane and try again. ruby-2.3.3 - #installing rubygems-2.6.8. Error running 'env GEM_HOME=/usr/local/rvm/gems/ruby-2.3.3@global GEM_PATH= /usr/local/rvm/rubies/ruby-2.3.3/bin/ruby -d /usr/local/rvm/src/rubygems-2.6.8/setup.rb --no-docu ment', showing last 15 lines of /usr/local/rvm/log/1482173449_ruby-2.3.3/rubygems.install.log [2016-12-19 13:56:46] /usr/local/rvm/rubies/ruby-2.3.3/bin/ruby current path: /usr/local/rvm/src/rubygems-2.6.8 PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/local/rvm/bin command(7): env GEM_HOME=/usr/local/rvm/gems/ruby-2.3.3@global GEM_PATH= /usr/local/rvm/rubies/ruby-2.3.3/bin/ruby -d /usr/local/rvm/src/rubygems-2.6.8/setup.rb --no-documen t ruby: can't load library 'libruby.so.2.30'
首先,我尝试在我们的一台OpenBSD 5.8开发机器上使用相同的程序作为本地用户安装RVM并遇到同样的问题。我决定在一个较新的VM上以root身份尝试它,这就是我在上面展示的内容。两个案例'libruby.so.2.30'都存在于本地(〜/ .rvm / rubies / ruby-2.3.0 / lib / libruby.so.2.30)中,或者存在于/ usr / local / rvm / rubies / ruby- 2.3.3 / lib对于我上面显示的案例。
如果我尝试使用ldconfig将路径添加到链接器配置并手动执行失败命令:
# ldconfig /usr/local/lib /usr/local/rvm/rubies/ruby-2.3.3/lib # cd /usr/local/rvm/src/rubygems-2.6.8 # env GEM_HOME=/usr/local/rvm/gems/ruby-2.3.3@global GEM_PATH= /usr/local/rvm/rubies/ruby-2.3.3/bin/ruby -d /usr/local/rvm/src/rubygems-2.6.8/setup.rb --no-document Exception `LoadError' at /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems.rb:1345 - cannot load such file -- rubygems/defaults/operating_system Exception `LoadError' at /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems.rb:1354 - cannot load such file -- rubygems/defaults/ruby Exception `LoadError' at /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55 - cannot load such file -- did_you_mean Exception `LoadError' at /usr/local/rvm/rubies/ruby-2.3.3/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:135 - cannot load such file -- did_you_mean ... lots of stdoutput regarding RubyGems changelog...
似乎库已经构建并且它可以执行命令(有错误,但是二进制工作),这可能与我在脚本本身的上下文中执行这些东西有关。我猜想。
这是一个脚本安装。似乎RVM应该为链接器设置一些东西来了解这些库的存在(它首先创建它们),但它似乎没有成功。
这是OpenBSD上RVM的错误还是我做得不对?