vim-gtk
和vim-gnome
都具有libruby1.9.1
软件包依赖关系(在 trusty 中),而这又依赖于ruby1.9.1
,我担心这样做sudo apt-get install vim-gtk
会导致诸如irb
和 之类的命令rails
调用 1.9.1 的东西。安装 gvim 而不篡改我来之不易的 ruby 设置的好方法是什么?
====8<----
编辑:
正如 AB 在下面的评论中所建议的,我检查了“我通过获取其源代码安装了程序,然后运行sudo make install
;如何让它apt-get
知道它?”
正如该问题的答案所建议的那样,我尝试sudo checkinstall -D make install
在包含 Ruby 2.2.3 的目录中进行操作Makefile
。Checkinstall 告诉我:
**********************************************************************
Done. The new package has been installed and saved to
/home/xxxx/Downloads/software/ruby-2.2.3/ruby_2.2.3-1_amd64.deb
You can remove it from your system anytime using:
dpkg -r ruby
**********************************************************************
这是一项不错的便利,但显然没有将 libruby、ruby 等纳入已满足的依赖项列表:
$ sudo apt-get install vim-gtk
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libruby1.9.1 ruby ruby1.9.1
Suggested packages:
ri ruby-dev ruby1.9.1-examples ri1.9.1 ruby1.9.1-dev ruby-switch cscope
vim-doc ttf-dejavu
The following NEW packages will be installed:
libruby1.9.1 ruby1.9.1 vim-gtk
The following packages will be upgraded:
ruby
1 upgraded, 3 newly installed, 0 to remove and 75 not upgraded.
Need to get 3,739 kB/3,780 kB of archives.
After this operation, 4,951 kB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.
在和1.9.1
的情况下, 是软件包名称本身的一部分(而不是适用于软件包的版本号),这有意义吗?它还表示软件包将升级。我担心它会被降级。我也尝试过(debfile 是由 创建的),然后尝试安装。libruby-1.9.1
ruby1.9.1
ruby
sudo dpkg -i ruby_2.2.3-1_amd64.deb
checkinstall
vim-gtk
====8<----
进一步编辑:
尝试按照 @muru 的建议添加替代 PPA。然后sudo apt-get install vim-gtk
,它将 ruby1.9.1 作为依赖项引入,但ruby -v
显示ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
,所以我想我可能已经准备好了。
$ sudo add-apt-repository ppa:gwibber-daily/ppa
[sudo] password for xxxx:
Daily builds of Gwibber trunk
More info: https://launchpad.net/~gwibber-daily/+archive/ubuntu/ppa
Press [ENTER] to continue or ctrl-c to cancel adding it
gpg: keyring `/tmp/tmpjnmo3n3s/secring.gpg' created
gpg: keyring `/tmp/tmpjnmo3n3s/pubring.gpg' created
gpg: requesting key 72D340A3 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmpjnmo3n3s/trustdb.gpg: trustdb created
gpg: key 72D340A3: public key "Launchpad PPA for gwibber-daily" imported
gpg: Total number processed: 1
gpg: imported: 1 (RSA: 1)
OK
$ sudo apt-get install ruby
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
vim-gui-common
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
libruby1.9.1 ruby1.9.1
Suggested packages:
ri ruby-dev ruby1.9.1-examples ri1.9.1 ruby1.9.1-dev ruby-switch
The following NEW packages will be installed:
libruby1.9.1 ruby ruby1.9.1
0 upgraded, 3 newly installed, 0 to remove and 18 not upgraded.
Need to get 0 B/2,686 kB of archives.
After this operation, 12.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.
$
看来 apt-get 仍然提供ruby1.9.1
等。