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.

When I update my Ubuntu, appear

W:Failed to fetch http://download.virtualbox.org/virtualbox/debian/dists/lucid/Release  Unable to find expected entry 'non-free/source/Sources' in Release file (Wrong sources.list entry or malformed file)
E:Some index files failed to download. They have been ignored, or old ones used instead.

What can I do for fix this error on my Virtual Box?

share|improve this question
1  
what version of ubuntu are you on? –  Goddard Oct 9 '13 at 16:28
    
In addition to Goddard's question, what version of VirtualBox? And had you installed Guest Additions in the Ubuntu environment? –  Colyn1337 Oct 9 '13 at 17:11
    
My version is 4.2.18 and I don't know if Guest Additions is installed in my Ubuntu. How can I install? –  Vitor Mazuco Oct 9 '13 at 17:54
    
My Ubuntu is 12 version –  Vitor Mazuco Oct 9 '13 at 17:56

2 Answers 2

up vote 2 down vote accepted

Looks like you are using the wrong distribution codename in the sources.list file.

I personally prefer to have a separate file for each 3rd party repository, you can create one for virtualbox using the following in CLI:

sudo echo "deb http://download.virtualbox.org/virtualbox/debian `lsb_release -sc` contrib" > /etc/apt/sources.list.d/virtualbox.list

After creating virtualbox.list, remove or comment out the out-dated line from your sources.list.

It may look like this => deb http://download.virtualbox.org/virtualbox/debian lucid contrib non-free.

Once done, update your system sudo apt-get update && apt-get dist-upgrade -y.

share|improve this answer

The reason is an invalid entry in /etc/apt/sources.list file. There is no source package in the VirtualBox source repository. Just remove the deb-src line:

sudo nano /etc/apt/sources.list

Remove or comment this line:

deb-src http://download.virtualbox.org/virtualbox/debian lucid non-free

This should solve the case.

share|improve this answer

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.