Raspberry Pi: there was an error running option a0 update

So you're sitting there you think to yourself, 'I could do with updating my Pi' and you run the command 'sudo apt-get update' only to have the error 'there was an error running option a0 update' shoved in your face.

It's a tricky one but the following should sort your issue because it's probably due to your SD card becoming corrupt...

Run the following command:

sudo nano /var/lib/apt/sources.list

This will allow you to edit the file that tells your pi where to download its updates, delete everything within the file and add the following:

deb http://archive.raspbian.org/raspbian wheezy main contrib non-free

Source: https://www.raspbian.org/RaspbianRepository

Now hit ctrl+x and when it asks you to save, hit y and press the enter key, this'll overwrite the file.

Now run the following command: 

sudo nano /etc/apt/sources.list.d/raspi.list

Once again, this will let you edit the file. Delete everything from it and hit ctrl+x and when it asks you to save, hit y and press the enter key.

Then run this command to update:

sudo apt-get update

Now you should be able to run an upgrade by running this command:

sudo apt-get upgrade

Your Pi will then upgrade, you will probably loose any SSH connection you have open but it'll be okay once it's finished and you'll be able to use your Pi without any issues. Yay!


By Luke Alderton at 4 Jan 2016, 23:24 PM

Tags: Raspberry Pi

Comments

Post a comment
Sit tight...
We're adding your comment.
Thank you.
Your comment has been added.
There's been a problem.
Please try again later.
Share with
Tags
Latest Comments
By dipbleds on Raspberry Pi - Bluetooth using Bluecove on Raspbian
12 Dec 2017, 21:29 PM
By Ich on Replacing the Xamarin Header/Navigation bar with a custom view/template
26 Nov 2017, 17:11 PM
By Ravi Motha on My experience at Umbraco UK Festival 2017
12 Dec 2017, 08:39 AM
By Borges on How to add a Xamarin Forms Loading Screen/Overlay
7 Nov 2017, 19:11 PM
By Rutul Mehta on Auto/Custom height on Xamarin Forms WebView for Android and iOS
4 Nov 2017, 03:15 AM
By Pablo on Xamarin MasterDetailPage has large margin/padding at top
26 Oct 2017, 15:31 PM
By faiza on Using MaryTTS or OpenMary in Java
22 Oct 2017, 12:54 PM
By Nietoperz on Using MaryTTS or OpenMary in Java
29 Sep 2017, 14:34 PM
Categories
App Development
Event
Game Development
Mapping
Modelling
Programming
Review
Robotics
Tutorial
Web Development