同様の問題を抱えたいくつかの質問に目を通しましたが、どの解決策も機能していません。問題は次のとおりです。
$ sudo apt-get Install g++
The following packges have unmet dependencies:
g++ : Depends:g++-4.8 (>= 4.8.2-5~) but it is not going to be installed
E:Unable to correct problems, you have held broken packages.
私が試した他の質問から:
sudo apt-get update
sudo app-get -f Install*
sudo apt-cache policy g++-4.8
g++-4.8:
Installed: (none)
Candidate: 4.8.2-19ubuntu1
Version table:
4.8.2-19ubuntu1 0
500 http://ca.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
$ sudo apt-get install g++-4.8
The following packages have unmet dependencies:
g++-4.8 : Depends: gcc-4.8-base (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 is to be installed
Depends: gcc-4.8 (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 is to be installed
Depends: libstdc++-4.8-dev (= 4.8.2-19ubuntu1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
$ apt-cache policy gcc-4.8-base gcc-4.8 libstdc++-4.8-dev; sudo apt-get install gcc-4.8-base gcc-4.8 libstdc++-4.8-dev
gcc-4.8-base and gcc-4.8 Installed=Candidate
but
libstdc++-4.8-dev:
Installed: (none)
Candidate: 4.8.2-19ubuntu1
Version Table:
4.8.2-19ubuntu1 0
500 http//:archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
私はこれらすべてにまったく慣れておらず、フラッシュドライブからubuntuを実行しており、g ++をインストールする必要があります。どんな助けでも大歓迎です。
試した提案から:
sudo-apt get install aptitude
多くのエラーがすべて言っています 'Could not resolve archive.ubuntu.com'
ついにそれを理解した。ありがとう@sinclair
別のものに私のワイヤレスネットワークを変更することでネットワークの問題を解決して、走ったsudo apt-get install aptitude
後、sudo aptitude install build-essentials
最初に失敗したが、それは私の格下げのオプションとその固定にすべてを与えたトラブルシューティングに建てスルーいます。これで、必要なg ++ができました。
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加