9

machine: Toshiba MK1646GSX, intel atom [email protected], 2048Mb. 32bit.

OS: LINUX LITE 3.8

i was trying to install the PIDGIN dependencies:

 ~> sudo apt-get build-dep pidgin

and then i got this instead of installing the build-dep:

Reading package lists... Done
E: You must put some 'source' URIs in your     sources.list

so i searched and i found sources say that i should rm -rf the sources.list, and then apt-get update and the list will create itself. the results were not good and like what i expected, the list didn't create itself. after that i made a new list with the same content, i tried to make sure about every line and does it own deb-src. all lines are correct. but the Error still exits when i try to install the build-dep. what to do?


sources.list copied from the justpaste link:

###### Ubuntu Main Repos
deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse


###### Ubuntu Update Repos
deb http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-proposed main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu xenial-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
# deb-src http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse


###### Ubuntu Partner Repos
deb http://archive.canonical.com/ xenial partner
# deb-src http://archive.canonical.com/ xenial partner
7
  • 1
    Have you tried running sudo apt-get update before sudo apt-get build-dep pidgin?
    – Freddy
    Aug 26, 2019 at 21:29
  • How does your sources.list look like? Aug 26, 2019 at 22:00
  • @Freddy yes i did, i said that already in the text.
    – DaDi
    Aug 27, 2019 at 0:26
  • 1
    Uncomment # deb-src... Aug 27, 2019 at 0:56
  • 1
    please don't link to external sites for short text fragments. paste them into your question (and format as code). i've fixed that for you this time.
    – cas
    Aug 27, 2019 at 2:53

2 Answers 2

10

Uncomment the deb-src lines in /etc/apt/sources.list:

sudo sed -i 's/# deb-src/deb-src/' /etc/apt/sources.list
sudo apt update
1
  • IMO apt update requirement should be included in the error message, not everybody knows internals that well to see it is necessary after sources file editing. Jan 6, 2022 at 0:19
0

software-properties-gtk option "Source code"

From the GUI, you can run:

software-properties-gtk

then under the "Ubuntu Software" tab click "Source code":

enter image description here

This has added some deb-src lines under /etc/apt/sources.list, and now I can do sudo apt-get build-dep <package>.

Tested on Ubuntu 16.04 to 18.04.

See also: https://askubuntu.com/questions/496549/error-you-must-put-some-source-uris-in-your-sources-list/857433#857433

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .