Very new to raspberry pi and I am interested in using opencpn to build a autopilot for a boat. While attempting to download opencpn (trying to follow directions and not succeeding). I have lost my /etc/apt/sources.list. I was told to add this PPA to the end and I think I deleted some important lines in the process

deb http://ppa.launchpad.net/opencpn/opencpn/ubuntu/ bionic main

Now it reads not found after entering the source list code

So my question is do I need a new 1. raspbian or just a 2.new source list how would I accomplish the second


You don't say what OS you are using, but the sources for Raspbian Buster should be something like:-

deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi

Restoring it should be OK.

NOTE 1 I NEVER use sudo nano - you should use sudoedit which edits a temporary file.

NOTE 2 raspbian.raspberrypi.org is slow and unreliable. I replace with a local mirror; in my case deb http://raspbian.melbourneitmirror.net/raspbian/ buster main contrib non-free rpi although you could select a local mirror from https://www.raspbian.org/RaspbianMirrors/

NOTE 3 I rarely edit /etc/apt/sources.list, but add additional repositories to /etc/apt/sources.list.d I have /etc/apt/sources.list.d/vivaldi.list among others.

NOTE 4 I don't know who suggested using a Ubuntu build; it may or may not work; it is safer to build from source.

  • Sorry yes buster. Working backward Ubuntu is in the instructions from opencpn.org. I will read up on 2&3 more to understand those differences. For point #1 sudo edit is used so that....? I’m not editing/ corrupting the source? Lastly while I’m in source.list It did have the above code but I deleted that line to enter what I thought was in the directions and now it comes up blank – Jack Baugh Aug 30 '19 at 7:30
  • I don't know what you are trying to say - just restore the contents of the file as listed above. The other comments are just recommendations for good practice. – Milliways Aug 30 '19 at 8:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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