2016-06-10 76 views
2

我在Ubuntu上將MySQL版本從5.5升級到5.7。在將MySQL升級到v5.7後,Ubuntu有問題

但是,之後沒有任何與mysql有關的工作。我也更新了php5-mysql包。

我發現我要安裝php5-mysqlnd包使用命令sudo apt-get install php5-mysqlnd。但是,它不能被安裝。消息:

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 resolve the situation: 

The following packages have unmet dependencies: 
php5-mysqlnd : Depends: phpapi-20121212 
       Depends: php5-common (= 5.5.36+dfsg-1+donate.sury.org~trusty+1) but 5.6.18+dfsg-1+deb.sury.org~trusty+1 is to be installed 
E: Unable to correct problems, you have held broken packages. 

我的PHP版本5.6.18-1 + deb.sury.org〜可信賴+ 1

+5

它看起來像您使用自定義存儲庫'donate.sury.org',請在問題中添加您的'apt'配置。並嘗試使用默認存儲庫? –

回答

1

你必須從一個資源庫的封裝中,並從主存儲庫中一些人。此外,這是錯誤的地方,其中一些軟件包是,保存爲。你選擇對其進行升級:

php5-mysqlnd : Depends: phpapi-20121212 
       Depends: php5-common (= 5.5.36...) but 5.6.18... is to be 
         installed 
E: Unable to correct problems, you have held broken packages. 

什麼可能發生

在以前的升級,該系統有一個錯誤,並提出了一些決議,其中之一是200英鎊,「 ...繼續並打破依賴關係「。你選擇了那一個 - 即,你向APT簽署了一份棄權聲明,「我永遠不會升級」。

現在你想要做到這一點 - 你不再可以。

你需要做的

您需要確定那些持有包,確定他們爲什麼舉行,並相應地升級它們;或者返回到MySQL 5.5,如果一些更重要的依賴將被打破。

apt-get update 

apt-get --ignore-hold --dry-run upgrade 

會告訴你如果你嘗試升級那些當前包含的軟件包會發生什麼。您也可以嘗試--fix-missing--fix-broken選項。但是,你需要的最重要的答案是,爲什麼這些軟件包在第一位

如果你只是繼續並忽略持有的軟件包,就有可能破壞一些不易修復的事情。當我無意中升級了一個需要訪問特定且非常挑剔的存儲庫的緩存Subversion包時,我曾這樣做過。升級完成,但是我不能再提交源代碼更改。