Why am I seeing “dpkg-source: not found” when I try to download source code on a Debian/Ubuntu server?

Problem

I’m seeing “dpkg-source: not found” when I try to download source code on a Debian/Ubuntu server:

$ apt-get source linux-headers-3.2.0-4-amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Picking 'linux' as source package instead of 'linux-headers-3.2.0-4-amd64'
NOTICE: 'linux' packaging is maintained in the 'Svn' version control system at:
svn://anonscm.debian.org/svn/kernel/dists/trunk/linux/
Need to get 82.4 MB of source archives.
Get:1 http://http.debian.net/debian/ wheezy-backports/main linux 3.16.3-2~bpo70+1 (dsc) [104 kB]
Get:2 http://http.debian.net/debian/ wheezy-backports/main linux 3.16.3-2~bpo70+1 (tar) [81.7 MB]
Get:3 http://http.debian.net/debian/ wheezy-backports/main linux 3.16.3-2~bpo70+1 (diff) [664 kB]
Fetched 82.4 MB in 5s (16.4 MB/s)                         
sh: 1: dpkg-source: not found
Unpack command 'dpkg-source -x linux_3.16.3-2~bpo70+1.dsc' failed.
Check if the 'dpkg-dev' package is installed.
E: Child process failed
$

Solution

$ sudo apt-get install dpkg-dev
Share: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Twitter
  • Facebook
  • Google Bookmarks
  • LinkedIn
  • Reddit
  • StumbleUpon

Leave a Reply

Your email address will not be published. Required fields are marked *