0

I'm attempting to install emacs 25.1 on my ubuntu 16.04 system from a PPA. When attempting to install the build dependencies I got the error

>sudo apt-get build-dep emacs24
Reading package lists... Done
E: You must put some 'source' URIs in your sources.list

So apt-get can't find the dependencies, right? I thought adding the PPA to my system would solve this but it doesn't. Also, uncommenting the deb and deb-src pairs (individually and everything at once) in /etc/apt/sources.list didn't help.

What does help is checking the source box in the software & updates utility, as suggested in this post: https://askubuntu.com/a/795694/524588 does work. What exactly is this doing, and how can I replicate it without the gui?

roro
  • 277
  • 3
  • 7

1 Answers1

1

Enabling sources allows downloading source code of the application. With apt-get source pkg you can get source code of that package

As Mitch explains in his answer:

The command sudo apt-get build-dep packagename means to install all dependencies for 'packagename' so that I can build it". So build-dep is an apt-get command just like install, remove, update, etc.

So essentially, build-dep will grab source code of your package, and try to install dependencies for it first , before actually building package. This is different from install where the package may already be in .deb package, with everything pre-made.

Sergiy Kolodyazhnyy
  • 105,154
  • 20
  • 279
  • 497
  • Thanks for the high level explanation. To understand it better I executed a diff on the /etc/apt/source.list file before and after enabling sources, and I see that it added some deb-src urls. Did enabling sources alter my system in any other way? – roro Oct 03 '16 at 19:50
  • @roro no, that's the only way. And manual editing of that file is alright too, by the way, you don't have to rely on GUI tools – Sergiy Kolodyazhnyy Oct 03 '16 at 19:54
  • I see in the manual for apt-get-repository that it's just a script for editing source.list and source.list.d/ and that the -s flag allows for the downloading of source flags. But executing the apt-get-repository -s command with the emacs PPA doesn't resolve the source issue. Shouldn't that be the case? – roro Oct 03 '16 at 20:02
  • The actual command is apt-add-repository, and yes, -s does that same thing, adds deb-src lines – Sergiy Kolodyazhnyy Oct 03 '16 at 20:06
  • Yes, that's the command I ran, however it didn't add any deb-src lines (I disabled sources in the gui). – roro Oct 03 '16 at 20:09