I have recently started using Terminal, and I have been having lots of problems installing programs from the Ubuntu Software Center (Minecraft, TOR, Tails installer, etc.)
When I run sudo apt-get update
I always get
N: Ignoring file '50unattended-upgrades.ucf-old' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
I get a system error message when I boot up in relation to deb-src http://deb.torproject.org/torproject.org xenial main
When I try to open /etc/apt/sources.list
with various commands it seems like it's not there, unless I open it with sudo gedit /etc/apt/sources.list
, then I get a blank document
So my guess is I have accidentally removed it or something...
What do I do ?
Just an edit in response to Duplicate flags
The invalid file name is sorted now (it just needed removing). My problem now is adding lines to my sources list. I tried making a new file from one of the flagged duplicate threads I moved the file and made a new one with Gedit. It seemed to restore defaults and came up with 2x canonical brothers lines. And when I try to add a line nothing happens.
-Just found out when I use sudo su
I can now add lines to my sources list
sudo su -c "echo 'deb http://www.duinsoft.nl/pkg debs all' >> /etc/apt/sources.list
sudo touch /etc/apt/sources.list; sudo echo deb http://archive.ubuntu.com/ubuntu xenial main restricted > /etc/apt/sources.list
and then check again. My guess is that for whatever reason the file is not being written. – Aedazan Nov 03 '16 at 02:34sudo chmod 744 /etc/apt/sources.list
however its not a good sign that your root (sudo) user cannot write to that file. – Aedazan Nov 03 '16 at 22:20