34

My /etc/apt/sources.list contained:

nazar_art@nazar-desctop:/etc/apt$ cat source.list
deb http://security.ubuntu.com/ubuntu precise-security main universe
nazar_art@nazar-desctop:/etc/apt$ cat sources.list.old
deb http://archive.ubuntu.com/ubuntu precise universe
nazar_art@nazar-desctop:/etc/apt$ cat source.list
deb http://security.ubuntu.com/ubuntu precise-security main universe
nazar_art@nazar-desctop:/etc/apt$ 

I updated according to this post How do I restore the default repositories?

But It called another problem when I run sudo apt-get update I have some output like this:

Err http://ua.archive.ubuntu.com main/restricted Sources                       
  404  Not Found [IP: 91.189.91.13 80]
Err http://ua.archive.ubuntu.com main/universe Sources                         
  404  Not Found [IP: 91.189.91.13 80]
Err http://ua.archive.ubuntu.com main/multiverse Sources                       
  404  Not Found [IP: 91.189.91.13 80]
Err http://ua.archive.ubuntu.com main/restricted amd64 Packages                
  404  Not Found [IP: 91.189.91.13 80]
Err http://ua.archive.ubuntu.com main/universe amd64 Packages                  
  404  Not Found [IP: 91.189.91.13 80]

and this:

W: Failed to fetch http://ua.archive.ubuntu.com/ubuntu/dists/-backports/restricted/binary-i386/Packages  404  Not Found [IP: 91.189.91.13 80]

W: Failed to fetch http://ua.archive.ubuntu.com/ubuntu/dists/-backports/universe/binary-i386/Packages  404  Not Found [IP: 91.189.91.13 80]

W: Failed to fetch http://ua.archive.ubuntu.com/ubuntu/dists/-backports/multiverse/binary-i386/Packages  404  Not Found [IP: 91.189.91.13 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

UPDATE:

I did this command (Thanks NikTh):

find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \;

whole output:

/etc/apt/sources.list

     1  #############################################################
     2  ################### OFFICIAL UBUNTU REPOS ###################
     3  #############################################################
     4  
     5  ###### Ubuntu Main Repos
     6  deb http://ua.archive.ubuntu.com/ubuntu/  main restricted universe multiverse 
     7  deb-src http://ua.archive.ubuntu.com/ubuntu/  main restricted universe multiverse 
     8  
     9  ###### Ubuntu Update Repos
    10  deb http://ua.archive.ubuntu.com/ubuntu/ -security main restricted universe multiverse 
    11  deb http://ua.archive.ubuntu.com/ubuntu/ -updates main restricted universe multiverse 
    12  deb http://ua.archive.ubuntu.com/ubuntu/ -proposed main restricted universe multiverse 
    13  deb http://ua.archive.ubuntu.com/ubuntu/ -backports main restricted universe multiverse 
    14  deb-src http://ua.archive.ubuntu.com/ubuntu/ -security main restricted universe multiverse 
    15  deb-src http://ua.archive.ubuntu.com/ubuntu/ -updates main restricted universe multiverse 
    16  deb-src http://ua.archive.ubuntu.com/ubuntu/ -proposed main restricted universe multiverse 
    17  deb-src http://ua.archive.ubuntu.com/ubuntu/ -backports main restricted universe multiverse 
    18  
    19  
    20  
    21  #############################################################
    22  ################### OFFICIAL UBUNTU REPOS ###################
    23  #############################################################
    24  
    25  ###### Ubuntu Main Repos
    26  deb http://ua.archive.ubuntu.com/ubuntu/  main restricted universe multiverse 
    27  deb-src http://ua.archive.ubuntu.com/ubuntu/  main restricted universe multiverse 
    28  
    29  ###### Ubuntu Update Repos
    30  deb http://ua.archive.ubuntu.com/ubuntu/ -security main restricted universe multiverse 
    31  deb http://ua.archive.ubuntu.com/ubuntu/ -updates main restricted universe multiverse 
    32  deb http://ua.archive.ubuntu.com/ubuntu/ -proposed main restricted universe multiverse 
    33  deb http://ua.archive.ubuntu.com/ubuntu/ -backports main restricted universe multiverse 
    34  deb-src http://ua.archive.ubuntu.com/ubuntu/ -security main restricted universe multiverse 
    35  deb-src http://ua.archive.ubuntu.com/ubuntu/ -updates main restricted universe multiverse 
    36  deb-src http://ua.archive.ubuntu.com/ubuntu/ -proposed main restricted universe multiverse 
    37  deb-src http://ua.archive.ubuntu.com/ubuntu/ -backports main restricted universe multiverse 
    38  
    39  

/etc/apt/source.list

     1  deb http://security.ubuntu.com/ubuntu precise-security main universe

/etc/apt/sources.list.d/ubuntu-extras.list

     1  deb http://extras.ubuntu.com/ubuntu/ precise main #Added by software-center
     2  deb-src http://extras.ubuntu.com/ubuntu/ precise main #Added by software-center

/etc/apt/sources.list.d/webupd8team-y-ppa-manager-precise.list

     1  deb http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu precise main
     2  deb-src http://ppa.launchpad.net/webupd8team/y-ppa-manager/ubuntu precise main

/etc/apt/sources.list.d/playonlinux.list

     1  deb http://deb.playonlinux.com/ quantal main

/etc/apt/sources.list.d/private-ppa.launchpad.net_commercial-ppa-uploaders_intellij-idea-ce_ubuntu.list

     1  deb https://private-ppa.launchpad.net/commercial-ppa-uploaders/intellij-idea-ce/ubuntu precise main #Added by software-center; credentials stored in /etc/apt/auth.conf

/etc/apt/sources.list.d/webupd8team-sublime-text-3-precise.list

     1  deb http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu precise main
     2  deb-src http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu precise main

/etc/apt/sources.list.d/medibuntu.list

     1  ## Please report any bug on https://bugs.launchpad.net/medibuntu/
     2  deb http://packages.medibuntu.org/ precise free non-free #Medibuntu - Ubuntu 12.04 "precise pangolin"
     3  # deb-src http://packages.medibuntu.org/ precise free non-free #Medibuntu (source) - Ubuntu 12.04 "precise pangolin"

/etc/apt/sources.list.d/lezhoev-qstamina-precise.list

     1  deb http://ppa.launchpad.net/lezhoev/qstamina/ubuntu precise main
     2  deb-src http://ppa.launchpad.net/lezhoev/qstamina/ubuntu precise main

/etc/apt/sources.list.d/webupd8team-java-precise.list

     1  deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main
     2  deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main

/etc/apt/sources.list.d/tualatrix-ppa-precise.list

     1  deb http://ppa.launchpad.net/tualatrix/ppa/ubuntu precise main
     2  deb-src http://ppa.launchpad.net/tualatrix/ppa/ubuntu precise main

/etc/apt/sources.list.d/kilian-f_lux-precise.list

     1  deb http://ppa.launchpad.net/kilian/f.lux/ubuntu precise main
     2  deb-src http://ppa.launchpad.net/kilian/f.lux/ubuntu precise main

/etc/apt/sources.list.d/ubuntu-wine-ppa-precise.list

     1  deb http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu precise main
     2  deb-src http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu precise main

/etc/apt/sources.list.d/fsqcds-goldendict-precise.list

     1  deb http://ppa.launchpad.net/fsqcds/goldendict/ubuntu precise main
     2  deb-src http://ppa.launchpad.net/fsqcds/goldendict/ubuntu precise main

/etc/apt/sources.list.d/webupd8team-rhythmbox-precise.list

     1  deb http://ppa.launchpad.net/webupd8team/rhythmbox/ubuntu precise main
     2  deb-src http://ppa.launchpad.net/webupd8team/rhythmbox/ubuntu precise main

/etc/apt/sources.list.d/upubuntu-com-devel-precise.list

     1  deb http://ppa.launchpad.net/upubuntu-com/devel/ubuntu precise main
     2  deb-src http://ppa.launchpad.net/upubuntu-com/devel/ubuntu precise main
catch23
  • 1,254
  • 9
  • 31
  • 42
  • 1
    It looks like you're cat'ing source.list, but apt uses /etc/apt/sources.list. Can you post the contents of that file? – zymhan Aug 06 '13 at 19:22
  • 1
    Open a terminal and copy-paste from here this command find /etc/apt -name '*.list' -exec bash -c 'echo -e "\n$1\n"; cat -n "$1"' _ '{}' \; then edit your question and add the full results. – NickTux Aug 06 '13 at 19:48
  • @NikTh I updated question, can you give any hint about solution? – catch23 Aug 09 '13 at 06:10
  • 1
    Try these commands sudo cp /etc/apt/sources.list ~/ , sudo wget "http://pastebin.com/raw.php?i=uzhrtg5M" -O /etc/apt/sources.list , sudo apt-get update . Are all OK now ? – NickTux Aug 09 '13 at 08:35
  • @NikTh Reading package lists... Done W: Duplicate sources.list entry http://extras.ubuntu.com/ubuntu/ precise/main amd64 Packages (/var/lib/apt/lists/extras.ubuntu.com_ubuntu_dists_precise_main_binary-amd64_Packages) W: Duplicate sources.list entry http://extras.ubuntu.com/ubuntu/ precise/main i386 Packages (/var/lib/apt/lists/extras.ubuntu.com_ubuntu_dists_precise_main_binary-i386_Packages) W: You may want to run apt-get update to correct these problems – catch23 Aug 09 '13 at 12:46
  • sudo rm /etc/apt/sources.list.d/ubuntu-extras.list and sudo apt-get update – NickTux Aug 09 '13 at 14:16
  • @NikTh General ok! but a lot off Ign. Output you can see here. Which main server should prefer: main, US or local? – catch23 Aug 09 '13 at 18:15
  • 1
    Seems that your problem resolved. Ign is not an error , is normal. The local server generally is the best option because is close to you. Now you are using the US server (we replaced this when we wget the pastebin URL in above comments). You can change servers and see what fit your needs. – NickTux Aug 09 '13 at 22:28
  • Has your problem been solved? If you solved it and none of the answers fixed your problem(s?) you can post your own answer your own answer and mark it as such. – RPiAwesomeness Sep 16 '13 at 16:37
  • @RPiAwesomeness It's solved by NikTh comments. – catch23 Sep 16 '13 at 17:40
  • Ok, I saw that there wasn't an answer marked as such, so I was just wondering. – RPiAwesomeness Sep 16 '13 at 19:14
  • @NikTh please, when fixing stuff, post it as answer. – Braiam Dec 29 '13 at 21:09
  • @Braiam the solution is already posted in the question. See section "SOLUTION". If OP wants can add this as an answer and mark it as solved. Is it right to copy-paste the already posted solution as an answer ? – NickTux Dec 29 '13 at 21:17
  • 1
    @NikTh of course, the correct format is Questions in the question and solution/answers in the answer section. This guy messed up his installation since the whole question was a mess. Please, if you see someone appending the solution to the question, rollback the edit and ask for OP to post it as answer instead or post it yourself. – Braiam Dec 29 '13 at 21:22

3 Answers3

33
  • How to solve this trouble in Ubuntu 12.04

Open a terminal (CTRL+ALT+T) and issue the following commands in order.

SOLUTION:

sudo cp /etc/apt/sources.list ~/ 
sudo wget "http://pastebin.com/raw.php?i=uzhrtg5M" -O /etc/apt/sources.list 
sudo apt-get update
sudo rm /etc/apt/sources.list.d/ubuntu-extras.list
sudo apt-get update

This solution is not general. It is specific to the sources.list file of the Original Poster.

The second command which starts with wget downloads and replaces the sources.list file with a specific for Precise (Ubuntu 12.04) sources.list file. See the file in raw format by visiting this page.

The fourth command removes the ubuntu-extras.list file which had an impact/conflict with another file of the same, so we removed it to avoid the error

W: Duplicate sources.list entry

see comments above.

NickTux
  • 17,539
6

This happen to me when I don't update a server for a awhile sometimes. To fix this, I clean out my apt-get cache.

sudo apt-get clean

If doesn't work try point to a different repo url as others have suggested.

jmcgrath207
  • 209
  • 2
  • 6
5

It means that these sources cannot be reached:

http://ua.archive.ubuntu.com/ubuntu/dists/-backports/restricted/binary-i386/Packages  
http://ua.archive.ubuntu.com/ubuntu/dists/-backports/universe/binary-i386/Packages   
http://ua.archive.ubuntu.com/ubuntu/dists/-backports/multiverse/binary-i386/Packages  

Try selecting another server to fetch from (not the one in Ukraine).

PaulMest
  • 101
speedox
  • 1,034