Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Lately whenever I run

sudo apt-get update

it gives me the following error after the 'reading database' step

W: Duplicate sources.list entry http://archive.canonical.com/ubuntu/ precise/partner amd64 Packages (/var/lib/apt/lists/archive.canonical.com_ubuntu_dists_precise_partner_binary-amd64_Packages)
W: Duplicate sources.list entry http://archive.canonical.com/ubuntu/ precise/partner i386 Packages (/var/lib/apt/lists/archive.canonical.com_ubuntu_dists_precise_partner_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems

Well I have run apt-get update over and over again and nothing changed. I also tried the options

sudo apt-get update --fix-missing

and

sudo apt-get update -f

which are really the same thing I know, but nothing seems to help.

share|improve this question
add comment

4 Answers

up vote 3 down vote accepted

You seem to have both 32 and 64 bit repositories enabled and so you have two incompatible sources available. To find out whether your system architecture is 32 or 64 bit, enter in the terminal

uname -i 

If you are running a 32 bit system, the output will contain:

 i386 

Thus, for a 32bit system, open your sources.list file with gedit:

gksudo gedit /etc/apt/sources.list

and remove completely any line that contains amd64 Packages.

Obviously, for a 64bit system remove the line that contains the i386 packages.

After you have edited your sources.list, saved it, and closed gedit, enter these commands:

sudo apt-get update  
sudo apt-get -f install
share|improve this answer
    
thanks man that helped! Although I'm puzzled as to what caused this because this error appeared after running normally since april and I didn't tinker with the canonical partner repos –  Daniel Aug 17 '12 at 12:08
    
I have the exact same problem as the OP but my /etc/apt/sources.list doesn't contain any lines with i386 or amd64. –  Dennis Mar 30 '13 at 23:27
    
@Dennis There could be other list files in /etc/apt/sources.list.d/ that are causing the problem. –  user76204 Mar 30 '13 at 23:37
add comment

Run this command

sudo dpkg --configure -a

then

sudo apt-get update

If that doesn't fix it you can always edit the sources file manually. You can find the sources file here.

/etc/apt/sources.list 

It seems that you have the same repo for 64 bit and 32 bit.

Once you know if its a 32 bit or 64 bit Follow these steps .

For 32 bit:

Open up Ubuntu Software Center. In the Edit menu search for software sources. A Dialogue box will open up. Go to the Other software tab and search for the line

http://archive.canonical.com/ubuntu/ precise/partner amd64 Packages

and remove it

For 64 bit :

Open up Ubuntu Software Center. In the Edit menu search for software sources. A Dialogue box will open up. Go to the Other software tab and search for the line

http://archive.canonical.com/ubuntu/ precise/partner i386 Packages

after all this run

sudo apt-get update
share|improve this answer
    
okay I have run dpkg but no difference...if I go into source.list what would I edit then? what would be correct entries? –  Daniel Aug 16 '12 at 14:00
    
what are you using? 64 bit or 32 bit. If you dont know open the dash and search for details. Open it and on the main page you can see if its 32 bit or 64 bit. –  Schweinsteiger Aug 16 '12 at 14:02
    
I have updated my answer. Have a look at it –  Schweinsteiger Aug 16 '12 at 14:57
    
The dpkg command you gave didn't fix the problem on my 64-bit machine and there is no line in the Other Software tab that says http://archive.canonical.com/ubuntu/ precise/partner i386 Packages or something similar. –  Dennis Mar 30 '13 at 23:32
add comment

The error message is because you have both 32-bit and 64-bit software repositories in your sources.list file.

Choose one and delete the other, and it will be OK.

share|improve this answer
add comment

Running sudo dkpg --configure -a and the Troubleshoot guide after that didn't help me. I still got

"W: You may want to run apt-get update to correct these problems"

on my terminal window. I also check uname -i and it tells me I am running 64-bit package. Not that the above tip is not helpful, but it did not help me as i had installed the o/s correctly and source.list did not have any 32-bit entries in repositories/source.list

The solution I found from Solve Duplicate source.list entry:

open software sources and find if there are duplicate entries in source.list I has two entries for canonical partners. So, I clicked one of them and clicked remove button.

Back to terminal, I run 'sudo apt-get update' and presto.. no errors.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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