簡體   English   中英

無法在Centos上安裝php-ZendFramework-Db-Adapter-Pdo-Mysql

[英]Cannot install php-ZendFramework-Db-Adapter-Pdo-Mysql on Centos

我已經在使用fedora的個人筆記本電腦上完成了一個zend項目,並將其轉移到了在CentOs發行版上運行的官方服務器上。 當我運行它時,我遇到了與fedora相同的問題,即:

[Wed Jan 27 21:04:28 2016] PHP Warning:  include_once(Zend/Db/Adapter/Pdo/Mysql.php): failed to open stream: No such file or directory in /usr/share/php/Zend/Loader.php on line 134
[Wed Jan 27 21:04:28 2016] PHP Warning:  include_once(): Failed opening 'Zend/Db/Adapter/Pdo/Mysql.php' for inclusion (include_path='/var/www/inference_assist/application/../library:/var/www/inference_assist/library:.:/usr/share/pear:/usr/share/php') in /usr/share/php/Zend/Loader.php on line 134
[Wed Jan 27 21:04:28 2016] PHP Warning:  include_once(Zend/Db/Adapter/Pdo/Mysql.php): failed to open stream: No such file or directory in /usr/share/php/Zend/Loader.php on line 134
[Wed Jan 27 21:04:28 2016] PHP Warning:  include_once(): Failed opening 'Zend/Db/Adapter/Pdo/Mysql.php' for inclusion (include_path='/var/www/inference_assist/application/../library:/var/www/inference_assist/library:.:/usr/share/pear:/usr/share/php') in /usr/share/php/Zend/Loader.php on line 134
[Wed Jan 27 21:04:28 2016] PHP Fatal error:  Uncaught exception 'Zend_Exception' with message 'File "Zend/Db/Adapter/Pdo/Mysql.php" does not exist or class "Zend_Db_Adapter_Pdo_Mysql" was not found in the file' in /usr/share/php/Zend/Loader.php:87
Stack trace:
#0 /usr/share/php/Zend/Db.php(263): Zend_Loader::loadClass('Zend_Db_Adapter...')
#1 /usr/share/php/Zend/Application/Resource/Db.php(142): Zend_Db::factory('PDO_MYSQL', Array)
#2 /usr/share/php/Zend/Application/Resource/Db.php(160): Zend_Application_Resource_Db->getDbAdapter()
#3 /usr/share/php/Zend/Application/Bootstrap/BootstrapAbstract.php(695): Zend_Application_Resource_Db->init()
#4 /usr/share/php/Zend/Application/Bootstrap/BootstrapAbstract.php(638): Zend_Application_Bootstrap_BootstrapAbstract->_executeResource('db')
#5 /usr/share/php/Zend/Application/Bootstrap/BootstrapAbstract.php(598): Zend_Application_Bootstrap_BootstrapAbstract->_bootstrap(NULL)
#6 /usr/share/php/Zend/Application.php(373): Zend_Application_Bootstrap_BootstrapAbstract->bootstrap(NULL)
#7 /var/www/inference_assist/public/ in /usr/share/php/Zend/Loader.php on line 87

我已經使用以下答案在fedora中解決了這個問題( Missing /Zend/Db/Adapter/Pdo/Mysql.php

但是,如果我在CentO上嘗試相同的操作,則會收到以下錯誤:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.optus.net
 * epel: kdeforge2.unl.edu
 * extras: mirror.optus.net
 * remi-safe: remi.conetix.com.au
 * updates: centos.mirror.crucial.com.au
 * webtatic: sp.repo.webtatic.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-ZendFramework-Db-Adapter-Pdo-Mysql.noarch 0:1.12.3-1.el6 will be installed
--> Processing Dependency: php-ZendFramework-Db-Adapter-Pdo = 1.12.3-1.el6 for package: php-ZendFramework-Db-Adapter-Pdo-Mysql-1.12.3-1.el6.noarch
--> Processing Dependency: php-ZendFramework = 1.12.3-1.el6 for package: php-ZendFramework-Db-Adapter-Pdo-Mysql-1.12.3-1.el6.noarch
--> Running transaction check
---> Package php-ZendFramework-Db-Adapter-Pdo.noarch 0:1.12.3-1.el6 will be installed
--> Processing Dependency: php-ZendFramework = 1.12.3-1.el6 for package: php-ZendFramework-Db-Adapter-Pdo-1.12.3-1.el6.noarch
---> Package php-ZendFramework-Db-Adapter-Pdo-Mysql.noarch 0:1.12.3-1.el6 will be installed
--> Processing Dependency: php-ZendFramework = 1.12.3-1.el6 for package: php-ZendFramework-Db-Adapter-Pdo-Mysql-1.12.3-1.el6.noarch
--> Finished Dependency Resolution
Error: Package: php-ZendFramework-Db-Adapter-Pdo-Mysql-1.12.3-1.el6.noarch (epel)
           Requires: php-ZendFramework = 1.12.3-1.el6
           Installed: php-ZendFramework-1.12.17-1.el6.remi.noarch (@remi)
               php-ZendFramework = 1.12.17-1.el6.remi
           Available: php-ZendFramework-1.12.3-1.el6.noarch (epel)
               php-ZendFramework = 1.12.3-1.el6
Error: Package: php-ZendFramework-Db-Adapter-Pdo-1.12.3-1.el6.noarch (epel)
           Requires: php-ZendFramework = 1.12.3-1.el6
           Installed: php-ZendFramework-1.12.17-1.el6.remi.noarch (@remi)
               php-ZendFramework = 1.12.17-1.el6.remi
           Available: php-ZendFramework-1.12.3-1.el6.noarch (epel)
               php-ZendFramework = 1.12.3-1.el6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我嘗試使用--skip-broken解決此問題,但無濟於事,輸入rpm -Va --nofiles --nodigest似乎什么都沒有。

誰能為上述錯誤提供解決方案/解釋?

經過幾個小時的搜索和實驗,我找到了答案:-我必須運行:-

yum --enablerepo=remi,remi-php54 install php-ZendFramework-Db-Adapter-Pdo-Mysql.noarch

不只是:-

 yum install php-ZendFramework-Db-Adapter-Pdo-Mysql

感謝這個答案( https://stackoverflow.com/a/21935770/4064854

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM