Package: xfslibs-dev Version: 4.9.0 Severity: important Dear Maintainer,
I was trying to rebuild qemu, which somehow pulls into xfslibs-dev. To avoid cluttering my system I tried to build qemu inside Docker, with the debian:stretch image. The installation fails with the error below. Before (and after) running apt-get there is no libhandle.a in /lib or /usr/lib. # apt-get install xfslibs-dev Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: xfslibs-dev 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 58.3 kB of archives. After this operation, 243 kB of additional disk space will be used. Get:1 http://deb.debian.org/debian stretch/main amd64 xfslibs-dev amd64 4.9.0 [58.3 kB] Fetched 58.3 kB in 0s (490 kB/s) debconf: delaying package configuration, since apt-utils is not installed (Reading database ... 28662 files and directories currently installed.) Preparing to unpack .../xfslibs-dev_4.9.0_amd64.deb ... Unpacking xfslibs-dev (4.9.0) ... dpkg: error processing archive /var/cache/apt/archives/xfslibs-dev_4.9.0_amd64.deb (--unpack): unable to install new version of '/lib/libhandle.a': No such file or directory Errors were encountered while processing: /var/cache/apt/archives/xfslibs-dev_4.9.0_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) On my host system (also running stretch) xfslibs-dev installs fine. I tried to figure out what's different between the two environments, and I found that the Docker image had /lib symlinked to /usr/lib, which my host system had not. https://packages.debian.org/stretch/amd64/xfslibs-dev/filelist shows that the package tries to install both /lib/libhandle.a and /usr/lib/libhandle.a . I speculate that this might confuse dpkg, but I don't know how to test if this is the cause. I tried running apt-get in strace, and found this fragment that I believe confirms my suspicion. Because /lib -> /usr/lib, /lib/libhandle.a.dpkg-new will be removed by the rename("/usr/lib/libhandle.a.dpkg-new", "/usr/lib/libhandle.a") call. rename("/usr/include/xfs/handle.h.dpkg-new", "/usr/include/xfs/handle.h") = 0 rename("/usr/include/xfs/jdm.h.dpkg-new", "/usr/include/xfs/jdm.h") = 0 rename("/usr/include/xfs/linux.h.dpkg-new", "/usr/include/xfs/linux.h") = 0 rename("/usr/include/xfs/xfs.h.dpkg-new", "/usr/include/xfs/xfs.h") = 0 rename("/usr/include/xfs/xfs_arch.h.dpkg-new", "/usr/include/xfs/xfs_arch.h") = 0 rename("/usr/include/xfs/xfs_da_format.h.dpkg-new", "/usr/include/xfs/xfs_da_format.h") = 0 rename("/usr/include/xfs/xfs_format.h.dpkg-new", "/usr/include/xfs/xfs_format.h") = 0 rename("/usr/include/xfs/xfs_fs.h.dpkg-new", "/usr/include/xfs/xfs_fs.h") = 0 rename("/usr/include/xfs/xfs_log_format.h.dpkg-new", "/usr/include/xfs/xfs_log_format.h") = 0 rename("/usr/include/xfs/xfs_types.h.dpkg-new", "/usr/include/xfs/xfs_types.h") = 0 rename("/usr/include/xfs/xqm.h.dpkg-new", "/usr/include/xfs/xqm.h") = 0 rename("/usr/lib/libhandle.a.dpkg-new", "/usr/lib/libhandle.a") = 0 rename("/usr/lib/libhandle.la.dpkg-new", "/usr/lib/libhandle.la") = 0 rename("/usr/share/doc/xfslibs-dev/changelog.Debian.gz.dpkg-new", "/usr/share/doc/xfslibs-dev/changelog.Debian.gz") = 0 rename("/usr/share/doc/xfslibs-dev/changelog.gz.dpkg-new", "/usr/share/doc/xfslibs-dev/changelog.gz") = 0 rename("/usr/share/doc/xfslibs-dev/copyright.dpkg-new", "/usr/share/doc/xfslibs-dev/copyright") = 0 rename("/usr/share/man/man3/path_to_handle.3.gz.dpkg-new", "/usr/share/man/man3/path_to_handle.3.gz") = 0 rename("/usr/share/man/man3/xfsctl.3.gz.dpkg-new", "/usr/share/man/man3/xfsctl.3.gz") = 0 rename("/lib/libhandle.a.dpkg-new", "/lib/libhandle.a") = -1 ENOENT (No such file or directory) -- System Information: Debian Release: 9.0 APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 4.9.0-1-amd64 (SMP w/1 CPU core) Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /usr/bin/dash Init: unable to detect

