2016-10-23 76 views
2

我試圖安裝使用sudo apt-get install qtbase5-dev的QT5開發庫安裝qtbase5-dev的,但我得到一個錯誤:錯誤當試圖在Ubuntu

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: 
qtbase5-dev : Depends: libgles2-mesa-dev or 
         libgles2-dev but it is not installable 
       Depends: libqt5gui5 (= 5.2.1+dfsg-1ubuntu14.3) but it is not going to be installed 
       Depends: libqt5printsupport5 (= 5.2.1+dfsg-1ubuntu14.3) but it is not going to be installed 
       Depends: libqt5widgets5 (= 5.2.1+dfsg-1ubuntu14.3) but it is not going to be installed 
       Recommends: libqt5opengl5-dev (= 5.2.1+dfsg-1ubuntu14.3) but it is not going to be installed 
E: Unable to correct problems, you have held broken packages.

問題是我不舉行包 - 我使用dpkg --get-selections | grep hold進行了檢查,但沒有顯示任何內容。

+0

任何特定的原因,你使用的是Qt版本中的古代Qt版本,而不是Qt網站上的更新版本。 – dtech

+1

@ddriver對不起,但我不太明白。你問我爲什麼使用'apt-get'?它只是它在Ubuntu上的默認包管理器,並使用它「正常工作」(當然不是這種情況)。 – sashoalm

+0

我在問你爲什麼使用近3年的Qt版本。在大多數情況下,apt都可以,但在Qt版本上卻落後了。 – dtech

回答

0

手動安裝libgles2-mesa-dev,然後qtbase5-dev工作。我不得不在不同的命令中運行它:

sudo apt-get install libgles2-mesa-dev 
sudo apt-get install qtbase5-dev 
1

對我來說,這是由於安裝了oibaf圖形PPA引起的。

sudo apt-get install ppa-purge

sudo ppa-purge ppa:oibaf/graphics-drivers

將恢復到股票圖形庫。