Quantcast
Channel: How to automatically update /etc/apt/sources.list with source URIs on Ubuntu 16.04? - Ask Ubuntu
Browsing latest articles
Browse All 7 View Live

Answer by lanoxx for How to automatically update /etc/apt/sources.list with...

Here is a simplification of @Tobi's result that does it on a single call to sed:sed -i -- 's/#\s\?deb-src/deb-src/g' /etc/apt/sources.listThis adds \s\? which is an optional white space (note the ?...

View Article


Answer by whitis for How to automatically update /etc/apt/sources.list with...

simpler solution that does what the others have posted more succinctly:sudo perl -p -i -n -e "s/# *deb-src/deb-src/" /etc/apt/sources.listKey distinctions: Perl has the -i inplace option which modifies...

View Article


Answer by Tobi for How to automatically update /etc/apt/sources.list with...

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...

View Article

Answer by Gunnar Hjalmarsson for How to automatically update...

Open Software & Updates and enable "Source code".

View Article

Answer by Håkon Hægland for How to automatically update /etc/apt/sources.list...

Here is a (currently untested) Bash script that could be used to uncomment deb-src lines in sources.list :tempdir=$(mktemp -d)cd "$tempdir"source_file=/etc/apt/sources.listnew_file=sources.list.newperl...

View Article


How to automatically update /etc/apt/sources.list with source URIs on Ubuntu...

The following command worked fine on Ubuntu 15.10:sudo apt-get build-dep emacs24However, on Ubuntu 16.04 I get the following error when running it:Reading package lists... DoneE: You must put some...

View Article

Answer by Otto Kekäläinen for How to automatically update...

You can safely run this snipped as root on any Debian/Ubuntu system:if [ -f /etc/apt/sources.list ]then grep '^deb ' /etc/apt/sources.list | \ sed 's/^deb /deb-src /g'>...

View Article
Browsing latest articles
Browse All 7 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>