我正在尝试在 ubuntu 14.04 上启动并运行 rvm,但很难弄清楚为什么我无法满足依赖关系。我做了多次,apt-get update && spt-get upgrades
但仍然出现此错误。
zachs@Ranger:~$ rvm requirements
Checking requirements for ubuntu.
Installing requirements for ubuntu.
Updating system......
Installing required packages: gawk, libyaml-dev, libsqlite3-dev, sqlite3, libgdbm-dev, bison, libffi-dev.....
Error running 'requirements_debian_libs_install gawk libyaml-dev libsqlite3-dev sqlite3 libgdbm-dev bison libffi-dev',
showing last 15 lines of /home/zachs/.rvm/log/1452398643/package_install_gawk_libyaml-dev_libsqlite3-dev_sqlite3_libgdbm-dev_bison_libffi-dev.log
Reading state information...
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libffi-dev : Depends: libffi6 (= 3.1~rc1+r3.0.13-12) but 3.1~rc1+r3.0.13-12ubuntu0.1 is to be installed
libsqlite3-dev : Depends: libsqlite3-0 (= 3.8.2-1ubuntu2) but 3.8.2-1ubuntu2.1 is to be installed
libyaml-dev : Depends: libyaml-0-2 (= 0.1.4-3ubuntu3) but 0.1.4-3ubuntu3.1 is to be installed
sqlite3 : Depends: libsqlite3-0 (= 3.8.2-1ubuntu2) but 3.8.2-1ubuntu2.1 is to be installed
E: Unable to correct problems, you have held broken packages.
+ return 100
+ return 100
Requirements installation failed with status: 100.
我猜我需要安装这些软件包的 ubuntu 版本但为什么抓不到apt-get update
它们呢?
我相信我已经正确安装了 rvm,因为我收到了这个回复:
$ type rvm | head -n 1
rvm is a function
尝试安装未满足的依赖项也会失败:
zachs@Ranger:~$ sudo apt-get install libffi6
Reading package lists... Done
Building dependency tree
Reading state information... Done
libffi6 is already the newest version.
答案1
我遇到了同样的问题,我不得不直接使用 aptitude 来安装 libffi-dev:
sudo aptitude install libffi-dev
然后它提示我是否要选择默认选项,不安装 libffi-dev。选择“n”(否)。下一个选项应指定将降级 libffi6 并安装 libffi-dev。选择“y”(是)。
这导致安装了 libffi-dev。您可能必须选择“n”,直到它为您提供降级 libffi6 并安装 libffi-dev 的选项。
请注意,您需要安装 aptitude 才能执行此操作。