Search code examples
debianlxmlaptdebian-stretch

Adding source URI for python3-lxml build-dep


I am trying to run the following command: apt-get build-dep python3-lxml.

I get the following output: E: You must put some 'source' URIs in your sources.list

Here is the output of cat /etc/apt/sources.list:

deb http://deb.debian.org/debian stretch main contrib non-free
#deb-src http://deb.debian.org/debian stretch main contrib non-free

deb http://deb.debian.org/debian stretch-updates main contrib non-free
#deb-src http://deb.debian.org/debian stretch-updates main contrib non-free

deb http://deb.debian.org/debian-security stretch/updates main contrib non-free
#deb-src http://deb.debian.org/debian-security stretch/updates main contrib non-free

#deb http://deb.debian.org/debian stretch-backports main contrib non-free
##deb-src http://deb.debian.org/debian stretch-backports main contrib non-free

#Kernel source (repos.rcn-ee.com) : https://github.com/RobertCNelson/linux-stable-rcn-ee
#
#git clone https://github.com/RobertCNelson/linux-stable-rcn-ee
#cd ./linux-stable-rcn-ee
#git checkout `uname -r` -b tmp
#
deb [arch=armhf] http://repos.rcn-ee.com/debian/ stretch main
#deb-src [arch=armhf] http://repos.rcn-ee.com/debian/ stretch main

A few questions:

  1. How should I modify this file to add the source?
  2. Do I need to run apt update afterwards?
  3. How did you know what URI to add?

Thank you in advance!


Solution

  • 1. You can edit your /etc/apt/sources.list file with any text editor. Just open it and uncomment the required lines that starts with deb-src (i.e. remove the # in front of deb-src), save and close it.

    2. Yes, after that you'll have to run apt update.

    3. The needed urls are already present in you sources.list file.


    Here is the official documentation about Debian sources.list, as well as some specific information about Archive Types (deb and deb-src).

    And here is some additional information about Debian Repositories.