How to automatically update /etc/apt/sources.list with source URIs on Ubuntu 16.04?
Solution 1:
I had this same issue on a server install of Ubuntu 16.04, so no GUI. All that I needed was a couple of sed
commands.
sudo sed -i -- 's/#deb-src/deb-src/g' /etc/apt/sources.list && sudo sed -i -- 's/# deb-src/deb-src/g' /etc/apt/sources.list
Then sudo apt-get update
and continue on.
Solution 2:
Open Software & Updates and enable "Source code".