3

I am trying to make updates and installations and I keep getting errors like:

Err:1 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 cpp-8 amd64 8.3.0-6ubuntu1~18.04.1

What do I need to do to rectify these errors?

Here is the full attempt:

sudo apt install gcc-8
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  cpp-8 gcc-10-base gcc-9-base libasan5 libgcc-8-dev libgcc-s1 libubsan1
Suggested packages:
  gcc-8-locales gcc-8-multilib gcc-8-doc libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan5-dbg liblsan0-dbg libtsan0-dbg libubsan1-dbg
  libmpx2-dbg libquadmath0-dbg
The following NEW packages will be installed:
  cpp-8 gcc-10-base gcc-8 gcc-9-base libasan5 libgcc-8-dev libgcc-s1 libubsan1
0 upgraded, 8 newly installed, 0 to remove and 13 not upgraded.
Need to get 21.0 MB/21.6 MB of archives.
After this operation, 72.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 cpp-8 amd64 8.3.0-6ubuntu1~18.04.1
  404  Not Found [IP: 91.189.88.142 80]
Err:2 http://security.ubuntu.com/ubuntu bionic-security/main amd64 libgcc-8-dev amd64 8.3.0-6ubuntu1~18.04.1
  404  Not Found [IP: 91.189.88.142 80]
Err:3 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 gcc-8 amd64 8.3.0-6ubuntu1~18.04.1
  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/g/gcc-8/cpp-8_8.3.0-6ubuntu1~18.04.1_amd64.deb  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/g/gcc-8/libgcc-8-dev_8.3.0-6ubuntu1~18.04.1_amd64.deb  404  Not Found [IP: 91.189.88.142 80]
E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/universe/g/gcc-8/gcc-8_8.3.0-6ubuntu1~18.04.1_amd64.deb  404  Not Found [IP: 91.189.88.142 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing
____________________________________________________________________________________

Also the scroll wheel does not work, but I don't know if it associated with this problem.

Thank you

mikewhatever
  • 32,638
Patrick Ford
  • 31
  • 1
  • 1
  • 4

2 Answers2

8

As APT say 404 not found it means that repository information is outdated. You can easily solve it by issuing this command on terminal:

sudo apt update

Now retry to install your package and the installation process would be smooth.

  • Please see my response to Thunderbird.

    I got errors: E: Release file for http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu/dists/bionic/InRelease is not valid yet (invalid for another 3h 17min 28s). Updates for this repository will not be applied. ....

    – Patrick Ford May 19 '20 at 13:45
  • @PatrickFord The issue you are saying about is caused by incorrectly set time and timezone. Set your time and timezone accurately and try again. It should work now. – Akib Azmain Turja May 19 '20 at 15:44
  • Well my clock is off. The time zone is correct but the time is off by -5:22 and the only way to fix it is to turn off the internet updates. Spent the better part of an hour trying to get it working with chron and chrony.conf . sudo apt update went through, and now I appear to have a who new set of issues.

    Should I just do a clean reinstall Ubuntu?

    Thanks

    – Patrick Ford May 19 '20 at 17:07
  • @PatrickFord You should ask a new question so we (I and the community) can help you. Include every small details of your problem in the question (or your question may be closed as duplicate) and post comment here with the link and I will try to help. – Akib Azmain Turja May 20 '20 at 07:58
0

You need to update the repository data by executing sudo apt update before your installation. That is:

  1. sudo apt update.
  2. sudo apt install gcc-8.

Alternatively, you could just run:

sudo apt update && sudo apt install gcc-8

Note: It's a good practice to always execute updates before any installation.

ThunderBird
  • 1,955
  • I try above and I got 6 messages like the following indicating it didn't work.

    Reading package lists... Done
    E: Release file for http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu/dists/bionic/InRelease is not valid yet (invalid for another 3h 17min 28s). Updates for this repository will not be applied. ...

    I recall seeing this before: OK, how do I go about fixing this? I sounds like I need a new repository - which I also don't know how to do.

    – Patrick Ford May 19 '20 at 13:43