虚拟包; 离线安装问题

离线安装包有问题。 例如; python-qt4模块需要sip-api-8.1但它是一个虚拟包,因此没有要安装的.deb文件。 我该如何解决这种情况? 我知道python-sip包提供了它,但我正在寻找一个通用的解决方案。

 $ apt-cache show python-qt4 Package: python-qt4 Priority: optional Section: python Installed-Size: 12103 Maintainer: Ubuntu Developers  Original-Maintainer: Debian Python Modules Team  Architecture: i386 Version: 4.9.1-2ubuntu1 Replaces: python-qt4-dev (<= 2.7.1-0ubuntu2), python (<= 2.3), libgcc1 (>= 1:4.1.1), libpython2.7 (>= 2.7), libqt4-dbus (>= 4:4.8.0-1~), libqt4-declarative (>= 4:4.8.0-1~), libqt4-designer (>= 4:4.8.0-1~), libqt4-help (>= 4:4.8.0-1~), libqt4-network (>= 4:4.8.0-1~), libqt4-script (>= 4:4.8.0-1~), libqt4-scripttools (>= 4:4.8.0-1~), libqt4-svg (>= 4:4.8.0-1~), libqt4-test (>= 4:4.8.0-1~), libqt4-xml (>= 4:4.8.0-1~), libqt4-xmlpatterns (>= 4:4.8.0-1~), libqtassistantclient4 (>= 4.6.3), libqtcore4 (>= 4:4.8.0-1~), libqtgui4 (>= 4:4.8.0-1~), libqtwebkit4 (>= 2.2~2011week36), libstdc++6 (>= 4.1.1), sip-api-8.1 Suggests: python-qt4-dbg 

然而:

 $ apt-cache show sip-api-8.1 N: Can't select versions from package 'sip-api-8.1' as it is purely virtual 

编辑:这如何选择python-sip而不是原始?

 $ apt-get install -s sip-api-8.1 Reading state information... Done Note, selecting 'python-sip' instead of 'sip-api-8.1' 

因为python-sip提供了sip-api-8.1

 $ apt-cache show python-sip | grep Provides Provides: python2.7-sip, sip-api-8.0, sip-api-8.1 

你怎么能为自己找到它?

 $ aptitude show sip-api-8.1 No current or candidate version found for sip-api-8.1 Package: sip-api-8.1 State: not a real package Provided by: python-sip 

或者,在dctrl-tools使用grep-dctrl:

 $ grep-aptavail -F Provides -s Package,Provides sip-api-8.1 Package: python-sip Provides: python2.7-sip, sip-api-8.0, sip-api-8.1