Always getting error during apt-get install

Solution 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!