I can't seem to work out how to build GNU Hello on Ubuntu 22.04. To reproduce, start a Docker container using docker run --interactive --rm --tty ubuntu:22.04, then run the following:

apt-get update
apt-get install -y debhelper-compat dpkg-dev wget
cd "$(mktemp --directory)"
wget http://archive.ubuntu.com/ubuntu/pool/main/h/hello/hello_2.10.orig.tar.gz http://archive.ubuntu.com/ubuntu/pool/main/h/hello/hello_2.10-2ubuntu4.dsc http://archive.ubuntu.com/ubuntu/pool/main/h/hello/hello_2.10-2ubuntu4.debian.tar.xz
tar -xf hello_2.10-2ubuntu4.debian.tar.xz
mkdir hello_2.10-2ubuntu4
mv debian hello_2.10-2ubuntu4
cd hello_2.10-2ubuntu4

At this point I get this error message:

cp: cannot stat 'NEWS': No such file or directory

followed by

dh_installdocs: error: cp --reflink=auto -a NEWS debian/hello/usr/share/doc/hello returned exit code 1

What am I doing wrong? Where is the NEWS file supposed to be? The build is aware of the upstream tarball ("dpkg-source: info: building hello using existing ./hello_2.10.orig.tar.gz"), do I need to manually unpack that?

  • Can you compare your results with the source tree that apt-get source hello produces? Commented Apr 17, 2023 at 6:00

1 Answer 1


Yes, you need to extract the main tarball too:

tar xf hello_2.10.orig.tar.gz
cd hello*/
tar xf ../hello_2.10-2ubuntu4.debian.tar.xz

apt-get source hello will take care of downloading and extracting the source package for you (if the source repositories are configured), and apt-get build-dep will take care of the build dependencies:

apt-get update
apt-get source hello
apt-get build-dep hello
cd hello*/

You must log in to answer this question.

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