【问题标题】:Install imap extension for php 5.3.3-7+squeeze17为 php 5.3.3-7+squeeze17 安装 imap 扩展
【发布时间】:2015-05-13 08:59:24
【问题描述】:

服务器已安装 debian wheezy 操作系统。 php版本为php5.3:

 user@example:~# php -v
 PHP 5.3.3-7+squeeze17 with Suhosin-Patch (cli) (built: Aug 23 2013 15:06:16) 

我尝试通过 apt-get 安装 imap 扩展,结果是:

user@example:~# apt-get install php5-imap=5.3.3-7+squeeze17
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '5.3.3-7+squeeze17' for 'php5-imap' was not found

当我尝试另一个版本时,我得到:

user@example:~# apt-get install php5-imap=5.3.3-7+squeeze19
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:
 php5-imap : Depends: php5-common (= 5.3.3-7+squeeze19) but 5.3.3-7+squeeze17 is to be installed
E: Unable to correct problems, you have held broken packages.

有人知道在这种情况下安装 php5-imap 最安全的方法吗? 附:从 wheezy repo 更新到 5.4 不是解决方案:(

【问题讨论】:

    标签: php debian imap php-extension apt-get


    【解决方案1】:

    我通过调用使用 imaplib (http://pymotw.com/2/imaplib/) 的外部 python 脚本解决了这个问题。 从php调用python示例:

     <? exec("python <ABSOLUTE_PATH_TO_SCRIPT>.py " . escapeshellarg($arg1));
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-06-29
      • 2018-04-07
      • 2014-07-15
      • 2015-04-28
      • 2019-02-14
      • 1970-01-01
      相关资源
      最近更新 更多