当我尝试安装 ruby-rvm 时,出现了这个错误...
$ sudo apt-get install ruby-rvm
Reading package lists... Done
Building dependency tree
Reading state information... Done
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:
ruby-rvm : Depends: libreadline-gplv2-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
好的,很好,所以我将安装 libreadline-gplv2-dev。
$ sudo apt-get install libreadline-gplv2-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libsdl-ttf2.0-0 libdb5.1-java-gcj libdb-je-java gcj-4.6-jre-lib libecj-java ttf-dejavu-extra eclipse-platform-data ruby1.9.1-examples gcj-4.6-base
libxerces2-java libswt-gtk-3-jni libgcj-bc libjtidy-java gstreamer0.10-fluendo-mp3:i386 libicu4j-java libservlet2.4-java libswt-cairo-gtk-3-jni
libcommons-beanutils-java junit libdb-java ruby1.9.1-dev libcommons-cli-java libtcltk-ruby1.9.1 libcommons-logging-java libcommons-compress-java libgcj12
libswt-gtk-3-java libdb5.1-java libicu4j-4.4-java libswt-gnome-gtk-3-jni libyaml-0-2 icedtea-netx-common libjsch-java libruby1.9.1-dbg jarwrapper
libxml-commons-resolver1.1-java libhal1 ri1.9.1 libapache-pom-java libxt-dev libxml-commons-external-java tzdata-java libcommons-el-java
libservlet2.5-java libcommons-httpclient-java libslf4j-java libasm3-java libregexp-java fastjar libjasper-java libruby1.9.1 libcommons-codec-java
libcommons-lang-java libhamcrest-java liblucene2-java liboil0.3:i386 libequinox-osgi-java libcommons-parent-java libcommons-collections3-java
ruby1.9.1-full libgcj-common libcommons-digester-java libjetty-java libjline-java ruby1.9.1 libswt-webkit-gtk-3-jni libswt-glx-gtk-3-jni
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
libreadline5
The following packages will be REMOVED:
libreadline-dev libreadline6-dev r-base-dev
The following NEW packages will be installed:
libreadline-gplv2-dev libreadline5
0 upgraded, 2 newly installed, 3 to remove and 0 not upgraded.
Need to get 375 kB of archives.
After this operation, 258 kB of additional disk space will be used.
Do you want to continue [Y/n]?
看起来很糟糕。这会干扰我的 Java 安装并删除 r-base-dev?这是怎么回事?
答案1
你不应该使用这个包ruby-rvm它已经过时并且包含旧的(和有缺陷的)RVM 版本,你可以在这里阅读相关内容:https://stackoverflow.com/a/9056395/497756
我计划发布 RVM 2.x 的维护包,但是您尝试安装的包不受我控制,而且我没有能力(也没有时间)来修复它。
答案2
最好使用萊本,它遵循 UNIX 约定,使得与其他 UNIX 工具的集成更加容易。