how to get apt-get to install from source

Shot - Piotr Szotkowski shot at hot.pl
Fri Jul 15 09:34:23 UTC 2005


Hello.

Oliver Grawert:

> you can achieve this with:
> 
> sudo apt-get build-dep <package>  # gets all build dependencys...
> apt-get source -b <package>	  # gets the source and builds it
> sudo dpkg -i <package>.deb	  # installs your built package
> 
> note that you dont need (and shouldnt use) sudo to build the package ;)

The above actually bombs out with:

shot at dawid:~/apt-tests$ apt-get source -b ruby1.8
Reading package lists... Done
Need to get 4512kB of source archives.
Get:1 http://archive.ubuntu.com breezy/main ruby1.8 1.8.2-9 (dsc) [1012B]
Get:2 http://archive.ubuntu.com breezy/main ruby1.8 1.8.2-9 (tar) [3624kB]
Get:3 http://archive.ubuntu.com breezy/main ruby1.8 1.8.2-9 (diff) [887kB]
Fetched 4512kB in 8s (537kB/s)
dpkg-source: extracting ruby1.8 in ruby1.8-1.8.2
dpkg-buildpackage: source package is ruby1.8
dpkg-buildpackage: source version is 1.8.2-9
dpkg-buildpackage: source maintainer is akira yamada <akira at debian.org>
dpkg-buildpackage: host architecture is i386
 debian/rules clean
dh_testdir
dh_testroot
dh_testroot: You must run this as root (or use fakeroot).
make: *** [clean] Error 1
Build command 'cd ruby1.8-1.8.2 && dpkg-buildpackage -b -uc' failed.
E: Child process failed
shot at dawid:~/apt-tests$ 

As suggested in the error message, installing fakeroot,
changing the directory (to ruby1.8-1.8.2 in this case)
and doing a `fakeroot dpkg-buildpackage` seems to solve
this issue.

Cheers,
-- Shot
-- 
                         My karma ran over your dogma.
====================== http://shot.pl/hovercraft/ === http://shot.pl/1/125/ ===
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20050715/2b8dbdd9/attachment.sig>


More information about the ubuntu-users mailing list