Ask Your Question

"apt-get source" for

asked 2011-12-28 07:21:02 -0600

martyvona gravatar image

Where are the sources (*.orig.tar.gz, *.diff.gz, and *.dsc files) for the debs on

Specifically, how to make "apt-get source" do the right thing for packages from this repository? Adding the obvious deb-src line to ros-latest.list doesn't seem to help (see below). Poking around on the http interface, it looks to me like the sources have not been uploaded.

Packages I care about include ROS dependencies like assimp, yaml-cpp, and eigen. For example,

$ apt-cache policy libassimp2
  Version table:
 *** 0
      500 lucid/main Packages
      100 /var/lib/dpkg/status
$ cat /etc/apt/sources.list.d/ros-latest.list 
deb lucid main
$ apt-get source libassimp2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Picking 'assimp' as source package instead of 'libassimp2'
E: Unable to find a source package for assimp
$ sudo vi /etc/apt/sources.list.d/ros-latest.list
$ cat /etc/apt/sources.list.d/ros-latest.list
deb lucid main
deb-src lucid main
$ sudo apt-get update
Ign lucid/main Packages
Ign lucid/main Sources
Hit lucid/main Packages
Get:1 lucid/main Sources [20B]
Fetched 20B in 1s (14B/s)
Reading package lists... Done
$ apt-get source libassimp2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Picking 'assimp' as source package instead of 'libassimp2'
E: Unable to find a source package for assimp
edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2014-09-14 18:38:20 -0600

130s gravatar image

updated 2014-12-09 19:47:33 -0600

tfoote gravatar image

Just a follow-up; with the current package repository of (Sep 2014), you can obtain the source of the released packages by simply apt-get source. No deb-src needed. I documented it here.

Update 12/10/2014) deb-src seems to be required. I updated the link above too.

Edit with full instructions:

You just need to explicitly specify deb-src entry in the apt sources:

For example update /etc/apt/sources.list.d/ros_latest.list as follows:

  deb precise main
+ deb-src precise main

This assumes precise substitute your applicable ubuntu distro.

$ apt-get source ros-hydro-laser-pipeline

This downloads from the server all the files in the released version of the package (i.e. things not installed in the installation rule (e.g. CMakeLists.txt) are also included).

edit flag offensive delete link more


This does not seem to work for me. I'm running Hydro on 12.04, e.g., both

apt-get source ros-hydro-gmapping


apt-get source ros-hydro-slam-gmapping

return E: Unable to find a source package for ros-hydro-slam-gmapping.

Am I missing something?

damjan gravatar imagedamjan ( 2014-12-09 18:16:40 -0600 )edit

@damjan I've updated my post above.

130s gravatar image130s ( 2014-12-09 19:06:04 -0600 )edit

@130s that's not an appropriate place to put that information. Placing that at the end of the procedural instructions will distract/confuse beginner users as it's not necessary/useful for them to get started. It should be documented for power users, where I think this thread is pretty good.

tfoote gravatar imagetfoote ( 2014-12-09 19:37:57 -0600 )edit

I would also highly recommend using rosinstall generator instead of apt-get source for fetching packages as you will get a version controlled source.

tfoote gravatar imagetfoote ( 2014-12-09 19:42:33 -0600 )edit

I pulled the full content in here and promoted this answer. It's already the top search result for apt-get dsc ros

tfoote gravatar imagetfoote ( 2014-12-09 19:50:13 -0600 )edit

@tfoote Very much agreed.

130s gravatar image130s ( 2014-12-09 21:16:47 -0600 )edit

answered 2011-12-29 04:20:43 -0600

tfoote gravatar image

You will find the source for all the ros released stacks in the release repository

The existing infrastructure for 3rd party packages are quite ad hoc at the moment. We are redesigning the system to make the whole process easier.

In the mean time you can find the stacks you are looking for in gitbuildpackage repos: * Eigen is from debian upstream;a=summary cloned at * yaml-cpp * assimp is pulled from launchpad

edit flag offensive delete link more

answered 2011-12-28 10:02:05 -0600

dornhege gravatar image

Looks the same for me.

This doesn't exactly fix your problem, but you can usually download the source code from each packages wiki entry and overlay the installed version with the sources by putting the local source directory to the front of the ROS_PACKAGE_PATH.

edit flag offensive delete link more


I want to rebuild the debs for a robot that runs an armel cpu and that may need custom patches in some cases. The original "upstream" source is only part of that. I also need the debian control files and especially the patchsets applied when the debs were built.
martyvona gravatar imagemartyvona ( 2011-12-29 00:02:07 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2011-12-28 07:21:02 -0600

Seen: 6,678 times

Last updated: Dec 09 '14