我想在我的服务器上添加对PHP5的命令行支持。 当我运行aptitude install php5-cli我收到一条消息,说我的PHP模块/软件包有未满足的依赖关系。
以下是受到这些“未满足的依赖性”和需求的升级的软件包列表:
他们都依赖于php5-common。
我可以像aptitudebuild议一样升级软件包,而不会对现场造成任何干扰吗?
从aptitude输出
Reading package lists... Done Building dependency tree Reading state information... Done Reading extended state information Initialising package states... Done The following packages are BROKEN: libapache2-mod-php5 php5-cgi php5-curl php5-gd php5-mysql The following NEW packages will be installed: php5-cli The following packages will be upgraded: php5-common 1 packages upgraded, 1 newly installed, 0 to remove and 123 not upgraded. Need to get 3,511kB of archives. After unpacking 7,803kB will be used. The following packages have unmet dependencies: php5-gd: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed. php5-curl: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed. php5-mysql: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed. php5-cgi: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed. libapache2-mod-php5: Depends: php5-common (= 5.3.3-1ubuntu12~lucid) but 5.3.5-1ubuntu7.2ppa1~lucid is to be installed. The following actions will resolve these dependencies: Upgrade the following packages: libapache2-mod-php5 [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)] php5-cgi [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)] php5-curl [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)] php5-gd [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)] php5-mysql [5.3.3-1ubuntu12~lucid (now) -> 5.3.5-1ubuntu7.2ppa1~lucid (lucid)] Score is 340
也许我的答案是! 😉
PHP 5.3.3到5.3.5应该没有关系。 也就是说,除非Ubuntu / Debian做了一些额外的疯狂。 但是,点释放(例如5.3.x到5.3.y)不应该破坏一个function集。
也就是说,希望你没有做出疯狂的攻击,例如依靠5.3.3中固定的漏洞,因此会导致回归。 testing这个最简单的方法是启动一个testing虚拟机,看看你的网站是否工作(甚至更好:你的testing套件运行)。
另一个窍门是尝试安装5.3.3 – 这是一个想法(注意我的版本是不同的):
# apt-cache showpkg php5-cli Package: php5-cli Versions: 5.2.10.dfsg.1-2ubuntu6.10 ...
(我截断了输出。)
然后安装:
# apt-get install php5-cli=5.2.10.dfsg.1-2ubuntu6.10 ...
HTH
您正在使用Nginx PPA,Aptitude会尝试更新新版本的软件包。 如果你想从Ubuntu资源库安装php5-cli,你必须使用aptitude install php5-cli=5.3.3-1ubuntu12~lucid 。