Saya mencoba menginstal paket gcc-7 terbaru dari PPA Jonathon F. Sepertinya akhirnya sekarang ada build yang berhasil untuk amd64 pada 23-02-2018.
Saya menemui masalah ketergantungan berikut saat menjalankan sudo apt-get install gcc-7
.
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.
gcc-7 : Depends: cpp-7 (= 7.3.0-5ubuntu1~16.04.york0) but it is not going to be installed
Depends: gcc-7-base (= 7.3.0-5ubuntu1~16.04.york0) but 7.2.0-1ubuntu1~16.04 is to be installed
Depends: libcc1-0 (>= 7.3.0-5ubuntu1~16.04.york0) but 7.2.0-1ubuntu1~16.04 is to be installed
Depends: binutils (>= 2.28) but 2.26.1-1ubuntu1~16.04.6 is to be installed
Depends: libgcc-7-dev (= 7.3.0-5ubuntu1~16.04.york0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Sebelumnya, saya menginstal gcc-7
dari ppa Ubuntu tapi itu untuk 7.2
. Saya telah menghapus paket itu.
Menjalankan Synaptic, berikut daftar paket mencurigakan:
Adakah saran tentang cara mengatasi masalah ketergantungan ini dan menginstal gcc 7.3?
Jawaban yang Diterima:
Tampaknya gcc-7 (7.3) rusak di GCC 7.3 PPA Jonathon F. Saya tidak dapat menginstal GCC 7.3 pada sistem Xenial yang bersih (tanpa PPA lain):
$ sudo add-apt-repository -y ppa:jonathonf/gcc-7.3
$ sudo apt-get update
$ sudo apt-get install gcc-7
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:
gcc-7 : Depends: libcc1-0 (>= 7.3.0-5ubuntu1~16.04.york0) but 5.4.0-6ubuntu1~16.04.9 is to be installed
Depends: binutils (>= 2.28) but 2.26.1-1ubuntu1~16.04.6 is to be installed
Depends: libgcc-7-dev (= 7.3.0-5ubuntu1~16.04.york0) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
$ grep -r ppa /etc/apt/sources.list*
/etc/apt/sources.list.d/jonathonf-ubuntu-gcc-7_3-xenial.list:deb http://ppa.launchpad.net/jonathonf/gcc-7.3/ubuntu xenial main
/etc/apt/sources.list.d/jonathonf-ubuntu-gcc-7_3-xenial.list:# deb-src http://ppa.launchpad.net/jonathonf/gcc-7.3/ubuntu xenial main
Jadi, Anda harus membersihkan PPA ini dan menggunakan gcc 7.2 dari tim “PPA for Ubuntu Toolchain Uploads (restricted)”:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:jonathonf/gcc-7.3
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-7
sudo apt-get install -f
Kemudian hubungi Jonathon F dan beri tahu dia tentang masalahnya.
Terkait:Bagaimana cara kerja Tong Sampah, dan di mana saya dapat menemukan dokumentasi resmi, referensi, atau spesifikasi untuknya?
Pembaruan. Tetapi saya menemukan ppa:jonathonf/gcc
PPA lainnya dari Jonathon F. Saya dapat menginstal gcc 7.3 darinya.
#sudo ppa-purge ppa:ubuntu-toolchain-r/test # remove starting # if PPA added before
#sudo ppa-purge ppa:jonathonf/gcc-7.3 # remove starting # if PPA added before
sudo add-apt-repository -y ppa:jonathonf/gcc
sudo apt-get update
sudo apt-get install gcc-7 # will install 7.3.0-5ubuntu1~16.04.york0
dan bahkan gcc-8
(versi 8-20180218-1ubuntu1~16.04.york0 ).