0

Whenever I try to do apt-get install/upgrade, I always get a series of errors like below. Is it because of some incorrect entries in /etc/apt/sources.list file. If so, how to correct it?

$ sudo apt-get -f install 
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Correcting dependencies... Done
    The following package was automatically installed and is no longer required:
      linux-image-extra-3.8.0-30-generic
    Use 'apt-get autoremove' to remove it.
    The following extra packages will be installed:
      libjavascriptcoregtk-1.0-0 libwebkitgtk-1.0-0 libwebkitgtk-1.0-common libxerces-c3.1
    Suggested packages:
      gstreamer1.0-ffmpeg
    The following NEW packages will be installed:
      libjavascriptcoregtk-1.0-0 libwebkitgtk-1.0-0 libwebkitgtk-1.0-common libxerces-c3.1
    0 upgraded, 4 newly installed, 0 to remove and 7 not upgraded.
    1 not fully installed or removed.
    Need to get 11.7 MB of archives.
    After this operation, 39.9 MB of additional disk space will be used.
    Do you want to continue [Y/n]? Y
    WARNING: The following packages cannot be authenticated!
      libxerces-c3.1 libjavascriptcoregtk-1.0-0 libwebkitgtk-1.0-common libwebkitgtk-1.0-0
    Install these packages without verification [y/N]? Y
    Err http://in.archive.ubuntu.com/ubuntu/ raring/universe libxerces-c3.1 amd64 3.1.1-3
      404  Not Found [IP: 91.189.91.23 80]
    Err http://in.archive.ubuntu.com/ubuntu/ raring/main libjavascriptcoregtk-1.0-0 amd64 1.10.2-0ubuntu1
      404  Not Found [IP: 91.189.91.23 80]
    Err http://in.archive.ubuntu.com/ubuntu/ raring/main libwebkitgtk-1.0-common all 1.10.2-0ubuntu1
      404  Not Found [IP: 91.189.91.23 80]
    Err http://in.archive.ubuntu.com/ubuntu/ raring/main libwebkitgtk-1.0-0 amd64 1.10.2-0ubuntu1
      404  Not Found [IP: 91.189.91.23 80]
    Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/universe/x/xerces-c/libxerces-c3.1_3.1.1-3_amd64.deb  404  Not Found [IP: 91.189.91.23 80]
    Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/w/webkit/libjavascriptcoregtk-1.0-0_1.10.2-0ubuntu1_amd64.deb  404  Not Found [IP: 91.189.91.23 80]
    Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/w/webkit/libwebkitgtk-1.0-common_1.10.2-0ubuntu1_all.deb  404  Not Found [IP: 91.189.91.23 80]
    Failed to fetch http://in.archive.ubuntu.com/ubuntu/pool/main/w/webkit/libwebkitgtk-1.0-0_1.10.2-0ubuntu1_amd64.deb  404  Not Found [IP: 91.189.91.23 80]
    E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
  • If you are using Ubuntu 13.04 (Raring Ringtail), please note that it has reached the EOL. Better to upgrade to Ubuntu 14.04 LTS or newer. – Ron Jul 25 '15 at 12:48
1
  1. First make sure that you have installed the applications gksu and leafpad

    Launch a terminal window.

Type (or copy/paste):

sudo apt-get install gksu leafpad

Press Enter and submit your password. Please note that the password will remain invisible, not even asterisks will show, which is normal.

2 . Then remove all sources that you have now:

Launch a terminal window.

Type (use copy/paste to avoid errors):

sudo rm -vf /etc/apt/sources.list.d/*.list && sudo rm -vf /etc/apt/sources.list

Press Enter. Type your password when prompted; this will remain entirely invisible, not even asterisks will show, which is normal.

  1. Create a new sources list:

Copy/paste the following command into the terminal:

gksudo leafpad /etc/apt/sources.list

Press Enter.

Now copy/paste all the text below, into that empty text file:

## SOURCES LIST FOR UBUNTU 14.04 LTS TRUSTY TAHR
## ALSO FOR XUBUNTU 14.04, LUBUNTU 14.04
## AND KUBUNTU 14.04
## From: http://sites.google.com/site/easylinuxtipsproject
## This list is for the Main server; you might want to select a
## faster mirror server closer to you, with Software & Updates.
## Only fit for 14.04 LTS Trusty Tahr!
#
## SOURCES FOR ORDINARY SOFTWARE:
deb http://archive.ubuntu.com/ubuntu trusty main
deb http://archive.ubuntu.com/ubuntu trusty-updates main
deb http://archive.ubuntu.com/ubuntu trusty restricted
deb http://archive.ubuntu.com/ubuntu trusty-updates restricted
deb http://archive.ubuntu.com/ubuntu trusty universe
deb http://archive.ubuntu.com/ubuntu trusty-updates universe
deb http://archive.ubuntu.com/ubuntu trusty multiverse
deb http://archive.ubuntu.com/ubuntu trusty-updates multiverse
#
## SOURCES FOR SECURITY UPDATES:
deb http://archive.ubuntu.com/ubuntu trusty-security main
deb http://archive.ubuntu.com/ubuntu trusty-security restricted
deb http://archive.ubuntu.com/ubuntu trusty-security universe
deb http://archive.ubuntu.com/ubuntu trusty-security multiverse
#
## BACKPORTS SOURCES (WITH LOWERED PRIORITY):
deb http://archive.ubuntu.com/ubuntu trusty-backports main
deb http://archive.ubuntu.com/ubuntu trusty-backports restricted
deb http://archive.ubuntu.com/ubuntu trusty-backports universe
deb http://archive.ubuntu.com/ubuntu trusty-backports multiverse
#
## PARTNER SOURCE (FOR SOFTWARE FROM
## BUSINESS PARTNERS OF CANONICAL):
deb http://archive.canonical.com/ubuntu trusty partner
#
## INDEPENDENT SOURCE (FOR SOFTWARE
## FROM THIRD-PARTY DEVELOPERS):
deb http://extras.ubuntu.com/ubuntu trusty main
#
## SOURCE FOR WEB BROWSER GOOGLE CHROME
## (DISABLED BY DEFAULT):
## Only enable it when you've installed Google Chrome!
## You can enable it in the application Software & Updates.
# deb http://dl.google.com/linux/chrome/deb/ stable main

Save the text file and close it.

  1. Now reload the sources list information:

In the terminal:

sudo apt-get update

Press Enter and submit your password. Please note that the password will remain invisible, not even asterisks will show, which is normal.

You're done!

  • One can use sudo instead of gksudo and any text editor(vim/gedit/sublime) instead of leafpad to paste that code. Just remember that due to use of #, askubuntu has converted a comment to bold line. Just insert # in front of every bold line and don't copy that last line '============='. You are good to go. – Agent-J Jun 10 '18 at 15:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.