我之前用ruby和rails下载了rvm,但它给了一个我无法解决的问题,所以我拿了宝石并在rvm内爆,但是现在我要求安装ruby它没有,当我给它一个ruby -v似乎已经安装,版本2.4.1,版本4.2.6中的rails也是如此。我所做的?发生了什么?
rvm install ruby-2.4.1
Searching for binary rubies, this might take some time.
Found remote file https://rvm_io.global.ssl.fastly.net/binaries/ubuntu/16.04/x86_64/ruby-2.4.1.tar.bz2
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system..
Installing required packages: gawk, libyaml-dev, autoconf, libgdbm-dev, libncurses5-dev, automake, bison, libffi-dev....
Error running 'requirements_debian_libs_install gawk libyaml-dev autoconf libgdbm-dev libncurses5-dev automake bison libffi-dev',
showing last 15 lines of /usr/local/rvm/log/1497634607_ruby-2.4.1/package_install_gawk_libyaml-dev_autoconf_libgdbm-dev_libncurses5-dev_automake_bison_libffi-dev.log
autoconf-archive gnu-standards autoconf-doc bison-doc gawk-doc ncurses-doc
libyaml-doc
The following NEW packages will be installed:
autoconf automake bison gawk libbison-dev libffi-dev libgdbm-dev
libncurses5-dev libsigsegv2 libyaml-dev m4
0 upgraded, 11 newly installed, 0 to remove and 13 not upgraded.
Need to get 0 B/2,462 kB of archives.
After this operation, 9,047 kB of additional disk space will be used.
dpkg: warning: 'ldconfig' not found in PATH or not executable
dpkg: warning: 'start-stop-daemon' not found in PATH or not executable
dpkg: error: 2 expected programs not found in PATH or not executable
Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin
E: Sub-process /usr/bin/dpkg returned an error code (2)
++ return 100
++ return 100
Requirements installation failed with status: 100.
root@ubuntu:~# ruby -v
ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux-gnu]
root@ubuntu:~# rails -v
Rails 4.2.6
答案 0 :(得分:0)
我通过更改rails的版本来解决问题,如下所示:
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', github: 'rails/rails', branch: '4-2-stable'