[SOLVED] Mint 19 Cinnamon unable to install gcc-8

Questions about applications and software
Forum rules
Before you post please read how to get help
deepakdeshp
Level 11
Level 11
Posts: 3707
Joined: Sun Aug 09, 2015 10:00 am

[SOLVED] Mint 19 Cinnamon unable to install gcc-8

Post by deepakdeshp » Tue Aug 14, 2018 1:03 pm

Hello,

My attempts to install gcc-8 has failed. Any help is accepted with thanks.

Code: Select all

sudo apt install gcc-8
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-8 : Depends: cpp-8 (= 8.1.0-1ubuntu1) but 8.1.0-5ubuntu1~16.04 is to be installed
         Depends: gcc-8-base (= 8.1.0-1ubuntu1) but 8.1.0-5ubuntu1~16.04 is to be installed
         Depends: libgcc-8-dev (= 8.1.0-1ubuntu1) but 8.1.0-5ubuntu1~16.04 is to be installed
E: Unable to correct problems, you have held broken packages.
uma@mint-18-uma /usr/bin $ sudo apt install libgcc-8-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libgcc-8-dev is already the newest version (8.1.0-5ubuntu1~16.04).
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
uma@mint-18-uma /usr/bin $ sudo apt install gcc-8-base
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcc-8-base is already the newest version (8.1.0-5ubuntu1~16.04).
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
uma@mint-18-uma /usr/bin $ sudo apt install cpp-8
Reading package lists... Done
Building dependency tree       
Reading state information... Done
cpp-8 is already the newest version (8.1.0-5ubuntu1~16.04).
0 upgraded, 0 newly installed, 0 to remove and 8 not upgraded.
Last edited by deepakdeshp on Sat Aug 18, 2018 9:52 am, edited 1 time in total.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

User avatar
xenopeek
Level 24
Level 24
Posts: 22769
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Mint 19 Cinnamon unable to install gcc-8

Post by xenopeek » Tue Aug 14, 2018 2:34 pm

It shows your system is trying to install package meant for Ubuntu 16.04 while Linux Mint 19 is based on Ubuntu 18.04. I guess you upgraded in place from Linux Mint 18.3 and had added some PPA related to GCC previously on that?

If that isn't enough of a hint for your to figure it out in Software Sources yourself, please share the output of the following command so we can help with that:
inxi -Sr
Image

deepakdeshp
Level 11
Level 11
Posts: 3707
Joined: Sun Aug 09, 2015 10:00 am

Re: Mint 19 Cinnamon unable to install gcc-8

Post by deepakdeshp » Wed Aug 15, 2018 11:21 am

You are correct! I had added the ppa, since apt install gcc-8 didnt work. update-toolchain-r/test was the ppa I had added , but it didnt help.

Code: Select all

inxi -Sr
System:    Host: mint-18-uma Kernel: 4.18.0-041800-generic x86_64 bits: 64
           Desktop: Cinnamon 3.8.8  Distro: Linux Mint 19 Tara
Repos:     Active apt sources in file: /etc/apt/sources.list.d/official-package-repositories.list
           deb http://mirrors.evowise.com/linuxmint/packages tara main upstream import backport
           deb http://mirror.cse.iitk.ac.in/ubuntu bionic main restricted universe multiverse
           deb http://mirror.cse.iitk.ac.in/ubuntu bionic-updates main restricted universe multiverse
           deb http://mirror.cse.iitk.ac.in/ubuntu bionic-backports main restricted universe multiverse
           deb http://security.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
           deb http://archive.canonical.com/ubuntu/ bionic partner
           Active apt sources in file: /etc/apt/sources.list.d/ubuntu-toolchain-r-test-bionic.list
           deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic main
           deb-src http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic main
           Active apt sources in file: /etc/apt/sources.list.d/webupd8team-java-bionic.list
           deb http://ppa.launchpad.net/webupd8team/java/ubuntu bionic main
           deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu bionic main
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

User avatar
xenopeek
Level 24
Level 24
Posts: 22769
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Mint 19 Cinnamon unable to install gcc-8

Post by xenopeek » Wed Aug 15, 2018 12:14 pm

Please share output of:
apt policy cpp-8
Image

deepakdeshp
Level 11
Level 11
Posts: 3707
Joined: Sun Aug 09, 2015 10:00 am

Re: Mint 19 Cinnamon unable to install gcc-8

Post by deepakdeshp » Wed Aug 15, 2018 2:19 pm

Hello,
Please find the result.

Code: Select all

apt policy cpp-8
cpp-8:
  Installed: 8.1.0-5ubuntu1~16.04
  Candidate: 8.1.0-5ubuntu1~16.04
  Version table:
 *** 8.1.0-5ubuntu1~16.04 100
        100 /var/lib/dpkg/status
     8.1.0-1ubuntu1 500
        500 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main amd64 Packages
     8-20180414-1ubuntu2 500
        500 http://mirror.cse.iitk.ac.in/ubuntu bionic/universe amd64 Packages
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

User avatar
xenopeek
Level 24
Level 24
Posts: 22769
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Mint 19 Cinnamon unable to install gcc-8

Post by xenopeek » Wed Aug 15, 2018 2:49 pm

For a first, I'd suggest to disable the update-toolchain-r/test PPA for now. You can do that in Software Sources.

Next I think we'll have to find all packages originally installed from 16.04 repository and force reinstall them all from 18.04 repository. That should get around the problem of unmet dependencies.

To find all packages, I think this command will do it:
dpkg -l | fgrep '~16.04'
Can you share the output of that?
Image

deepakdeshp
Level 11
Level 11
Posts: 3707
Joined: Sun Aug 09, 2015 10:00 am

Re: Mint 19 Cinnamon unable to install gcc-8

Post by deepakdeshp » Wed Aug 15, 2018 3:14 pm

xenopeek wrote:
Wed Aug 15, 2018 2:49 pm
For a first, I'd suggest to disable the update-toolchain-r/test PPA for now. You can do that in Software Sources.

Next I think we'll have to find all packages originally installed from 16.04 repository and force reinstall them all from 18.04 repository. That should get around the problem of unmet dependencies.

To find all packages, I think this command will do it:
dpkg -l | fgrep '~16.04'
Can you share the output of that?
Thank you for the reply.

Code: Select all

dpkg -l | fgrep '~16.04'
ii  cpp-7                                             7.3.0-21ubuntu1~16.04                                   amd64        GNU C preprocessor
ii  cpp-8                                             8.1.0-5ubuntu1~16.04                                    amd64        GNU C preprocessor
ii  gcc-7                                             7.3.0-21ubuntu1~16.04                                   amd64        GNU C compiler
ii  gcc-7-base:amd64                                  7.3.0-21ubuntu1~16.04                                   amd64        GCC, the GNU Compiler Collection (base package)
ii  gcc-7-base:i386                                   7.3.0-21ubuntu1~16.04                                   i386         GCC, the GNU Compiler Collection (base package)
ii  gcc-8-base:amd64                                  8.1.0-5ubuntu1~16.04                                    amd64        GCC, the GNU Compiler Collection (base package)
ii  gcc-8-base:i386                                   8.1.0-5ubuntu1~16.04                                    i386         GCC, the GNU Compiler Collection (base package)
ii  libasan4:amd64                                    7.3.0-21ubuntu1~16.04                                   amd64        AddressSanitizer -- a fast memory error detector
ii  libasan5:amd64                                    8.1.0-5ubuntu1~16.04                                    amd64        AddressSanitizer -- a fast memory error detector
ii  libatomic1:amd64                                  8.1.0-5ubuntu1~16.04                                    amd64        support library providing __atomic built-in functions
ii  libcc1-0:amd64                                    8.1.0-5ubuntu1~16.04                                    amd64        GCC cc1 plugin for GDB
ii  libcilkrts5:amd64                                 7.3.0-21ubuntu1~16.04                                   amd64        Intel Cilk Plus language extensions (runtime)
ii  libgcc-7-dev:amd64                                7.3.0-21ubuntu1~16.04                                   amd64        GCC support library (development files)
ii  libgcc-8-dev:amd64                                8.1.0-5ubuntu1~16.04                                    amd64        GCC support library (development files)
ii  libgcc1:amd64                                     1:8.1.0-5ubuntu1~16.04                                  amd64        GCC support library
ii  libgcc1:i386                                      1:8.1.0-5ubuntu1~16.04                                  i386         GCC support library
ii  libgomp1:amd64                                    8.1.0-5ubuntu1~16.04                                    amd64        GCC OpenMP (GOMP) support library
ii  libitm1:amd64                                     8.1.0-5ubuntu1~16.04                                    amd64        GNU Transactional Memory Library
ii  liblsan0:amd64                                    8.1.0-5ubuntu1~16.04                                    amd64        LeakSanitizer -- a memory leak detector (runtime)
ii  libmpx2:amd64                                     8.1.0-5ubuntu1~16.04                                    amd64        Intel memory protection extensions (runtime)
ii  libpython3.5:amd64                                3.5.2-2ubuntu0~16.04.4                                  amd64        Shared Python runtime library (version 3.5)
ii  libpython3.5-dev:amd64                            3.5.2-2ubuntu0~16.04.4                                  amd64        Header files and a static library for Python (v3.5)
ii  libpython3.5-minimal:amd64                        3.5.2-2ubuntu0~16.04.4                                  amd64        Minimal subset of the Python language (version 3.5)
ii  libpython3.5-stdlib:amd64                         3.5.2-2ubuntu0~16.04.4                                  amd64        Interactive high-level object-oriented language (standard library, version 3.5)
ii  libquadmath0:amd64                                8.1.0-5ubuntu1~16.04                                    amd64        GCC Quad-Precision Math Library
ii  libruby2.3:amd64                                  2.3.1-2~16.04.10                                        amd64        Libraries necessary to run Ruby 2.3
ii  libstdc++6:amd64                                  8.1.0-5ubuntu1~16.04                                    amd64        GNU Standard C++ Library v3
ii  libstdc++6:i386                                   8.1.0-5ubuntu1~16.04                                    i386         GNU Standard C++ Library v3
ii  libtsan0:amd64                                    8.1.0-5ubuntu1~16.04                                    amd64        ThreadSanitizer -- a Valgrind-based detector of data races (runtime)
ii  libubsan0:amd64                                   7.3.0-21ubuntu1~16.04                                   amd64        UBSan -- undefined behaviour sanitizer (runtime)
ii  libubsan1:amd64                                   8.1.0-5ubuntu1~16.04                                    amd64        UBSan -- undefined behaviour sanitizer (runtime)
rc  linux-image-4.10.0-40-generic                     4.10.0-40.44~16.04.1                                    amd64        Linux kernel image for version 4.10.0 on 64 bit x86 SMP
rc  linux-image-4.8.0-34-generic                      4.8.0-34.36~16.04.1                                     amd64        Linux kernel image for version 4.8.0 on 64 bit x86 SMP
rc  linux-image-extra-4.10.0-40-generic               4.10.0-40.44~16.04.1                                    amd64        Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
rc  linux-image-extra-4.8.0-34-generic                4.8.0-34.36~16.04.1                                     amd64        Linux kernel extra modules for version 4.8.0 on 64 bit x86 SMP
ii  python3.5                                         3.5.2-2ubuntu0~16.04.4                                  amd64        Interactive high-level object-oriented language (version 3.5)
ii  python3.5-dev                                     3.5.2-2ubuntu0~16.04.4                                  amd64        Header files and a static library for Python (v3.5)
ii  python3.5-minimal                                 3.5.2-2ubuntu0~16.04.4                                  amd64        Minimal subset of the Python language (version 3.5)
ii  ruby2.3                                           2.3.1-2~16.04.10                                        amd64        Interpreter of object-oriented scripting language Ruby
rc  shim-signed                                       1.32~16.04.1+0.9+1474479173.6c180c6-1ubuntu1+linuxmint1 amd64        Secure Boot chain-loading bootloader (Microsoft-signed binary)
ii  vim                                               2:8.1.0115-0york1~16.04                                 amd64        Vi IMproved - enhanced vi editor
ii  vim-common                                        2:8.1.0115-0york1~16.04                                 all          Vi IMproved - Common files
rc  vim-nox                                           2:8.1.0115-0york1~16.04                                 amd64        Vi IMproved - enhanced vi editor - with scripting languages support
ii  vim-runtime                                       2:8.1.0115-0york1~16.04                                 all          Vi IMproved - Runtime files
ii  vim-tiny                                          2:8.1.0115-0york1~16.04                                 amd64        Vi IMproved - enhanced vi editor - compact version
ii  xxd                                               2:8.1.0115-0york1~16.04                                 amd64        tool to make (or reverse) a hex dump
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

User avatar
xenopeek
Level 24
Level 24
Posts: 22769
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Mint 19 Cinnamon unable to install gcc-8

Post by xenopeek » Wed Aug 15, 2018 3:27 pm

First do:
apt update

Then try if you can get all these packages reinstalled from the Ubuntu 18.04 (Bionic) repository (they are currently installed from a repository intended for Ubuntu 16.04 that is no longer configured on your system):

Code: Select all

sudo apt-get install -t bionic cpp-8 gcc-8-base gcc-8-base:i386 libasan5 libatomic1 libcc1-0 libgcc-8-dev libgcc1 libgcc1:i386 libgomp1 libitm1 liblsan0 libmpx2 libquadmath0 libstdc++6 libstdc++6:i386 libtsan0 libubsan1
If that doesn't work, try it with this command to force specific versions:

Code: Select all

sudo apt-get install cpp-8=8-20180414-1ubuntu2 gcc-8-base=8-20180414-1ubuntu2 gcc-8-base:i386=8-20180414-1ubuntu2 libasan5=8-20180414-1ubuntu2 libatomic1=8-20180414-1ubuntu2 libcc1-0=8-20180414-1ubuntu2 libgcc-8-dev=8-20180414-1ubuntu2 libgcc1=8-20180414-1ubuntu2 libgcc1:i386=8-20180414-1ubuntu2 libgomp1=8-20180414-1ubuntu2 libitm1=8-20180414-1ubuntu2 liblsan0=8-20180414-1ubuntu2 libmpx2=8-20180414-1ubuntu2 libquadmath0=8-20180414-1ubuntu2 libstdc++6=8-20180414-1ubuntu2 libstdc++6:i386=8-20180414-1ubuntu2 libtsan0=8-20180414-1ubuntu2 libubsan1=8-20180414-1ubuntu2
Image

deepakdeshp
Level 11
Level 11
Posts: 3707
Joined: Sun Aug 09, 2015 10:00 am

Re: Mint 19 Cinnamon unable to install gcc-8

Post by deepakdeshp » Thu Aug 16, 2018 8:37 am

xenopeek wrote:
Wed Aug 15, 2018 3:27 pm
First do:
apt update

Then try if you can get all these packages reinstalled from the Ubuntu 18.04 (Bionic) repository (they are currently installed from a repository intended for Ubuntu 16.04 that is no longer configured on your system):

Code: Select all

sudo apt-get install -t bionic cpp-8 gcc-8-base gcc-8-base:i386 libasan5 libatomic1 libcc1-0 libgcc-8-dev libgcc1 libgcc1:i386 libgomp1 libitm1 liblsan0 libmpx2 libquadmath0 libstdc++6 libstdc++6:i386 libtsan0 libubsan1
This gave a messages that all the packages have latest versions hence no action took place.f that doesn't work, try it with this command to force specific versions:

Code: Select all

sudo apt-get install cpp-8=8-20180414-1ubuntu2 gcc-8-base=8-20180414-1ubuntu2 gcc-8-base:i386=8-20180414-1ubuntu2 libasan5=8-20180414-1ubuntu2 libatomic1=8-20180414-1ubuntu2 libcc1-0=8-20180414-1ubuntu2 libgcc-8-dev=8-20180414-1ubuntu2 libgcc1=8-20180414-1ubuntu2 libgcc1:i386=8-20180414-1ubuntu2 libgomp1=8-20180414-1ubuntu2 libitm1=8-20180414-1ubuntu2 liblsan0=8-20180414-1ubuntu2 libmpx2=8-20180414-1ubuntu2 libquadmath0=8-20180414-1ubuntu2 libstdc++6=8-20180414-1ubuntu2 libstdc++6:i386=8-20180414-1ubuntu2 libtsan0=8-20180414-1ubuntu2 libubsan1=8-20180414-1ubuntu2
It gave error

Code: Select all

Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Version '8-20180414-1ubuntu2' for 'libgcc1' was not found
E: Version '8-20180414-1ubuntu2' for 'libgcc1:i386' was not found
Then I deleted libgcc1 and libgcc1:386 entries and ran the apt install command without these packages, but it gave unmet dependency error. I tried a couple of things more but they didnt work out. Thank you so much for your patience.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

User avatar
xenopeek
Level 24
Level 24
Posts: 22769
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Mint 19 Cinnamon unable to install gcc-8

Post by xenopeek » Thu Aug 16, 2018 10:19 am

We just want to forget about the currently installed packages version—since there is no repository configured from which that version can be installed—and instead just install the version available from the configured repositories. It sounds trivial but I can't recall if/how to do this :(

Unless somebody has a better suggestion, I'd personally approach it with a blunt hammer: remove as many of these packages as you can. Reducing the scope of the issue.

Try removing them one at a time (apt purge packagename). If it won't let you remove it because one of the other packages on below list, at that one to the command (apt purge package1 package2) and so on. So long as you don't need to remove any other packages try to remove as many as you can.

cpp-8
gcc-8-base
gcc-8-base:i386
libasan5
libatomic1
libcc1-0
libgcc-8-dev
libgomp1
libitm1
liblsan0
libmpx2
libquadmath0
libstdc++6
libstdc++6:i386
libtsan0
libubsan1
Image

User avatar
xenopeek
Level 24
Level 24
Posts: 22769
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Mint 19 Cinnamon unable to install gcc-8

Post by xenopeek » Thu Aug 16, 2018 10:26 am

Another thing to figure out is if you still need the Python and Vim packages that are also from the wrong repository. Perhaps these are the ones that pulled in the other packages.

What does this say:
python3 --version
If it is, as it should be, Python 3.6.x then you can go ahead and remove the Python 3.5 packages because you no longer need them:
apt purge python3.5 python3.5-dev python3.5-minimal

Same for Ruby. What does this say:
ruby --version
It should say Ruby 2.5.x. If so, then you can remove the Ruby 2.3 package as that is obsoleted:
apt purge ruby2.3

For VIM I'd just remove all the packages and install it anew (including related xxd). It will downgrade you from VIM 8.1.x to VIM 8.0.x but at least you'll be using packages meant for Ubuntu 18.04 instead of 16.04 and have them from the default repository (so you get security updates). Remove:
apt purge vim vim-common vim-runtime vim-tiny xxd
And reinstall from the repository:
apt install vim vim-common vim-runtime vim-tiny xxd
Image

deepakdeshp
Level 11
Level 11
Posts: 3707
Joined: Sun Aug 09, 2015 10:00 am

Re: Mint 19 Cinnamon unable to install gcc-8

Post by deepakdeshp » Thu Aug 16, 2018 2:26 pm

xenopeek wrote:
Thu Aug 16, 2018 10:26 am
Another thing to figure out is if you still need the Python and Vim packages that are also from the wrong repository. Perhaps these are the ones that pulled in the other packages.

What does this say:
python3 --version
If it is, as it should be, Python 3.6.x then you can go ahead and remove the Python 3.5 packages because you no longer need them:
apt purge python3.5 python3.5-dev python3.5-minimal

Same for Ruby. What does this say:
ruby --version
It should say Ruby 2.5.x. If so, then you can remove the Ruby 2.3 package as that is obsoleted:
apt purge ruby2.3

For VIM I'd just remove all the packages and install it anew (including related xxd). It will downgrade you from VIM 8.1.x to VIM 8.0.x but at least you'll be using packages meant for Ubuntu 18.04 instead of 16.04 and have them from the default repository (so you get security updates). Remove:
apt purge vim vim-common vim-runtime vim-tiny xxd
And reinstall from the repository:
apt install vim vim-common vim-runtime vim-tiny xxd
Everything in the above post worked without a hitch.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

deepakdeshp
Level 11
Level 11
Posts: 3707
Joined: Sun Aug 09, 2015 10:00 am

Re: Mint 19 Cinnamon unable to install gcc-8

Post by deepakdeshp » Thu Aug 16, 2018 2:34 pm

xenopeek wrote:
Thu Aug 16, 2018 10:19 am
We just want to forget about the currently installed packages version—since there is no repository configured from which that version can be installed—and instead just install the version available from the configured repositories. It sounds trivial but I can't recall if/how to do this :(

Unless somebody has a better suggestion, I'd personally approach it with a blunt hammer: remove as many of these packages as you can. Reducing the scope of the issue.

Try removing them one at a time (apt purge packagename). If it won't let you remove it because one of the other packages on below list, at that one to the command (apt purge package1 package2) and so on. So long as you don't need to remove any other packages try to remove as many as you can.

cpp-8
gcc-8-base
gcc-8-base:i386
libasan5
libatomic1
libcc1-0
libgcc-8-dev
libgomp1
libitm1
liblsan0
libmpx2
libquadmath0
libstdc++6
libstdc++6:i386
libtsan0
libubsan1
As a first step I did

Code: Select all

sudo apt purge cpp-8 gcc-8-base gcc-8-base:i386
I wasnt able to remove gcc-8-base but I removed gcc-8-base:i386 .gcc-8-base:i386 had some 256 packages which were removed along with it.
Next step I tried installing gcc-8-base:i386 by

Code: Select all

sudo apt install gcc-8-base:i386
, but it gave error .I ventured to remove the 256 packages since I have a Clonezilla backup ready. I rebooted , everything seems to work.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

deepakdeshp
Level 11
Level 11
Posts: 3707
Joined: Sun Aug 09, 2015 10:00 am

Re: Mint 19 Cinnamon unable to install gcc-8

Post by deepakdeshp » Thu Aug 16, 2018 2:37 pm

I wasnt able to install cpp-8 too after its removal.
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

User avatar
xenopeek
Level 24
Level 24
Posts: 22769
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Mint 19 Cinnamon unable to install gcc-8

Post by xenopeek » Thu Aug 16, 2018 2:53 pm

Can you re-run this one and share its output?
dpkg -l | fgrep '~16.04'
Image

deepakdeshp
Level 11
Level 11
Posts: 3707
Joined: Sun Aug 09, 2015 10:00 am

Re: Mint 19 Cinnamon unable to install gcc-8

Post by deepakdeshp » Thu Aug 16, 2018 3:01 pm

xenopeek wrote:
Thu Aug 16, 2018 2:53 pm
Can you re-run this one and share its output?
dpkg -l | fgrep '~16.04'
I ran the purge command on only 3 packages as mentioned above. It was successful only on 2 of the 3. I ran apt install on both these, but it failed.

Code: Select all

dpkg -l | fgrep '~16.04'
ii  cpp-7                                             7.3.0-21ubuntu1~16.04                                   amd64        GNU C preprocessor
ii  gcc-7                                             7.3.0-21ubuntu1~16.04                                   amd64        GNU C compiler
ii  gcc-7-base:amd64                                  7.3.0-21ubuntu1~16.04                                   amd64        GCC, the GNU Compiler Collection (base package)
ii  gcc-7-base:i386                                   7.3.0-21ubuntu1~16.04                                   i386         GCC, the GNU Compiler Collection (base package)
ii  gcc-8-base:amd64                                  8.1.0-5ubuntu1~16.04                                    amd64        GCC, the GNU Compiler Collection (base package)
ii  libasan4:amd64                                    7.3.0-21ubuntu1~16.04                                   amd64        AddressSanitizer -- a fast memory error detector
ii  libasan5:amd64                                    8.1.0-5ubuntu1~16.04                                    amd64        AddressSanitizer -- a fast memory error detector
ii  libatomic1:amd64                                  8.1.0-5ubuntu1~16.04                                    amd64        support library providing __atomic built-in functions
ii  libcc1-0:amd64                                    8.1.0-5ubuntu1~16.04                                    amd64        GCC cc1 plugin for GDB
ii  libcilkrts5:amd64                                 7.3.0-21ubuntu1~16.04                                   amd64        Intel Cilk Plus language extensions (runtime)
ii  libgcc-7-dev:amd64                                7.3.0-21ubuntu1~16.04                                   amd64        GCC support library (development files)
ii  libgcc-8-dev:amd64                                8.1.0-5ubuntu1~16.04                                    amd64        GCC support library (development files)
ii  libgcc1:amd64                                     1:8.1.0-5ubuntu1~16.04                                  amd64        GCC support library
ii  libgomp1:amd64                                    8.1.0-5ubuntu1~16.04                                    amd64        GCC OpenMP (GOMP) support library
ii  libitm1:amd64                                     8.1.0-5ubuntu1~16.04                                    amd64        GNU Transactional Memory Library
ii  liblsan0:amd64                                    8.1.0-5ubuntu1~16.04                                    amd64        LeakSanitizer -- a memory leak detector (runtime)
ii  libmpx2:amd64                                     8.1.0-5ubuntu1~16.04                                    amd64        Intel memory protection extensions (runtime)
ii  libpython3.5:amd64                                3.5.2-2ubuntu0~16.04.4                                  amd64        Shared Python runtime library (version 3.5)
ii  libpython3.5-dev:amd64                            3.5.2-2ubuntu0~16.04.4                                  amd64        Header files and a static library for Python (v3.5)
ii  libpython3.5-minimal:amd64                        3.5.2-2ubuntu0~16.04.4                                  amd64        Minimal subset of the Python language (version 3.5)
ii  libpython3.5-stdlib:amd64                         3.5.2-2ubuntu0~16.04.4                                  amd64        Interactive high-level object-oriented language (standard library, version 3.5)
ii  libquadmath0:amd64                                8.1.0-5ubuntu1~16.04                                    amd64        GCC Quad-Precision Math Library
ii  libruby2.3:amd64                                  2.3.1-2~16.04.10                                        amd64        Libraries necessary to run Ruby 2.3
ii  libstdc++6:amd64                                  8.1.0-5ubuntu1~16.04                                    amd64        GNU Standard C++ Library v3
ii  libtsan0:amd64                                    8.1.0-5ubuntu1~16.04                                    amd64        ThreadSanitizer -- a Valgrind-based detector of data races (runtime)
ii  libubsan0:amd64                                   7.3.0-21ubuntu1~16.04                                   amd64        UBSan -- undefined behaviour sanitizer (runtime)
ii  libubsan1:amd64                                   8.1.0-5ubuntu1~16.04                                    amd64        UBSan -- undefined behaviour sanitizer (runtime)
rc  linux-image-4.10.0-40-generic                     4.10.0-40.44~16.04.1                                    amd64        Linux kernel image for version 4.10.0 on 64 bit x86 SMP
rc  linux-image-4.8.0-34-generic                      4.8.0-34.36~16.04.1                                     amd64        Linux kernel image for version 4.8.0 on 64 bit x86 SMP
rc  linux-image-extra-4.10.0-40-generic               4.10.0-40.44~16.04.1                                    amd64        Linux kernel extra modules for version 4.10.0 on 64 bit x86 SMP
rc  linux-image-extra-4.8.0-34-generic                4.8.0-34.36~16.04.1                                     amd64        Linux kernel extra modules for version 4.8.0 on 64 bit x86 SMP
rc  shim-signed                                       1.32~16.04.1+0.9+1474479173.6c180c6-1ubuntu1+linuxmint1 amd64        Secure Boot chain-loading bootloader (Microsoft-signed binary)
rc  vim-nox                                           2:8.1.0115-0york1~16.04                                 amd64        Vi IMproved - enhanced vi editor - with scripting languages support
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

User avatar
xenopeek
Level 24
Level 24
Posts: 22769
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Mint 19 Cinnamon unable to install gcc-8

Post by xenopeek » Thu Aug 16, 2018 3:48 pm

I missed you can also remove these Python 3.5 and Ruby 2.3 library packages:
apt purge libpython3.5 libpython3.5-dev libpython3.5-minimal libpython3.5-stdlib libruby2.3

For the rest, we have to split up gcc-7 related packages from gcc-8 related packages as these have a different base version. I hope this will work...

Try this to force install the gcc-7 related packages with the version from the repository:

Code: Select all

apt install cpp-7=7.3.0-16ubuntu3 gcc-7=7.3.0-16ubuntu3 gcc-7-base=7.3.0-16ubuntu3 gcc-7-base:i386=7.3.0-16ubuntu3 libasan4=7.3.0-16ubuntu3 libcilkrts5=7.3.0-16ubuntu3 libgcc-7-dev=7.3.0-16ubuntu3 libubsan0=7.3.0-16ubuntu3
If it throws some error or says doing this would break dependencies please share here.

If it works try it also for the gcc-8 related packages:

Code: Select all

apt install gcc-8-base=8-20180414-1ubuntu2 libasan5=8-20180414-1ubuntu2 libatomic1=8-20180414-1ubuntu2 libcc1-0=8-20180414-1ubuntu2 libgcc-8-dev=8-20180414-1ubuntu2 libgcc1=1:8-20180414-1ubuntu2 libgomp1=8-20180414-1ubuntu2 libitm1=8-20180414-1ubuntu2 liblsan0=8-20180414-1ubuntu2 libmpx2=8-20180414-1ubuntu2 libquadmath0=8-20180414-1ubuntu2 libstdc++6=8-20180414-1ubuntu2 libtsan0=8-20180414-1ubuntu2 libubsan1=8-20180414-1ubuntu2
If it throws some error or says doing this would break dependencies please share here.
Image

deepakdeshp
Level 11
Level 11
Posts: 3707
Joined: Sun Aug 09, 2015 10:00 am

Re: Mint 19 Cinnamon unable to install gcc-8

Post by deepakdeshp » Fri Aug 17, 2018 4:08 am

xenopeek wrote:
Thu Aug 16, 2018 3:48 pm
I missed you can also remove these Python 3.5 and Ruby 2.3 library packages:
apt purge libpython3.5 libpython3.5-dev libpython3.5-minimal libpython3.5-stdlib libruby2.3

For the rest, we have to split up gcc-7 related packages from gcc-8 related packages as these have a different base version. I hope this will work...

Try this to force install the gcc-7 related packages with the version from the repository:

Code: Select all

apt install cpp-7=7.3.0-16ubuntu3 gcc-7=7.3.0-16ubuntu3 gcc-7-base=7.3.0-16ubuntu3 gcc-7-base:i386=7.3.0-16ubuntu3 libasan4=7.3.0-16ubuntu3 libcilkrts5=7.3.0-16ubuntu3 libgcc-7-dev=7.3.0-16ubuntu3 libubsan0=7.3.0-16ubuntu3
If it throws some error or says doing this would break dependencies please share here.

If it works try it also for the gcc-8 related packages:

Code: Select all

apt install gcc-8-base=8-20180414-1ubuntu2 libasan5=8-20180414-1ubuntu2 libatomic1=8-20180414-1ubuntu2 libcc1-0=8-20180414-1ubuntu2 libgcc-8-dev=8-20180414-1ubuntu2 libgcc1=1:8-20180414-1ubuntu2 libgomp1=8-20180414-1ubuntu2 libitm1=8-20180414-1ubuntu2 liblsan0=8-20180414-1ubuntu2 libmpx2=8-20180414-1ubuntu2 libquadmath0=8-20180414-1ubuntu2 libstdc++6=8-20180414-1ubuntu2 libtsan0=8-20180414-1ubuntu2 libubsan1=8-20180414-1ubuntu2
If it throws some error or says doing this would break dependencies please share here.
All the steps in this worked but somehow it isnt finding gcc-8

Code: Select all

gcc-8 --version

Command 'gcc-8' not found, but can be installed with:

sudo apt install gcc-8

uma@mint-18-uma ~ $ gcc
gcc.1           gcc-ar-4.8      gcc-nm          gcc-ranlib
gcc-4.8         gcc-ar-5        gcc-nm-4.8      gcc-ranlib-4.8
gcc-5           gcc-ar-6        gcc-nm-5        gcc-ranlib-5
gcc-6           gcc-ar-7        gcc-nm-6        gcc-ranlib-6
gcc-7           gcc-ar-8        gcc-nm-7        gcc-ranlib-7
gcc-ar          gccgo-6         gcc-nm-8        gcc-ranlib-8

uma@mint-18-uma ~ $ sudo apt install gcc-8
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gcc-8 is already the newest version (8.1.0-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 13 not upgraded.
I need to install gcc-8.2 ,
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

User avatar
xenopeek
Level 24
Level 24
Posts: 22769
Joined: Wed Jul 06, 2011 3:58 am
Location: The Netherlands

Re: Mint 19 Cinnamon unable to install gcc-8

Post by xenopeek » Fri Aug 17, 2018 4:53 am

Try:
sudo apt-get install --reinstall gcc-8
Image

deepakdeshp
Level 11
Level 11
Posts: 3707
Joined: Sun Aug 09, 2015 10:00 am

Re: Mint 19 Cinnamon unable to install gcc-8

Post by deepakdeshp » Fri Aug 17, 2018 12:05 pm

xenopeek wrote:
Fri Aug 17, 2018 4:53 am
Try:
sudo apt-get install --reinstall gcc-8
I dont understand this.gcc-8 is successfully installed, yet not found.

Code: Select all

 sudo apt-get install --reinstall gcc-8
[sudo] password for uma: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 13 not upgraded.
Need to get 40.1 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu bionic/main amd64 gcc-8 amd64 8.1.0-1ubuntu1 [40.1 MB]
Fetched 40.1 MB in 3min 19s (202 kB/s)                                         
(Reading database ... 557066 files and directories currently installed.)
Preparing to unpack .../gcc-8_8.1.0-1ubuntu1_amd64.deb ...
Unpacking gcc-8 (8.1.0-1ubuntu1) over (8.1.0-1ubuntu1) ...
Setting up gcc-8 (8.1.0-1ubuntu1) ...
Processing triggers for man-db (2.8.3-2) ...
uma@mint-18-uma ~ $ gcc-8 --version

Command 'gcc-8' not found, but can be installed with:

sudo apt install gcc-8 
If I have helped you solve a problem, please add [SOLVED] to your first post title, it helps other users looking for help, and keeps the forum clean.
I am using Mint 19 Cinnamon 64 bit with AMD A8/7410 processor . Memory 8GB

Post Reply

Return to “Software & Applications”