我正在测试我的.deb
包,但无法找出它不安装依赖项的原因:
控制文件的 Depends 行是:
Depends: zend-grid-module, postgresql-8.4, ${shlibs:Depends}, ${misc:Depends}
当我跑步时:
$ sudo dpkg -i zend-grid-module-test-application_1.0.2-2_all.deb
我懂了:
(Reading database ... 25616 files and directories currently installed.)
Preparing to replace zend-grid-module-test-application 1.0.2-2 (using zend-grid-module-test-application_1.0.2-2_all.deb) ...
Unpacking replacement zend-grid-module-test-application ...
dpkg: dependency problems prevent configuration of zend-grid-module-test-application:
zend-grid-module-test-application depends on postgresql-8.4; however:
Package postgresql-8.4 is not installed.
dpkg: error processing zend-grid-module-test-application (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
zend-grid-module-test-application
在那之后:
$ sudo apt-get install -y -f
输出
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
zend-grid-module-test-application
The following packages will be upgraded:
zend-grid-module-test-application
1 upgraded, 0 newly installed, 0 to remove and 36 not upgraded.
1 not fully installed or removed.
Need to get 0B/43.8kB of archives.
After this operation, 238kB disk space will be freed.
(Reading database ... 25618 files and directories currently installed.)
Preparing to replace zend-grid-module-test-application 1.0.2-2 (using .../zend-grid-module-test-application_1.0.2-2_all.deb) ...
Unpacking replacement zend-grid-module-test-application ...
Setting up zend-grid-module-test-application (1.0.2-2) ...
我没有看到 postgresql 依赖关系得到解决,尽管我希望它能够安装apt-get install -f -y
我有什么想法吗?
答案1
这是解释所发生情况的关键输出行:
The following packages will be upgraded:
zend-grid-module-test-application
apt-get 找到了一个不同的(更新的,或者至少相同的)版本,zend-grid-module-test-application
可以安装在您的sources.list
.apt-cache policy zend-grid-module-test-application
会告诉你是哪一个。
然后 apt-get 继续安装该版本(毕竟它是更新的!)而不是您尝试使用的版本dpkg -i
。并且 apt-get 找到的那个不依赖于postgresql-8.4
.
debian/changelog
最有可能的是,您需要在运行之前升级版本dpkg-buildpackage
。如果您安装了它,dch
它将帮助您。
答案2
您的存储库中还有 8.4 版的 postgres 吗?
我在最新版本的 Ubuntu 中没有它们,这可能就是 apt-get 无法解析的原因。