I have been having trouble using sudo apt-get update, howevr this is a separate problem. In trying to fix this problem by adding a different mirror in /etc/apt/sources.list/ I am having trouble. Whenever I open sources.list with the default RPi text editor and then try to save it after editing, I get this error:

Can't open file to write.

I have been trying but can not figure out why this happens. Any help would be greatly appreciated.

1 Answer 1


The sources.list file is owned by root, which means that the standard Raspberry Pi user doesn't have write access to the file. The simplest way to get a graphical, root level file editor is by opening a terminal and typing

sudo leafpad

Then, use the open dialog to select /etc/apt/sources.list/. You should now be able to make changes and save the file. Simply close leafpad when you're done and you should see a new prompt appear in the terminal window once the leafpad process exits. You can now close the terminal window as well.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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