date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,418,657,498,000
Debian offers a way to compare Debian compatible versions using the dpkg command like so: dpkg --compare-versions <version> <operator> <version> For example, if you want to know whether a given version is before 1.0, then you can use: # gather VERSION from somewhere... VERSION=0.9 if dpkg --compare-versions "${VERSION}" lt 1.0 then echo "unacceptable version as per policy" exit 1 fi What is the equivalent command under an RPM-based (RedHat/Fedora) system?
rpmdev-vercmp from rpmdevtools package provides similar functionality, but doesn't support specifying the operator, it simply returns 0 if the versions are equal, 11 if version1 is newer, and 12 if version2 is newer. $ rpmdev-vercmp 1.12 1.13 1.12 < 1.13 $ echo $? 12 You can also install dpkg in Fedora, it is available in the default repository. But it might be a little too much to install dpkg just for the version comparison.
What is the RPM equivalent to `dpkg --compare-versions ...`?
1,418,657,498,000
We have a software project, which we release as a debian package. The project has a debian/ folder which contains files like changelog compat control copyright rules. We're creating debian packages with the command: dpkg-buildpackage -us -uc -b --changes-option=-u./dist which prints a stream of output. What we need to know, for the next step of the process, is the name of the .deb file created. I know that debians have a predictable filename structure like [package name]_[version]_[architecture].deb but I don't have a way to get these parameters anyway. There must be another dpkg command that can generate the would-be package name just from looking in the debian folder?
As you point out, the generated .deb files all share a common format: ${package}_${version}_${arch}.deb. The package name comes from the Package: entries in debian/control; for a full build, one .deb file will be generated for every Package: entry. You can retrieve the values with awk '/^Package:/ { print $2 }' debian/control The version is based by default on the value given in debian/changelog; you can extract that with dpkg-parsechangelog -S version (It is possible for a build to specify a different version, but that is unusual.) Finally, the architecture will be either all (for an Architecture: all package) or by default that of your build system (for any other Architecture:, typically Architecture: any). You can determine the architecture of your build system using dpkg-architecture -qDEB_BUILD_ARCH (Strictly speaking that should be -qDEB_HOST_ARCH, but in the general case BUILD and HOST are the same. I'm also ignoring cross-compilation here; if that's an issue use DEB_TARGET_ARCH instead of DEB_BUILD_ARCH.) Thus for a fully generic solution you'd need to parse the control file to determine which package goes with which architecture; if your control file only builds one package that's not necessary. dpkg-parsechangelog and dpkg-architecture are provided by the dpkg-dev package.
Generate dpkg .deb filename
1,418,657,498,000
I have a Debian package say XYZ.deb which copies some file on installation. As per Debian package policy on package uninstallation only those files will be removed which were copied during installation. Also Debian doesn't remove conf files either. XYZ package installs some Python scripts which on execution creates .pyc file. Now on de-installation I want to remove all the files. What would be the postrm script to cleanly remove package?
With regard to your first question: XYZ package installs some python scripts which on execution creates .pyc file.Now On uninstallation I want to remove all the files.What would be the postrm script to cleanly remove package? In general a suitable postrm script is (I believe) generated automatically by debhelper and friends. See the man page for dh_python. In particular, this man page says If some modules need to be byte-compiled at install time, appropriate postinst and prerm scripts will be generated. If already byte-compiled modules are found, they are removed. With regard to your second question, Also XYZ is configured using debconf file which on package installation prompts user to accepts EULA. How do I exit if user says no to the EULA? I don't know the answer offhand, but take a look at the debconf templates for some of the proprietary software included in Debian. Sun Java is an example that has (had?) a EULA which was bought up by debconf. ADDENDUM: Since the OP appears unconvinced, here is a verbatim copy of the prerm script for a package called python-corrmodel. I wrote the software and also the Debian packaging. However, I didn't write the postinst and prerm scripts, and in fact had not looked at them till this moment. Notice that the prerm script calls the pyclean utility, which is part of Python. The help says: pyclean - removes .pyc and .pyo files Notice also that the script says the code was generated by dh_python2. One final note: I recommend using dh, which is relatively new compared to old school debhelper, but is growing rapidly in popularity. Basically, dh by default invokes all the debhelper rules in default mode in some specific order. If you want to customize the behavior of a particular debhelper command, you can override it. Here is a description of dh overrides by Joey Hess, the author of debhelper. The big advantage is that your rules file is much less cluttered, and you can be sure all the commands are called in the right order. Here is the prerm script. #!/bin/sh set -e # Automatically added by dh_python2: if which pyclean >/dev/null 2>&1; then pyclean -p python-corrmodel else dpkg -L python-corrmodel | grep \.py$ | while read file do rm -f "${file}"[co] >/dev/null done fi # End automatically added section ADDENDUM 2: Since I advertised dh, I'll add my rules file below. This is not the complete rules file, but this line contains the main logic. This basically has debhelper hand off the build to a setup.py script, which then does the heavy lifting. %: dh $@ --with python2 --buildsystem=python_distutils --install-layout=deb
When removing a Debian package, how can I also remove Python *.pyc files?
1,418,657,498,000
I have to find the uname file on a Debian machine, check from which package it is and delete it. When I use which to find it, I get /usr/bin/uname. When I try to check it by dpkg -S uname there is no such file. There is a /bin/uname though. What is the difference between them?
There’s no difference; in Ubuntu, bin is a symbolic link to /usr/bin, some Debian systems, and various other distributions, so binaries appear in both locations. Packages can ship files in either location; to find the package providing a given binary, look for bin/ followed by the binary: dpkg -S bin/uname
What's the difference between two uname files
1,418,657,498,000
I try and build my package for Ubuntu but I can't understand the error. I get this debuild -S -sa dpkg-buildpackage -rfakeroot -d -us -uc -S -sa dpkg-buildpackage: source package opsh dpkg-buildpackage: source version 0.1-1 dpkg-buildpackage: source distribution unstable dpkg-buildpackage: source changed by Niklas Rosencrantz <[email protected]> dpkg-source --before-build opsh fakeroot debian/rules clean dh clean --with autotools_dev dh_testdir dh_auto_clean dh_autotools-dev_restoreconfig dh_clean dpkg-source -b opsh dpkg-source: info: using source format '3.0 (quilt)' dpkg-source: info: building opsh using existing ./opsh_0.1.orig.tar.gz dpkg-source: info: local changes detected, the modified files are: opsh/src/check.t dpkg-source: error: aborting due to unexpected upstream changes, see /tmp/opsh_0.1-1.diff.TooA5f dpkg-source: info: you can integrate the local changes with dpkg-source --commit dpkg-buildpackage: error: dpkg-source -b opsh gave error exit status 2 debuild: fatal error at line 1376: dpkg-buildpackage -rfakeroot -d -us -uc -S -sa failed
The error is dpkg-source: info: local changes detected, the modified files are: opsh/src/check.t That means that opsh/src/check.t doesn’t match the contents of opsh_0.1.orig.tar.gz. In Debian packages, any changes to a file outside the debian directory must be reversible. Since you’re using “3.0 (quilt)” packaging, the best way to handle this is to add a patch. The Debian wiki has the details, but the error message gives you a quick solution to turn your changes into a patch: dpkg-source --commit You’ll need to rename and edit the patch appropriately (as generated, it should contain enough comments for you to figure things out). You should only do this if the file really is changed in a way significant for the build. If it’s a file left over from a previous build, not shipped in the original tarball, you should instead add it to debian/clean so that it gets removed at the start of the build. This can also apply to files which are shipped in the tarball but get fully regenerated during the build.
Fail to build for Ubuntu
1,418,657,498,000
I stumbled upon the following answer on Unix stackexchange, where the -plow option is used with dpkg-reconfigure, but I can't find anything about it in the dpkg or dpkg-reconfigure manpages: http://man7.org/linux/man-pages/man1/dpkg.1.html http://manpages.ubuntu.com/manpages/cosmic/en/man8/dpkg-reconfigure.8.html So what does this option doing exactly? Smells like cargo-cult to me.
From the manpage you linked for dpkg-reconfigure: -pvalue, --priority=value Specify the minimum priority of question that will be displayed. dpkg-reconfigure normally shows low priority questions no matter what your default priority is. See debconf(7) for a list. And from man 7 debconf: Another nice feature of debconf is that the questions it asks you are prioritized. If you don't want to be bothered about every little thing, you can set up debconf to only ask you the most important questions. On the other hand, if you are a control freak, you can make it show you all questions. Each question has a priority. In increasing order of importance: low Very trivial questions that have defaults that will work in the vast majority of cases. medium Normal questions that have reasonable defaults. high Questions that don't have a reasonable default. critical Questions that you really, really need to see (or else). Only questions with a priority equal to or greater than the priority you choose will be shown to you. You can set the priority value by reconfiguring debconf, or temporarily by passing --priority= followed by the value to the dpkg-reconfigure(8) and dpkg- preconfigure(8) commands, or by setting the DEBIAN_PRIORITY environment variable. So, -plow will show all questions, irrespective of whatever default might have been set elsewhere. That might be want you want (that's often what I want, when I run dpkg-reconfigure).
What does "-plow" option do in dpkg-reconfigure
1,418,657,498,000
On a Debian headless server I made an error: NTP and OPENNTP are conflicting. The result is that I cannot update date/time. Long time ago I was trying to set a NTP client and it looks like I crashed something trying to install both of them. Both services are not active and service --status-all doesn't list them. Just to be sure there are no pending services I reboot the unit. I am trying to remove both packages and reinstall from scratch only NTP, but for EVERY cleanup of OPENNTPD using apt (and the related dpkg) I get the same error: Removing openntpd (20080406p-10) ... /usr/bin/deb-systemd-helper: error: unable to link /etc/systemd/system/openntpd.service to /dev/null: File exists dpkg: error processing package openntpd (--remove): subprocess installed post-removal script returned error exit status 1 Errors were encountered while processing: openntpd E: Sub-process /usr/bin/dpkg returned an error code (1) NTP has (after some suffering) been removed and purged. OPENNTPD is instead half installed: # dpkg-query -l openntpd rH openntpd 20080406p-10 amd64 OpenBSD NTP daemon I already tried to remove, upgrade, purge, force reinstall OPENNTPD, at no avail: apt-get dist-upgrade apt-get -f install (same error) apt-get autoremove apt-get remove openntpd dpkg -r openntpd dpkg --purge openntpd dpkg --remove --force-all openntpd return always the same error. It cannot link to /dev/null and I find no info about this error online.
It looks like you need to remove /etc/systemd/system/openntpd.service manually: sudo rm /etc/systemd/system/openntpd.service Then you should be able to purge openntpd.
Cannot remove package
1,418,657,498,000
I have a piece of software which I would like to install in a separate hierarchy beneath $HOME/local on an Ubuntu 16.04 machine. The software is distributed as a Debian package, and the source code is not available (I would happily have downloaded it and compiled it myself had it been). I don't have (and should not have) sudo access on the machine I'm attempting this on. The software is not to be installed system-wide, but only for my personal use. I tried to $ dpkg --root="$HOME/local" -i package_x.y.z_x86_64.deb but I get dpkg: error: requested operation requires superuser privilege After trying with --force-all and creating all the necessary files and directories needed to satisfy dpkg (local/usr/bin, local/var/dpkg with subdirectories info, triggers and updates, along with an empty status file in local/var/dpkg), I get stuck with $ dpkg --root=$HOME/local -i --force-all package-x.y.z_x86_64.deb dpkg: could not open log '/var/log/dpkg.log': Permission denied (Reading database ... 0 files and directories currently installed.) Preparing to unpack package_x.y.z_x86_64.deb ... Unpacking package (1:x.y.z) ... dpkg: error processing archive package_x.y.z_x86_64.deb (--install): error setting ownership of './usr/bin/application': Operation not permitted dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: package_x.y.z_x86_64.deb It's obviously failing to chown the files to the correct users in accordance with the package specification. The next step for me would probably be to have a talk with the sysadmins on this machine to see if they could install this software for me, but I wonder if there's something I've missed that would have allowed me to have my own local package installation root?
No, you haven’t missed anything. The best you can do in such circumstances is use dpkg-deb to extract the contents of the package, and hope they’ll work: dpkg-deb -x package_x.y.z_x86_64.deb my-private-root This won’t run any of the maintainer scripts contained in the package; you can extract those using dpkg-deb -e package_x.y.z_x86_64.deb my-private-control
Installing Debian packages as unprivileged user
1,418,657,498,000
I have a virtual machine that I am trying to use. It doesn't seem to have dpkg or apt-get, so I downloaded the source from http://packages.debian.org/sid/dpkg-dev. If I run ./configure followed by make I get $ make make all-recursive make[1]: Entering directory `/home/dbadmin/temp/dpkg-1.16.8' Making all in lib make[2]: Entering directory `/home/dbadmin/temp/dpkg-1.16.8/lib' Making all in compat make[3]: Entering directory `/home/dbadmin/temp/dpkg-1.16.8/lib/compat' CC empty.o cc1: error: unrecognized command line option "-Wvla" make[3]: *** [empty.o] Error 1 make[3]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8/lib/compat' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8/lib' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8' make: *** [all] Error 2 I tried $ ./configure --disable-compiler-warnings $ make to get ... CC trigproc.o CC update.o CCLD dpkg archives.o: In function `tar_writeback_barrier': /home/dbadmin/temp/dpkg-1.16.8/src/archives.c:1139: undefined reference to `sync_file_range' archives.o: In function `fd_writeback_init': /home/dbadmin/temp/dpkg-1.16.8/src/archives.c:77: undefined reference to `sync_file_range' collect2: ld returned 1 exit status make[2]: *** [dpkg] Error 1 make[2]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8' make: *** [all] Error 2 This is my machine $ uname -a Linux server.name.domain.tld 2.6.18-194.26.1.el5xen #1 SMP Fri Oct 29 14:30:03 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux How should I go about getting a functional package manager on this? Update: $ gcc --version gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)
Dpkg is designed to work on Debian and Debian-like distributions. It can be difficult to compile on other systems, and you wouldn't be able to use it effectively anyway. Also, a kernel version of 2.6.18 is ancient (I smell CentOS 5), only an older version of dpkg has a chance of working. gcc --version gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51) So you have a Red Hat distribution: RHEL or a repackaging thereof such as CentOS. The basic package manipulation tool (the equivalent of dpkg) on Red Hat distributions is rpm. The high-level package manipulation tool (the equivalent of apt-get) is yum. For more systematic ways of determining which distribution a Linux machine is running, see How to write a script that effectively determines distro name?. If you're lucky, lsb-release -si will give you the answer. Otherwise, look for indicative files such as /etc/*release* or /etc/*version*.
Can't install dpkg on Linux 2.6.18
1,418,657,498,000
I'm a Windows user and I need to also use Linux distros heavily for work. Installing software has been so difficult with all dependency missing/version not upgraded/OS distro version unmatch. Not that I don't appreciate the good stuff about Linux. I just want to know the reason. How is Windows handling this? Is it because Windows fat installer bundle all dependencies with it? To be specific, let's take Ubuntu and apt. Everytime the OS upgrades, e.g. precise to trusty, dependencies break. And the workaround many times is just to keep using the old version. Of course the devs should test and make sure it's compatible with new OS version, and mark as so on repository.
The short answer is that Windows installers usually include all the necessary libraries as DLL's, which are usually installed into the same directory as the app, and are usually only useable by that one app. This means if you have two or three Windows products which use the same source library (for example, a compression library, or a GUI element), they'll all have the same DLL's installed, potentially at different versions. That leads to bloat, and can lead to security vulnerabilities as patches may not be applied consistently to all the installed copies of the same library. Some shared libraries do exist (obviously. the OS supplied libraries are included), in which case you need to ensure you have them installed and there's no simple built-in Windows solution to this (it's often handled by the installers themselves). Modern Linux distributions come with package managers which should handle dependencies for any applications in the distribution's repository. That is most of the work of packaging a distribution (along with customising elements to provide consistency). For example, apt handles dependencies in Debian so you don't need to worry, as along as you're installing from the Debian repository. If you're downloading and installing your own packages or compiling from source, then yes, you'll need to manage dependencies yourself.
Why Linux has so many dependency problems when installing software while Windows doesn't except for few like VC++? [closed]
1,418,657,498,000
I was installing Prey through a .deb file donwloaded from the official website when, all of a sudden I realized that I have so many "unnecessary" installed packages in my Ubunu laptop. This has been my sequence of actions: Tried to sudo dpkg -i prey.deb. Didn't work because of missing packets/conflicts: prey:i386 depèn de sudo. prey:i386 depèn de python. prey:i386 depèn de python-gtk2. prey:i386 depèn de scrot. prey:i386 depèn de streamer. prey:i386 depèn de mpg123. prey:i386 depèn de dmidecode. prey:i386 depèn de gksu. I then did a sudo apt-get update (all good) and a sudo apt-get upgrade (failed because previous package installation was unsuccessful, I think). APT suggested to do an apt-get -f install so I did. All of a sudden I realized I have an incredibly long list of unnecessary packages that I did NOT have (yesterday, at least): aglfn asymptote asymptote-doc checkbox-ng checkbox-ng-service cm-super cm-super-minimal context context-modules fonts-cabin fonts-comfortaa fonts-dejavu-extra fonts-ebgaramond fonts-ebgaramond-extra fonts-font-awesome fonts-freefont-otf fonts-gfs-artemisia fonts-gfs-baskerville fonts-gfs-bodoni-classic fonts-gfs-complutum fonts-gfs-didot fonts-gfs-didot-classic fonts-gfs-gazis fonts-gfs-neohellenic fonts-gfs-olga fonts-gfs-porson fonts-gfs-solomos fonts-gfs-theokritos fonts-hosny-amiri fonts-inconsolata fonts-junicode fonts-lato fonts-linuxlibertine fonts-lobster fonts-lobstertwo fonts-oflb-asana-math fonts-roboto fonts-sil-gentium fonts-sil-gentium-basic fonts-sil-gentiumplus fonts-stix freeglut3 giblib1:i386 gstreamer0.10-alsa gstreamer0.10-plugins-good gstreamer0.10-x lcdf-typetools libasound2:i386 libatk1.0-0:i386 libaudit1:i386 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libbz2-1.0:i386 libcairo2:i386 libcomerr2:i386 libcups2:i386 libdatrie1:i386 libdb5.3:i386 libdbus-1-3:i386 libdbus-glib-1-2:i386 libdv4:i386 libffi6:i386 libfontconfig1:i386 libfreetype6:i386 libftgl2 libgconf-2-4:i386 libgcrypt20:i386 libgdk-pixbuf2.0-0:i386 libgif4:i386 libglib2.0-0:i386 libgmp10:i386 libgnome-keyring0:i386 libgnutls-deb0-28:i386 libgpg-error0:i386 libgpm2:i386 libgraphite2-3:i386 libgsl0ldbl libgssapi-krb5-2:i386 libgtk2.0-0:i386 libharfbuzz0b:i386 libhogweed4:i386 libid3tag0:i386 libimlib2:i386 libintl-perl libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libk5crypto3:i386 libkeyutils1:i386 libkrb5-3:i386 libkrb5support0:i386 libltdl7:i386 liblzma5:i386 libmpg123-0:i386 libncursesw5:i386 libnettle6:i386 libosmesa6 libp11-kit0:i386 libpam-modules:i386 libpam0g:i386 libpango-1.0-0:i386 libpangocairo-1.0-0:i386 libpangoft2-1.0-0:i386 libpcre3:i386 libpixman-1-0:i386 libpng12-0:i386 libpoppler-qt5-1 libprojectm2v5 libpython-stdlib:i386 libpython2.7-minimal:i386 libpython2.7-stdlib:i386 libpython3.5-minimal libpython3.5-stdlib libqca2-plugins libqca2v5 libqt5script5 libqxt-core0 libqxt-gui0 libreadline6:i386 libselinux1:i386 libsigsegv2 libsqlite3-0:i386 libssl1.0.0:i386 libstartup-notification0:i386 libsystemd0:i386 libtasn1-6:i386 libtext-unidecode-perl libthai0:i386 libtiff5:i386 libtinfo5:i386 libv4l-0:i386 libv4lconvert0:i386 libx11-xcb1:i386 libxcb-render0:i386 libxcb-shm0:i386 libxcb-util1:i386 libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxfixes3:i386 libxi6:i386 libxinerama1:i386 libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl libxrandr2:i386 libxrender1:i386 linux-image-4.2.0-16-generic linux-image-4.2.0-18-generic linux-image-4.2.0-19-generic linux-image-4.2.0-22-generic linux-image-extra-4.2.0-16-generic linux-image-extra-4.2.0-18-generic linux-image-extra-4.2.0-19-generic linux-image-extra-4.2.0-22-generic linux-signed-image-4.2.0-18-generic linux-signed-image-4.2.0-19-generic linux-signed-image-4.2.0-22-generic m-tx mpg123:i386 musixtex pfb2t1c2pfb plainbox-secure-policy pmx python3-checkbox-ng python3-checkbox-support python3-jinja2 python3-plainbox python3-pyparsing python3-xlsxwriter python3.5 python3.5-minimal qml-module-qtquick-localstorage qtdeclarative5-localstorage-plugin scrot:i386 streamer:i386 sudo:i386 tex4ht tex4ht-common texinfo texlive-fonts-extra texlive-fonts-extra-doc texlive-formats-extra texlive-games texlive-generic-extra texlive-humanities texlive-humanities-doc texlive-lang-african texlive-lang-arabic texlive-lang-cyrillic texlive-lang-czechslovak texlive-lang-english texlive-lang-european texlive-lang-french texlive-lang-german texlive-lang-greek texlive-lang-indic texlive-lang-italian texlive-lang-polish texlive-lang-portuguese texlive-lang-spanish texlive-luatex texlive-math-extra texlive-music texlive-omega texlive-plain-extra texlive-publishers texlive-publishers-doc texlive-science-doc texlive-xetex ttf-adf-accanthis ttf-adf-gillius ttf-adf-universalis ttf-dejavu-core xawtv-plugins:i386 zlib1g:i386 Note that apart from this long list, apt also said that the following packages would be removed (sudo??): Es SUPRIMIRAN els paquets següents: plainbox-provider-resource-generic prey:i386 sudo So because of all that, I aborted apt-get -f install, just in case... Because I wasn't sure about the dpkg process, I undid the first command by executing dpkg --purge prey. At this point, I checked the list of unnecessary packages (apt-get -f install) again and it was reduced, but still long enough to make me cancel this command. This is the list of packages that apt "wants" to uninstall because they are not necessary: aglfn asymptote asymptote-doc checkbox-ng checkbox-ng-service cm-super cm-super-minimal context context-modules fonts-cabin fonts-comfortaa fonts-dejavu-extra fonts-ebgaramond fonts-ebgaramond-extra fonts-font-awesome fonts-freefont-otf fonts-gfs-artemisia fonts-gfs-baskerville fonts-gfs-bodoni-classic fonts-gfs-complutum fonts-gfs-didot fonts-gfs-didot-classic fonts-gfs-gazis fonts-gfs-neohellenic fonts-gfs-olga fonts-gfs-porson fonts-gfs-solomos fonts-gfs-theokritos fonts-hosny-amiri fonts-inconsolata fonts-junicode fonts-lato fonts-linuxlibertine fonts-lobster fonts-lobstertwo fonts-oflb-asana-math fonts-roboto fonts-sil-gentium fonts-sil-gentium-basic fonts-sil-gentiumplus fonts-stix freeglut3 gstreamer0.10-alsa gstreamer0.10-plugins-good gstreamer0.10-x lcdf-typetools libftgl2 libgsl0ldbl libintl-perl libosmesa6 libpoppler-qt5-1 libprojectm2v5 libpython3.5-minimal libpython3.5-stdlib libqca2-plugins libqca2v5 libqt5script5 libqxt-core0 libqxt-gui0 libsigsegv2 libtext-unidecode-perl libxml-libxml-perl libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl linux-image-4.2.0-16-generic linux-image-4.2.0-18-generic linux-image-4.2.0-19-generic linux-image-4.2.0-22-generic linux-image-extra-4.2.0-16-generic linux-image-extra-4.2.0-18-generic linux-image-extra-4.2.0-19-generic linux-image-extra-4.2.0-22-generic linux-signed-image-4.2.0-18-generic linux-signed-image-4.2.0-19-generic linux-signed-image-4.2.0-22-generic m-tx musixtex pfb2t1c2pfb plainbox-provider-resource-generic plainbox-secure-policy pmx python3-checkbox-ng python3-checkbox-support python3-jinja2 python3-plainbox python3-pyparsing python3-xlsxwriter python3.5 python3.5-minimal qml-module-qtquick-localstorage qtdeclarative5-localstorage-plugin tex4ht tex4ht-common texinfo texlive-fonts-extra texlive-fonts-extra-doc texlive-formats-extra texlive-games texlive-generic-extra texlive-humanities texlive-humanities-doc texlive-lang-african texlive-lang-arabic texlive-lang-cyrillic texlive-lang-czechslovak texlive-lang-english texlive-lang-european texlive-lang-french texlive-lang-german texlive-lang-greek texlive-lang-indic texlive-lang-italian texlive-lang-polish texlive-lang-portuguese texlive-lang-spanish texlive-luatex texlive-math-extra texlive-music texlive-omega texlive-plain-extra texlive-publishers texlive-publishers-doc texlive-science-doc texlive-xetex ttf-adf-accanthis ttf-adf-gillius ttf-adf-universalis ttf-dejavu-core I recall having this list populated with some linux-signed-image... and others yesterday, but definitely didn't have all of them. In fact, some if these packages I know for sure that are being used (e.g. texlive-*, fonts-*, ttf-*, python-*...) What might I have broken and how could I revert this? I suspect the error comes from step 3 but I'm not certain about it. UPDATE: Before even tinkering around with debfoster as suggested in the comments, I have checked some packages and I have noticed that: ubuntu-desktop is not installed (?!) -- and I'm NOT using KDE nor XCFE.
There are a few routines, old wives' tales, for finding and then cleaning out unnecessary packages, in additon to the already suggested debfoster. (first) but, why is that package installed? A tool you will want to use while cleaning out packages is aptitude why pkg-name From the aptitude man page: $ aptitude why kdepim i nautilus-data Recommends nautilus i A nautilus Recommends desktop-base (>= 0.2) i A desktop-base Suggests gnome | kde | xfce4 | wmaker p kde Depends kdepim (>= 4:3.4.3) This only prints out the strongest dependency chain, but will answer many questions quickly. There is also why-not which is not so relevant to removing packages. package removed, config files remaining You can find packages that are no longer used by yourself but that still have configuration files and the like remaining. To do this, open a terminal and type dpkg-query -l '*' | grep ^rc | awk '{print $2}' |xargs > my_ apt_rc_removeList.lst The list generated is of all the files in the 'rc' state - removed but configuration files remaining. These left over files you will now remove, but first look over the files listed in the my_ apt_rc_removeList.lst file, to check that you do want all of this cruft removed. Now type aptitude purge `cat apt_rc_removeList.lst` and all this cruft will be removed. gtkorphan Another application you can use to find left over packages is gtkorphan. From gtkorphan's description in the apt system: GtkOrphan is a graphical tool which scans your Debian system, looking for orphaned libraries. It implements a GUI front-end to deborphan, but adds the package removal capability. A detailed documentation on the program can be found at: http://www.marzocca.net/linux/gtkorphan.html. You can use this to help clean out packages in other sections (other than 'libs') too. mark uninteresting packages as dependencies: remove asap In aptitude, in one sub-category of your "Installed Packages", type l (the letter 'el') and then in the box that appears enter ?not(?automatic) . This will now show only packages that are not dependencies of other packages. Now,scroll over each of these, and on very package that does not interest you directly, hit the M key. This will not remove any packages, but mark each package as "only here because, and while, something depends on it" Now go through the sections one by one. Most of the 'only as a dependencies' packages will be in the libs section. mark all packages matching 'pattern' as 'auto': remove asap All of the '-dev' packages can be marked for removal-if-not-required by aptitude markauto ~i~n"\-dev$" clean out an entire category An entire category ("CATEGORY_NAME") can be cleaned out with aptitude purge '~sCATEGORY_NAME ! ~exceptThisApp
Why do I have so many unnecessary packages?
1,418,657,498,000
I would love to install StackApplet on Debian 6.0.2! I downloaded 'stackapplet_1.4.0_all.deb' and ran following command: root@debian:/home/dagrevis/Downloads# dpkg -i stackapplet_1.4.0_all.deb Selecting previously deselected package stackapplet. (Reading database ... 132125 files and directories currently installed.) Unpacking stackapplet (from stackapplet_1.4.0_all.deb) ... dpkg: dependency problems prevent configuration of stackapplet: stackapplet depends on python-appindicator; however: Package python-appindicator is not installed. dpkg: error processing stackapplet (--install): dependency problems - leaving unconfigured Processing triggers for desktop-file-utils ... Processing triggers for gnome-menus ... Errors were encountered while processing: stackapplet I guess that I don't have 'python-appindicator'. I searched for it, but, unfortunately, I couldn't find it. P.S. I am using Gnome and that shouldn't be a problem...
It is now extremely easy to install StackApplet on Debian thanks to a fallback module for AppIndicators that I wrote, which ships with StackApplet. You can install it by downloading the source package for the latest version from its Launchpad page. From there, you simply need to extract the contents of the archive and run: sudo python setup.py install ...which will take care of installation.
How to install StackApplet on Debian?
1,418,657,498,000
As I understand it, if a package is auto-installed and has no other packages depending on it, the system should offer to remove it. why doesn't this happen in this case? :~$ sudo apt list --installed | grep -i zutty WARNING: apt does not have a stable CLI interface. Use with caution in scripts. zutty/unstable,now 0.14.0.20230218+dfsg1-1 amd64 [installato, automatico] :~$ sudo apt-cache rdepends zutty zutty Reverse Depends: :~$ sudo apt autoremove Lettura elenco dei pacchetti... Fatto Generazione albero delle dipendenze... Fatto Lettura informazioni sullo stato... Fatto 0 aggiornati, 0 installati, 0 da rimuovere e 0 non aggiornati. PS sorry for italian output console
apt autoremove is more conservative by default than apt install; in particular, apt install installs recommended packages by default, and ignores suggested packages, but apt autoremove takes suggestions into account. (See How do recommends and suggests interact with apt-get dist-upgrade and apt-get autoremove? for details.) That’s not what’s happening here though. zutty isn’t a candidate for auto-removal because it provides x-terminal-emulator, and many packages depend, recommend, or suggest that. The simplest way to determine why a package is being kept is to ask aptitude: aptitude why zutty
why this package is not proposed to me to remove?
1,418,657,498,000
I just upgraded my system from Debian 11 to 12, by following this guide from cyberciti. This system has been kept up-to-date for more than 9 years, so it has been through at least 4 major upgrades (Debian 7 or 8 to 12 today). During the first run of apt upgrade --without-new-pkgs, I had an error about libudev (sadly I forgot to keep the output from the command), that I fixed by removing 2 files: $ rm /lib/x86_64-linux-gnu/libudev.so.1 /lib/x86_64-linux-gnu/libudev.so.1.6.5 I was able to finish the upgrade and reboot. By performing further investigation, it looks like my system has some other duplicated libraries: $ dpkg --search /lib/x86_64-linux-gnu/perl/ /usr/lib/x86_64-linux-gnu/perl/ dpkg-query: no path found matching pattern /lib/x86_64-linux-gnu/perl/ libperl5.36:amd64: /usr/lib/x86_64-linux-gnu/perl It looks like these directories are not symbolic links: $ ls -ld /lib/ /lib/x86_64-linux-gnu/ /usr/ /usr/lib/ /usr/lib/x86_64-linux-gnu/ drwxr-xr-x 84 root root 4.0K Jul 5 21:05 /lib// drwxr-xr-x 78 root root 96K Jul 5 21:05 /lib/x86_64-linux-gnu// drwxr-xr-x 12 root root 4.0K Jul 5 20:32 /usr// drwxr-xr-x 84 root root 4.0K Jul 5 21:05 /usr/lib// drwxr-xr-x 78 root root 96K Jul 5 21:05 /usr/lib/x86_64-linux-gnu// I already had a very similar issue before: Can't restore systemd after upgrade from Debian 10 to 11: “undefined symbol: seccomp_api_get” Here are the questions: Is it normal to have duplicated libraries in /lib/x86_64-linux-gnu/ and /usr/lib/x86_64-linux-gnu/ Can I rely on the output of dpkg --search and delete the paths that show no path found …? Or can some tool help me clean this mess? What events on my system could have made this possible? Update: actually it looks like there 2 directories are identical: $ ls -lh /lib/x86_64-linux-gnu/test.ignore /usr/lib/x86_64-linux-gnu/test.ignore ls: cannot access '/lib/x86_64-linux-gnu/test.ignore': No such file or directory ls: cannot access '/usr/lib/x86_64-linux-gnu/test.ignore': No such file or directory $ touch /lib/x86_64-linux-gnu/test.ignore $ ls -lh /lib/x86_64-linux-gnu/test.ignore /usr/lib/x86_64-linux-gnu/test.ignore -rw-r--r-- 1 root root 0 Jul 5 22:14 /lib/x86_64-linux-gnu/test.ignore -rw-r--r-- 1 root root 0 Jul 5 22:14 /usr/lib/x86_64-linux-gnu/test.ignore But I don't understand how it works. And now I know that I must not delete files from /lib/x86_64-linux-gnu/ because it would delete files in /usr/lib/x86_64-linux-gnu/ too.
If you want to see a symlink, you mustn’t add /: ls -ld /lib should show you a different result. Debian 12 enforces a “merged /usr”, the “duplication” you’re seeing is normal.
After upgrading to Debian 12, duplicated files in /lib/x86_64-linux-gnu/ and /usr/lib/x86_64-linux-gnu/
1,418,657,498,000
When I am building a debian package, often many related packages that are bundled together are being build, and also the foo-dbgsym-* versions and foo-doc packages. For example, even relatively simple package such as make, will build additional packages: make-dbgsym_4.2.1-1.2_amd64.deb make-guile-dbgsym_4.2.1-1.2_amd64.deb make-guile_4.2.1-1.2_amd64.deb make_4.2.1-1.2_amd64.deb Can I tell the build system to only build make and not make-guile ? Here is the process that I am using for building the package: apt-get source make cd make* dpkg-buildpackage --build=binary --no-sign Is there a general process how I can specify which packages I want to build? Make is a simple example, but larger packages build many versions of package which I am not interested in, which need dependent libraries installed, and the build process takes longer.
dbgsym packages can be disabled using the noautodbgsym build option: DEB_BUILD_OPTIONS=noautodbgsym dpkg-buildpackage -us -uc It’s also possible to build only architecture-dependent or architecture-independent packages, by changing the --build option on dpkg-buildpackage. Other than that, there’s no generalised way of picking and choosing packages to build and dependencies to install. In particular, build dependencies aren’t tied to the binary packages they are relevant for. Some packages support build profiles; you can determine that by looking for Build-Profiles and/or angle-bracketed dependencies in debian/control. On such packages, dpkg-buildpackage’s -P option selects the appropriate profile(s), sometimes in combination with a build option. For example, on packages with a nocheck profile, DEB_BUILD_OPTIONS=nocheck dpkg-buildpackage -Pnocheck will skip the testing-related build-dependencies (if any) and skip running the tests. In fact, the latest version of the make package purports to provide a noguile build profile, so it should be possible to skip Guile with dpkg-buildpackage -Pnoguile -us -uc except that the profile definition is incomplete. It is always possible to edit debian/control to remove irrelevant packages, and debian/rules to remove irrelevant build steps.
building Debian package without associated packages that are bundled together
1,418,657,498,000
On a debian buster machine without internet access, most of apt command (like apt install/remove/autoremove) show the following error : The following packages have unmet dependencies: systemd : Depends: libsystemd0 (= 241-7~deb10u6) but 241-7~deb10u8 is to be installed Recommends: libpam-systemd but it is not installable E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). When trying to run apt --fix-broken install, I get this error : root@debian10-h1:/var/cuda-repo-debian10-11-4-local# apt --fix-broken install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: big list of packages Use 'apt autoremove' to remove them. The following packages will be REMOVED: systemd 0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded. After this operation, 13.8 MB disk space will be freed. Do you want to continue? [Y/n] Y (Reading database ... 114294 files and directories currently installed.) Removing systemd (241-7~deb10u6) ... systemd is the active init system, please switch to another before removing systemd. dpkg: error processing package systemd (--remove): installed systemd package pre-removal script subprocess returned error exit status 1 Errors were encountered while processing: systemd E: Sub-process /usr/bin/dpkg returned an error code (1) How I got there I had to install a program on a debian buster server without internet access. Up until now, when I had to install something via apt, I'd run apt-get download $(apt-cache depends --recurse --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances <your-package-here> | grep "^\w" | sort -u) on a VM to download the .deb files from the packages and all dependencies, transfer the files to my target machine and then run dpkg -i *.deb to install there, which was working fine. I had to install CUDA, so I followed the nvidia installation guide. At some point, I'm supposed to run those command : wget https://developer.download.nvidia.com/compute/cuda/11.4.0/local_installers/cuda-repo-debian10-11-4-local_11.4.0-470.42.01-1_amd64.deb sudo dpkg -i cuda-repo-debian10-11-4-local_11.4.0-470.42.01-1_amd64.deb sudo apt-key add /var/cuda-repo-debian10-11-4-local/7fa2af80.pub sudo add-apt-repository contrib sudo apt-get update sudo apt-get -y install cuda I did the first 4 commands without any problem (the first on my VM with internet connection), but since I didn't have an internet connection, the 5th one failed : root@debian10-h1:/home/user/installation# apt-get update Get:1 file:/var/cuda-repo-debian10-11-4-local InRelease Ign:1 file:/var/cuda-repo-debian10-11-4-local InRelease Get:2 file:/var/cuda-repo-debian10-11-4-local Release [564 B] Get:2 file:/var/cuda-repo-debian10-11-4-local Release [564 B] Err:4 http://deb.debian.org/debian buster InRelease Temporary failure resolving 'deb.debian.org' Reading package lists... Done W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease Temporary failure resolving 'deb.debian.org' W: Some index files failed to download. They have been ignored, or old ones used instead. and the 6th too : root@debian10-h1:/home/user/installation# apt-get -y install cuda Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: apt-utils : Depends: apt (= 1.8.2.2) but 1.8.2.3 is to be installed cuda : Depends: cuda-11-4 (>= 11.4.0) but it is not going to be installed libglib2.0-bin : Depends: libglib2.0-0 (= 2.58.3-2+deb10u2) but 2.58.3-2+deb10u 3 is to be installed libpython3.7 : Depends: libpython3.7-stdlib (= 3.7.3-2+deb10u2) but 3.7.3-2+deb10u3 is to be installed systemd : Depends: libsystemd0 (= 241-7~deb10u6) but 241-7~deb10u8 is to be installed udev : Depends: libudev1 (= 241-7~deb10u6) but 241-7~deb10u8 is to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). So I tried apt --fix-broken install : root@debian10-h1:/home/user/installation# apt --fix-broken install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: big list of packages Use 'apt autoremove' to remove them. The following packages will be REMOVED: big list of packages WARNING: The following essential packages will be removed. This should NOT be done unless you know exactly what you are doing! init systemd-sysv (due to init) 0 upgraded, 0 newly installed, 58 to remove and 1 not upgraded. After this operation, 364 MB disk space will be freed. You are about to do something potentially harmful. To continue type in the phrase 'Yes, do as I say!' ?]n I tried to do apt autoremove as suggested but I got the same E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). as before. Same with apt remove cuda. Thinking that it didn't work because of the problem during apt-get update, I tried to do the update via apt-offline, but once again was asked to use apt --fix-broken install : root@debian10-h1:/home/user/installation# apt-offline set ./my.sig Generating database of files that are needed for an update. Generating database of file that are needed for operation upgrade E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). ERROR: FATAL: Something is wrong with the APT system Since I didn't find anything else to do, I retried apt --fix-broken install but this time accepting to continue : root@debian10-h1:/home/user/installation# apt --fix-broken install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: big list of packages Use 'apt autoremove' to remove them. The following packages will be REMOVED: big list of packages WARNING: The following essential packages will be removed. This should NOT be done unless you know exactly what you are doing! init systemd-sysv (due to init) 0 upgraded, 0 newly installed, 58 to remove and 1 not upgraded. After this operation, 364 MB disk space will be freed. You are about to do something potentially harmful. To continue type in the phrase 'Yes, do as I say!' ?]Yes, do as I say! (Reading database ... 120959 files and directories currently installed.) Lot of others thing were removed, I just kept the ones where I got a different message, can post the full list if needed. Removing linux-image-amd64 (4.19+105+deb10u9) ... Removing linux-image-4.19.0-14-amd64 (4.19.171-2) ... W: Removing the running kernel W: Last kernel image has been removed, so removing the default symlinks /etc/kernel/postrm.d/initramfs-tools: update-initramfs: Deleting /boot/initrd.img-4.19.0-14-amd64 /etc/kernel/postrm.d/zz-update-grub: Generating grub configuration file ... Found background image: /usr/share/images/desktop-base/desktop-grub.png Adding boot menu entry for EFI firmware configuration done update-initramfs: deferring update (trigger activated) Removing initramfs-tools (0.133+deb10u1) ... Removing initramfs-tools-core (0.133+deb10u1) ... Removing systemd (241-7~deb10u6) ... systemd is the active init system, please switch to another before removing systemd. dpkg: error processing package systemd (--remove): installed systemd package pre-removal script subprocess returned error exit status 1 Errors were encountered while processing: systemd E: Sub-process /usr/bin/dpkg returned an error code (1) What I already tried Followed https://askubuntu.com/a/1093253 : sudo apt-get clean don't show anything, root@debian10-h1:/home/user# dpkg --configure -a Processing triggers for mime-support (3.62) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Processing triggers for libglib2.0-0:amd64 (2.58.3-2+deb10u3) ... Processing triggers for libc-bin (2.28-10) ... Processing triggers for man-db (2.8.5-2) ... Processing triggers for libreoffice-common (1:6.1.5-3+deb10u6) ... Processing triggers for dbus (1.12.20-0+deb10u1) ... Processing triggers for desktop-file-utils (0.23-4) ... and sudo apt upgrade --fix-missing ask me to do apt --fix-broken install again. Followed https://askubuntu.com/a/1244984, but stat / /dev /var show that root is the owner of all 3 directories. Followed https://askubuntu.com/a/380701, but sudo fuser -v /var/cache/debconf/config.dat show nothing. (+ I don't think it's exactly the same problem). I was wondering if anyone knew how to solve that problem, I can provide more informations if needed.
I’ll explain how the system ended up in this situation (at least, my theory), and how to avoid it in future; but first, let’s see how to fix it. I suspect that your setup is too broken for apt-offline to be able to fix things in a reasonable number of steps. You would be better off downloading the first full DVD of the current point release, and using that. To do so, remove all the configured repositories, mount the DVD image on your server, and add it using apt-cdrom, with the --no-mount option so that apt-cdrom doesn’t try to manage the “DVD drive” itself (assuming you use an image). This will provide you with an up-to-date source of packages which you can use to re-install the removed packages and upgrade the system so it’s in a consistent state. I don’t have a magic recipe for that; you’ll have to figure out what packages were removed. apt full-upgrade might help. As for why the system ended up broken like this, I don’t think it’s related to CUDA, but rather to the technique you use for off-line installations. Downloading full dependencies trees, ignoring what’s already installed, is bound to end up downloading package sets which intersect with other dependencies trees which should be upgraded together. For example, many packages end up depending on libsystemd0, but their dependencies trees don’t include systemd; installing such a package set results in a mismatched systemd and libsystemd0, which explains the first error in your question. dpkg -i can allow such mismatches to occur, but apt doesn’t like them and they need to be fixed before it can do anything sensible; this is what apt install --fix-broken repairs, but it needs a package repository... To avoid this, the installed set of packages has to be kept globally consistent. For a disconnected system, apt-offline is the best approach, but it has to be used all the time, without apt-cache depends tricks. For a partially-connected system, i.e. one which is on a network but without direct Internet access, a network-local package cache can be a better solution; see for example apt-cacher-ng.
apt broken after trying to update and install without internet
1,418,657,498,000
I've gone to upgrade my machine as I do every day and I've received the following errors: $ sudo apt-get update && sudo apt-get upgrade Hit:1 http://ftp.uk.debian.org/debian buster InRelease Hit:2 http://security.debian.org/debian-security buster/updates InRelease Hit:3 http://ftp.uk.debian.org/debian buster-updates InRelease Hit:4 https://updates.signal.org/desktop/apt xenial InRelease Hit:5 https://packagecloud.io/AtomEditor/atom/any any InRelease Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up linux-image-4.19.0-8-amd64 (4.19.98-1+deb10u1) ... /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-4.19.0-8-amd64 pigz: abort: write error on <stdout> (No space left on device) E: mkinitramfs failure cpio 141 pigz 28 update-initramfs: failed for /boot/initrd.img-4.19.0-8-amd64 with 1. run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1 dpkg: error processing package linux-image-4.19.0-8-amd64 (--configure): installed linux-image-4.19.0-8-amd64 package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: linux-image-4.19.0-8-amd64 needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1) I believe the following line might be the cause of the issue, but I'm unsure how to fix: pigz: abort: write error on <stdout> (No space left on device) System info $ uname -a Linux debian 4.19.0-8-amd64 #1 SMP Debian 4.19.98-1 (2020-01-26) x86_64 GNU/Linux $ ls -la /boot/ drwxr-xr-x 5 root root 1024 Apr 29 08:54 . drwxr-xr-x 22 root root 4096 Feb 11 05:39 .. -rw-r--r-- 1 root root 206361 Nov 11 00:30 config-4.19.0-6-amd64 -rw-r--r-- 1 root root 206194 Apr 27 06:05 config-4.19.0-8-amd64 -rw-r--r-- 1 root root 186598 Sep 20 2019 config-4.9.0-11-amd64 drwx------ 3 root root 4096 Jan 1 1970 efi drwxr-xr-x 5 root root 1024 Feb 11 05:39 grub -rw-r--r-- 1 root root 62662464 Feb 9 19:01 initrd.img-4.19.0-6-amd64 -rw-r--r-- 1 root root 62708576 Feb 11 05:39 initrd.img-4.19.0-8-amd64 -rw-r--r-- 1 root root 47360778 Oct 25 2019 initrd.img-4.9.0-11-amd64 drwx------ 2 root root 12288 Jan 27 2019 lost+found -rw-r--r-- 1 root root 3410671 Nov 11 00:30 System.map-4.19.0-6-amd64 -rw-r--r-- 1 root root 3408461 Apr 27 06:05 System.map-4.19.0-8-amd64 -rw-r--r-- 1 root root 3203475 Sep 20 2019 System.map-4.9.0-11-amd64 -rw-r--r-- 1 root root 5270768 Nov 11 00:30 vmlinuz-4.19.0-6-amd64 -rw-r--r-- 1 root root 5274864 Apr 27 06:05 vmlinuz-4.19.0-8-amd64 -rw-r--r-- 1 root root 4249376 Sep 20 2019 vmlinuz-4.9.0-11-amd64 $ sudo dpkg -l | grep linux-image ii linux-image-4.19.0-6-amd64 4.19.67-2+deb10u2 amd64 Linux 4.19 for 64-bit PCs (signed) iF linux-image-4.19.0-8-amd64 4.19.98-1+deb10u1 amd64 Linux 4.19 for 64-bit PCs (signed) ii linux-image-4.9.0-11-amd64 4.9.189-3+deb9u1 amd64 Linux 4.9 for 64-bit PCs ii linux-image-amd64 4.19+105+deb10u3 amd64 Linux for 64-bit PCs (meta-package) $ sudo cat /var/log/dpkg.log 2020-04-29 08:54:32 startup packages configure 2020-04-29 08:54:32 configure linux-image-4.19.0-8-amd64:amd64 4.19.98-1+deb10u1 <none> 2020-04-29 08:54:32 status half-configured linux-image-4.19.0-8-amd64:amd64 4.19.98-1+deb10u1 $ df Filesystem 1K-blocks Used Available Use% Mounted on udev 3987600 0 3987600 0% /dev tmpfs 804084 9672 794412 2% /run /dev/mapper/debian--vg-root 220799920 117407476 92106736 57% / tmpfs 4020420 165216 3855204 5% /dev/shm tmpfs 5120 4 5116 1% /run/lock tmpfs 4020420 0 4020420 0% /sys/fs/cgroup /dev/sdb1 114854440 84891720 24085372 78% /mnt/Extended /dev/sda2 241965 208213 21260 91% /boot /dev/sda1 523248 5220 518028 1% /boot/efi tmpfs 804084 20 804064 1% /run/user/1000 /dev/sdd2 15006688 41004 14183656 1% /media/squire/GENERAL
You can free up some space by deleting the 4.9 kernel: sudo apt purge linux-image-4.9.0-11-amd64
Errors when trying to upgrade Linux kernel
1,418,657,498,000
All apt-like commands failed to create the lock file, because /var/lib/dpkg/ doesn't exist. Also, /lost+found/ has contents: pi@pi-top:~ $ sudo ls -al /lost+found/ total 102456 drwx------ 11 root root 16384 Apr 3 16:26 . drwxr-xr-x 23 root root 4096 May 5 17:00 .. -rw------- 1 root root 104857600 Apr 3 16:30 #29025 lrwxrwxrwx 1 root root 9 Mar 29 10:05 #87867 -> /run/lock lrwxrwxrwx 1 root root 4 Mar 29 10:05 #87868 -> /run drwxr-xr-x 2 root root 4096 May 5 10:35 #89863 drwxr-xr-x 12 root root 4096 Apr 3 16:41 #89864 drwxr-xr-x 44 root root 4096 Apr 3 16:30 #89865 drwxrwsr-x 2 root staff 4096 Mar 12 14:03 #89866 drwxr-xr-x 6 root root 4096 May 5 16:30 #89867 drwxrwsr-x 2 root mail 4096 Mar 29 10:05 #89868 drwxr-xr-x 2 root root 4096 Mar 29 10:05 #89869 drwxr-xr-x 5 root root 4096 Mar 29 10:32 #89870 drwxrwxrwt 3 root root 4096 May 5 16:31 #89871 Lots of /var/lib/ is also missing, though the system isn't showing any other symptoms. Is it possible to recover the system (or at least dpkg)? If so, how?
I'm sorry, but at this stage, you're probably better off restoring from a clean backup. When fsck places so many directories in /lost+found, that's a sign that there's been a lot of corruption. It's quite possible that there's more corruption, but because it's in the file contents rather than in metadata, fsck has no way to know. When restoring from a backup, make sure that it's a clean backup. The corruption may have started before it was detected. The only way to identify what the files in lost+found are is to look at them and figure it out. There is no systematic way. If there was one, fsck would do it. Looking at the contents you show for /lost+found, it looks like the /var directory got damaged. You can try to repair it by creating /var and moving the appropriate entries in /lost+found to /var. # Running as root, of course umask 022 mkdir /var mv /lost+found/\#87867 /var/lock mv /lost+found/\#87868 /var/run mv /lost+found/\#89866 /var/local mv /lost+found/\#89868 /var/mail … I figured out the entries above from the metadata (ownership and symlink targets). You can figure more out by looking at the directory contents. Compare with an existing system installation (preferably the same distribution or at least something close, but the processor architecture doesn't matter). /var/lib may be #89865 because it tends to have a lot of subdirectories, but that's only a guess. It could be from another part of the system altogether. Don't focus on recovering /var/lib/dpkg and ignore the rest. The lack of /var/lib/dpkg is just the first symptom you noticed. On a PC, I'd suggest to do a RAM test (with Memtest86+ which is available as a package on most distributions and is installed by default at least on Ubuntu). On a Raspberry Pi, if your system is on an SD card, I recommend replacing the SD card: SD cards are the least reliable part of the system, and if you keep using it, it'll probably keep corrupting your data.
/var/lib/dpkg/ disappeared after fsck
1,418,657,498,000
Here on a Debian system I use mainly gpg2. Some (Debian packaging/signing) tools use gpg1 internally, and changing them as it should be would be infeasible. Both my gpg versions are using the same work directory (~/.gnupg) and their databases / configuration seem mainly compatible. An exception for this is the handling of the private keys. As I experienced, private keys created by gpg2 are not visible for gpg1 (but their public pairs are). Digging a lot on the net, as I understand, the gpg versions are using different files (and maybe different formats) below ~/.gnupg to store them. There are also various one-line solutions to convert the gpg2 database to gpg1 and vice versa. Now I have to use mainly gpg2, but I have to allow also gpg1 to work. My idea for this task is that I export the gpg2 private key database. I import it with gpg1. The expected result would be that I can see the same public and private keys with both gpg versions. Is it possible? Could it work? How can I do that? (Note: at least Ubuntu and Mint uses already gpg2 for packaging tasks, but Debian still doesn't.)
GnuPG 1.4, 2.0 and 2.1 all support the "good old" pubring.gpg file for storing public keys. As long as a pubkey.gpg exists, also GnuPG 2.1 will continue to use it and not create a public keyring in the new keybox format. There are differences with respect to private keys, though. While GnuPG 1.4 and 2.0 both store private keys in the secring.gpg file, GnuPG 2.1 merges those into the public keyring file, such that GnuPG 2.1 (gpg2, on newer distributions also gpg) and GnuPG 1.4 (gpg1 if available, on older distributions also gpg) do not share a common secret keyring store any more (but still can do for the public keyring, as already explained). If you export the secret keys from gpg2 and import them to gpg/gpg1, you should be able to use them from both implementations. GnuPG 1.4 does not mind that secret keys are stored in your pubring.gpg file. Be aware GnuPG 1.4 cannot merge secret key packets; if you change your subkeys in GnupG 2.1 and want to copy them to GnuPG 1.4 agein, you will have to delete the secret key from GnuPG 2.1 and import it again. Always make a backup copy before changing anything!
Can I use GnuPG 2 and GnuPG 1 concurrently, seeing the same keys?
1,418,657,498,000
When setting up/rolling up multiple transient VMs, I would like to keep the used disk space at a minimum, not installing the documents and corresponding manuals of the standard software packages (and possibly other directories). However, since Debian does not offer separate packages, and all comes in the same .deb package, how could it be done?
Coincidentally (or not), the package manager, namely dpkg, can be instructed to ignore placing files in specific directories while installing packages. To do that, create in the /etc/dpkg/dpkg.cfg.d directory a file 01nodoc having as contents: path-exclude /usr/share/doc/* path-exclude /usr/share/man/* apt and aptitude also honour those configurations, and as such, when installing any package, the corresponding files that would be installed in that directories are ignored. Please do note however that this feature does not delete files retroactively; if they were installed at any point in time before configuring the exclusions, they have to be removed manually. If however you want to use a subdirectory of an excluded path, use a path-include directive with a more specific path before the path-exclude. See also Save disk space by excluding useless files with dpkg
Saving disk space in VMs
1,418,657,498,000
Trying to install letsencrypt on Debian Jessie, I have run into the following situation I don't quite understand. I already have installed python-acme: dpkg -l | grep acme ii python-acme 0.6.0-1~bpo8+1 all ACME protocol library for Python 2 Now I'm trying to install python-letsencrypt: apt-get install python-letsencrypt Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: python-letsencrypt : Depends: python-acme (>= 0.5.0) but it is not going to be installed E: Unable to correct problems, you have held broken packages. What is the meaning of this error message? As far as I can tell, I have the right version of the package installed (0.6.0-1~bpo8+1 is >= 0.5.0, right?) Why does the package manager refuse to see it?
I suspect some issue with the transition to certbot and the use of virtual packages... (Until recently, versioned dependencies weren't supported on virtual packages.) Since certbot is now in the Jessie backports, and replaces letsencrypt, I'd recommend installing that instead: apt-get install -t jessie-backports certbot
dpkg complains about a missing package which is already installed
1,418,657,498,000
dpkg -S /usr/share/doc/tasksel-data # fine dpkg -S usr/share/doc/tasksel-data # fine dpkg -S /share/doc/tasksel-data # not found dpkg -S share/doc/tasksel-data # fine dpkg -S are/doc/tasksel # fine Why on Earth does the third line above fail? Note that line one starts with a slash(/), so that seems unlikely to be the problem.
This is not documented as far as I can tell but a leading / makes dpkg treat the argument as a path and not a pattern. In other words, if you tell it to search for something that starts with /, it assumes it should look for a file in one of the installed packages with that exact path. You can confirm it easily enough with $ dpkg -S nonmatching dpkg-query: no path found matching pattern *nonmatching* $ dpkg -S /nonmatching dpkg-query: no path found matching pattern /nonmatching Note that in the first case, with no /, the error shows that it searched for *nomatching*, while with the / it searched for the exact path /nonmatching. For example, it also fails to find /doc despite the existence of directories like /usr/share/doc: $ dpkg -S /doc dpkg-query: no path found matching pattern /doc While I can't find any mention of this in the man page, I did confirm by checking the source. The following lines are from the searchfiles function defined in querycmd.c (dpkg 1.17.13) if (!strchr("*[?/",*thisarg)) { varbuf_reset(&vb); varbuf_add_char(&vb, '*'); varbuf_add_str(&vb, thisarg); varbuf_add_char(&vb, '*'); varbuf_end_str(&vb); thisarg= vb.buf; } That will add * around the argument passed unless that argument begins with a /. So, that causes dpkg-query to treat anything starting with / as an absolute path and anything that doesn't as a pattern to be matched.
Behavior of dpkg -S when the argument starts with a slash
1,418,657,498,000
I installed tcl-doc. Prior to installation "man tcl" gave nothing. Now it gives a page. When I do "dpkg -L tcl-doc" I get /. /usr /usr/share /usr/share/doc /usr/share/doc/tcl-doc /usr/share/doc/tcl-doc/tcltk-policy.html /usr/share/doc/tcl-doc/tcltk-policy.pdf /usr/share/doc/tcl-doc/README.Debian /usr/share/doc/tcl-doc/copyright /usr/share/doc/tcl-doc/tcltk-policy.txt.gz /usr/share/doc/tcl-doc/changelog.Debian.gz I am wondering what the source of the output of the command "man tcl" is? Is it one of the above files, and if not, why isn't it displayed in the above output?
tcl-doc recommends tcl-8.5-doc on wheezy or later and tcl8.4-doc on squeeze which contains the manpages. To see the included manpages have a look at the filelist for tcl8.4-doc. So tcl-doc does not contain any manpage but the recommends is installed automatically by the package manager which contains the manpage.
Where is tcl-doc man page stored?
1,418,657,498,000
I don't understand how or why apt-get install failed. It mentions ssmtp which is simple smtp which I use to send mail from my server to my Google apps account. I don't understand what is wrong or how to fix it. I am using debian squeeze. # apt-get install ffmpeg ... Setting up libswscale0 (4:0.5.2-6) ... Setting up ffmpeg (4:0.5.2-6) ... Errors were encountered while processing: ssmtp E: Sub-process /usr/bin/dpkg returned an error code (1) # sudo apt-get install ffmpeg sudo: unable to resolve host debian Reading package lists... Done Building dependency tree Reading state information... Done ffmpeg is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y Setting up ssmtp (2.64-4) ... hostname: Name or service not known dpkg: error processing ssmtp (--configure): subprocess installed post-installation script returned error exit status 1 configured to not write apport reports Errors were encountered while processing: ssmtp E: Sub-process /usr/bin/dpkg returned an error code (1)
I'm guessing that you set your system's host name to "debian" when setting it up. The installer should have added an entry for that to /etc/hosts, but it seems to not be there any longer. Add an entry like this, if you don't see a line with "debian" on it already: 127.0.0.1 debian You'll have to start your text editor with sudo to be allowed to save the changes.
Why did 'apt-get install ffmpeg' fail?
1,418,657,498,000
Install fine. Works fine. Next day the logo and apps menu entry is gone. Doesn't seem to matter what I do. On installation, GDebi refused to install the package, and crashed instead, so I used dpkg -i. As for the logo and apps menu entry, I suppose I'll just have to glue it in place. Sorry Firefox. I install the latest version with dpkg, I use it for a while, it goes into the Internet tab fine. Then I shut down, and the next time I start up it's missing. The program runs fine from a terminal as google-chrome So, my question is, where are the details of this stuff stored? Is it a single text file in /usr? Is it a bunch of stuff that's hard to edit by hand? And where is the logo likely to reside? I know there's probably a GUI way to do this, but it will be more satisfying, and possibly less error-prone, if I simply override whatever's causing Ubuntu/GNOME to lose the icon and applications menu entry.
I've heard the same complaints from several people who tried to use recent development builds of Google Chrome. You probably should use a more stable version of it (or use the Chromium browser provided in the Ubuntu repositories, which is the open source version of Google Chrome). Or otherwise you can wait until Google fixes this bug...
dpkg and google-chrome don't get along with gnome
1,418,657,498,000
I've just completed a simple source code modification & rebuild on a Raspberry Pi OS - bullseye machine. Because this is new to me, I'll list the steps I followed in an effort to avoid ambiguity: $ dhcpcd --version dhcpcd 8.1.2 # "before" version $ sudo apt install devscripts # build tools for using `debuild` $ apt-get source dhcpcd5 # creates source tree ~/dhcpcd5-8.1.2; Debian git repo is far off! $ cd dhcpcd5-8.1.2 # cd to source dir $ nano src/dhcp.c # make required changes to the source (one line) ~/dhcpcd5-8.1.2 $ debuild -b -uc -us # successful build $ cd .. $ sudo dpkg -i dhcpcd5_8.1.2-1+rpt5_armhf.deb # install .deb file created by debuild $ dhcpcd --version dhcpcd 8.1.2 # "after" version $ All well & good, but the "before" & "after" version numbers are exactly the same, which leaves me without a simple way to know whether I have my corrected code running, or the un-corrected code. I'll install the corrected .deb file to several hosts, I may get requests from others, etc, so I'd like some way to easily distinguish corrected from un-corrected code. Using dhcpcd --version seems an easy way to do this. I've read that Debian has rules re version numbers, but as I'm not releasing this to "the world" I see no need for formality. Also - I've submitted a pull request/merge request to the Debian repo, and I've advised the RPi organization on the issue. I've gotten no feedback from either party, but this bug is a huge annoyance for me. I don't wish to wait for a new release of dhcpcd with a "proper" version number. What must I do to cause the corrected version of dhcpcd to report dhcpcd 8.1.2.1 - or something similar? EDIT for Clarification: Based on this answer, I edited dhcpcd5-8.1.2/debian/changelog. Following this change, the apt utilities consistently report the version of dhcpcd as 8.1.3: $ apt-cache policy dhcpcd5 dhcpcd5: Installed: 1:8.1.3-1+rpt1 Candidate: 1:8.1.3-1+rpt1 Version table: *** 1:8.1.3-1+rpt1 100 100 /var/lib/dpkg/status 1:8.1.2-1+rpt1 500 500 http://archive.raspberrypi.org/debian buster/main armhf Packages 7.1.0-2 500 500 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages $ # $ dpkg -s dhcpcd5 | grep Version Version: 1:8.1.3-1+rpt1 $ However: dhcpcd --version still reports 8.1.2. dhcpcd is aliased to dhcpcd5 in /etc/alternatives. Consequently, dhcpcd --version is actually dhcpcd5 --version. It appears that the executable dhcpcd5 is getting its --version from a different source than than apt utilities.? EDIT 2: Turns out the version # that gets reported by dhcpcd --version is defined in defs.h as follows: #define PACKAGE "dhcpcd" #define VERSION "8.1.2" I think dhcpcd is a bit of an outlier. The RPi team apparently decided to forego the upstream version 9 when released (years ago), and have stuck to version 8.1.2 even though there were several upstream releases following ver 8.1.2. Still more confusing is the fact that the .dsc file lists Vcs-Browser: https://salsa.debian.org/smlx-guest/dhcpcd5 as the Git repo - but it's actually stuck at version 7. This doesn't make much sense to me - I guess that's one reason I'm not a package maintainer. :)
You can either add the relevant lines at the top of debian/changelog (find here details on the contents of that file). You can duplicate the current top stanza and change the version number (making an useful log comment is a good idea). Alternatively you can use the dch tool (from devtools): dch --local your_package_name Once installed, you can check the installed version of the package with something like this (there are alternatives) dpkg -l dhcpcd5 Upstream version identifiers cannot be automatically imported because they don't always officially exist (say python3-lzss) and when they do, they might not be compatible with the restrictions and sorting of the package system versions. For example epoch is needed sometimes to migrate from upstream to Debian versions.
How to set a new version number in a .deb package I've built
1,418,657,498,000
I am using: dpkg-query -W -f='${package}\t${version}\t${architecture}\n' to list installed packages but it also shows packages marked for removal i.e. with status rc. How do I get only installed packages?
dpkg-query doesn’t support filtering on status, but it can output packages’ status, which allows them to be filtered: dpkg-query -W -f='${Status}\t${package}\t${version}\t${architecture}\n' | grep "^install ok installed" dpkg -l is based on dpkg-query and thus can’t filter on status itself either. aptitude provides more powerful search options, and can be used for this; see Right way to get the list of installed packages matching a pattern? for details. The following command will display the package name, version, and architecture of all installed packages (and only installed packages): aptitude search "~i" -F "%p%v#%E" Note that the package name will include the architecture if it doesn’t match the system’s main architecture; for example zlib1g 1:1.2.11.dfsg-1 amd64 zlib1g:i386 1:1.2.11.dfsg-1 i386
dpkg-query to show installed packages only and not "rc"
1,418,657,498,000
I'm wondering specifically if it remains locked when only installing one package, and running its postinst.
dpkg places a file lock on /var/lib/dpkg/lock when a package management process starts and only removes the lock when the package management process ends. Please review the Debian Wiki on dpkg and the dpkg manpage for more information on dpkg itself. I will also include a link to dpkg.org which has more specific documentation on the API and file handling of dpkg. There is also this related stack exchange post discussing how /var/lib/dpkg/lock works. As explained in this post when dpkg is used, by either a frontend or dpkg itself, a system call fcntl is called that places an advisory lock. dpkg needs to be able to place this lock and returns false and is unable to proceed if this lock is already in place. Once the functions of dpkg are complete it releases the hold on /var/lib/dpkg/lock freeing up another process to be able to use dpkg. Importantly, when you receive a warning that there is a lock on /var/lib/dpkg/lock you need to not delete this file but figure out whether there is already a user or process (such as one started by unattended-upgrades) that is currently running a package management process. This process might be hung so you will have to kill it and recover from potential database corruption. This would be completed by following the advice in this related post. I would again caution that deleting the file is not the best way to remove the lock. You need to end the rogue process and potentially repair dpkg if you continue to have issues. To get to your specific question of: ...if it remains locked when only installing one package, and running its postinst. dpkg should only be locked when completing package management processes. A postinst script would likely fall under a package management process, however if it is falling to release /var/lib/dpkg/lock or its variants then that is an issue that should be brought up with the package maintainer(s).
When exactly does dpkg start and stop being locked?
1,418,657,498,000
When I tried to sudo apt upgrade my Raspberry Pi system running Raspbian Buster, dpkg errored out when it got to the configuration of openssh-server: $ sudo apt upgrade -y Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following package was automatically installed and is no longer required: rpi.gpio-common Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 2 not fully installed or removed. After this operation, 0 B of additional disk space will be used. debconf: Perl may be unconfigured (Can't load '/usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so' for module Fcntl: /usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so: invalid ELF header at /usr/share/perl/5.28/XSLoader.pm line 93. at /usr/lib/arm-linux-gnueabihf/perl/5.28/Fcntl.pm line 11. Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/Seekable.pm line 11. BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/Seekable.pm line 11. Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/File.pm line 10. BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/File.pm line 10. Compilation failed in require at /usr/share/perl/5.28/FileHandle.pm line 9. Compilation failed in require at (eval 1) line 3. BEGIN failed--compilation aborted at (eval 1) line 3. ) -- aborting Setting up openssh-server (1:7.9p1-10+deb10u1) ... Can't load '/usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so' for module Fcntl: /usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so: invalid ELF header at /usr/share/perl/5.28/XSLoader.pm line 93. at /usr/lib/arm-linux-gnueabihf/perl/5.28/Fcntl.pm line 11. Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.28/POSIX.pm line 11. BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.28/POSIX.pm line 17. Compilation failed in require at /usr/share/perl5/Debconf/Template.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Template.pm line 7. Compilation failed in require at /usr/share/perl5/Debconf/Question.pm line 8. BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Question.pm line 8. Compilation failed in require at /usr/share/perl5/Debconf/Config.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Config.pm line 7. Compilation failed in require at /usr/share/perl5/Debconf/Log.pm line 10. Compilation failed in require at /usr/share/perl5/Debconf/Db.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Db.pm line 7. Compilation failed in require at /usr/share/debconf/frontend line 6. BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 6. dpkg: error processing package openssh-server (--configure): installed openssh-server package post-installation script subprocess returned error exit status 255 dpkg: dependency problems prevent configuration of ssh: ssh depends on openssh-server (>= 1:7.9p1-10+deb10u1); however: Package openssh-server is not configured yet. dpkg: error processing package ssh (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: openssh-server ssh E: Sub-process /usr/bin/dpkg returned an error code (1) Upon seeing the line in the error that suggested configuration issues, I tried sudo dpkg --configure -a, only to get the same output again: $ sudo dpkg --configure -a Setting up openssh-server (1:7.9p1-10+deb10u1) ... Can't load '/usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so' for module Fcntl: /usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so: invalid ELF header at /usr/share/perl/5.28/XSLoader.pm line 93. at /usr/lib/arm-linux-gnueabihf/perl/5.28/Fcntl.pm line 11. Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.28/POSIX.pm line 11. BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.28/POSIX.pm line 17. Compilation failed in require at /usr/share/perl5/Debconf/Template.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Template.pm line 7. Compilation failed in require at /usr/share/perl5/Debconf/Question.pm line 8. BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Question.pm line 8. Compilation failed in require at /usr/share/perl5/Debconf/Config.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Config.pm line 7. Compilation failed in require at /usr/share/perl5/Debconf/Log.pm line 10. Compilation failed in require at /usr/share/perl5/Debconf/Db.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Db.pm line 7. Compilation failed in require at /usr/share/debconf/frontend line 6. BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 6. dpkg: error processing package openssh-server (--configure): installed openssh-server package post-installation script subprocess returned error exit status 255 dpkg: dependency problems prevent configuration of ssh: ssh depends on openssh-server (>= 1:7.9p1-10+deb10u1); however: Package openssh-server is not configured yet. dpkg: error processing package ssh (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: openssh-server ssh When it comes to Linux package configuration and the vagueries of the openssh-server package, I am a complete noob. I haven't been able to find any literature or forum posts online describing a similar issue and a workable solution. How can I go about addressing this apparent library conflict? EDIT: $ sudo apt --reinstall install perl-base Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: rpi.gpio-common Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded. 2 not fully installed or removed. Need to get 1,352 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://mirror.os6.org/raspbian/raspbian buster/main armhf perl-base armhf 5.28.1-6 [1,352 kB] Fetched 1,352 kB in 1s (1,069 kB/s) debconf: Perl may be unconfigured (Can't load '/usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so' for module Fcntl: /usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so: invalid ELF header at /usr/share/perl/5.28/XSLoader.pm line 93. at /usr/lib/arm-linux-gnueabihf/perl/5.28/Fcntl.pm line 11. Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/Seekable.pm line 11. BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/Seekable.pm line 11. Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/File.pm line 10. BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.28/IO/File.pm line 10. Compilation failed in require at /usr/share/perl/5.28/FileHandle.pm line 9. Compilation failed in require at (eval 1) line 3. BEGIN failed--compilation aborted at (eval 1) line 3. ) -- aborting (Reading database ... 43627 files and directories currently installed.) Preparing to unpack .../perl-base_5.28.1-6_armhf.deb ... Unpacking perl-base (5.28.1-6) over (5.28.1-6) ... Setting up perl-base (5.28.1-6) ... Setting up openssh-server (1:7.9p1-10+deb10u1) ... Can't load '/usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so' for module Fcntl: /usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so: invalid ELF header at /usr/share/perl/5.28/XSLoader.pm line 93........................] at /usr/lib/arm-linux-gnueabihf/perl/5.28/Fcntl.pm line 11........................................................] Compilation failed in require at /usr/lib/arm-linux-gnueabihf/perl/5.28/POSIX.pm line 11............................] BEGIN failed--compilation aborted at /usr/lib/arm-linux-gnueabihf/perl/5.28/POSIX.pm line 17........................] Compilation failed in require at /usr/share/perl5/Debconf/Template.pm line 7........................................] BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Template.pm line 7. Compilation failed in require at /usr/share/perl5/Debconf/Question.pm line 8. BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Question.pm line 8. Compilation failed in require at /usr/share/perl5/Debconf/Config.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Config.pm line 7. Compilation failed in require at /usr/share/perl5/Debconf/Log.pm line 10. Compilation failed in require at /usr/share/perl5/Debconf/Db.pm line 7. BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/Db.pm line 7. Compilation failed in require at /usr/share/debconf/frontend line 6. BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 6. dpkg: error processing package openssh-server (--configure): installed openssh-server package post-installation script subprocess returned error exit status 255 dpkg: dependency problems prevent configuration of ssh: ssh depends on openssh-server (>= 1:7.9p1-10+deb10u1); however: Package openssh-server is not configured yet. dpkg: error processing package ssh (--configure): dependency problems - leaving unconfigured Processing triggers for man-db (2.8.5-2) ... Illegal instruction Errors were encountered while processing: openssh-server ssh E: Sub-process /usr/bin/dpkg returned an error code (1) $ ls /usr/bin/ -lah | grep perl -rwxr-xr-x 2 root root 2.8M Mar 31 2019 perl -rwxr-xr-x 2 root root 2.8M Mar 31 2019 perl5.28.1 -rwxr-xr-x 1 root root 5.5K Mar 31 2019 perl5.28-arm-linux-gnueabihf -rwxr-xr-x 2 root root 46K Mar 31 2019 perlbug -rwxr-xr-x 1 root root 125 Mar 31 2019 perldoc -rwxr-xr-x 1 root root 11K Mar 31 2019 perlivp -rwxr-xr-x 2 root root 46K Mar 31 2019 perlthanks
It looks like the problem is caused by a chicken-and-egg problem between perl and debconf. Debconf is an optional feature allowing packages to get configuration questions at the start rather than in the middle of the installation: it's not vital, so that's the one to move away. On a Debian 9 or 10 system, its invocation is configured from /etc/apt/apt.conf.d/70debconf: // Pre-configure all packages with debconf before they are installed. // If you don't like it, comment it out. DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt || true";}; So just comment out the DPkg::Pre-Install-Pkgs line above. From the error message, I would think that the package libperl5.28 might have corrupted contents. Either reinstall it along perl-base with apt: apt-get --fix-broken --reinstall install perl-base libperl5.28 Or (if apt also needed Perl and also chokes) try directly with dpkg since it was downloaded: dpkg -i /var/cache/apt/archives/libperl5.28_5.28.1-6_armhf.deb In case you get more errors, that could mean something else happened before on the system but wasn't explained in the question. Knowing what error happened before on the system could then help fix it. Once perl is back working, you can uncomment the previous line to enable debconf back.
Dpkg can't load '/usr/lib/arm-linux-gnueabihf/perl/5.28/auto/Fcntl/Fcntl.so'
1,418,657,498,000
When I install packages via apt-get install <package> or aptitude install <package> and remove them afterwards with apt-get purge <package>; apt-get autoremove --purge, my system is not in the same state as before. It still has additional packages installed. The additional packages are marked as automatically installed, as indicated by apt-mark showauto. Namely this happens under Ubuntu 18.04 with g++-8, leaving cpp-8 gcc-8 libasan5:amd64 libcc1-0:amd64 libgcc-8-dev:amd64 libisl19:amd64 libmpc3:amd64 libmpfr6:amd64 libstdc++-8-dev:amd64 libubsan1:amd64. Is there a clean way to prevent this, in the sense of not having to parse APTs output?
The reason autoremove isn’t removing as much as you expect is that the packages which were installed automatically satisfy weak dependencies of other packages you already had installed. In your case, dpkg-dev is already installed, itself as an automatic dependency; because it recommends the virtual c-compiler package, any package providing c-compiler will be kept after it’s installed. Put another way, you have package A already installed with a weak dependency on package B, and package B isn’t installed. If you later install package C, with a dependency (strong or weak, but taken into account by apt’s configuration) on package B, package B will also be installed, and marked as automatically installed. Removing package C however won’t cause package B to be considered for auto-removal, because package A keeps it “interesting” as far as apt is concerned. You could ask autoremove to ignore weak dependencies (recommendations, by default), but that would probably cause a lot more packages to become removable than you’d expect or want. I’m not aware of any good solution for this. aptitude is somewhat more agressive in its automatic removals, but it doesn’t handle all situations either. See How do recommends and suggests interact with apt-get dist-upgrade and apt-get autoremove? and Why did 'apt-get autoremove' not work properly? for more on this.
How to prevent APT from keeping packages I didn't install?
1,418,657,498,000
I'm using a fresh beaglebone debian 7.9 armhf image and need to do some additional setup. Despite EoL being May 2018, the apt sources have still been available until recently. They are no longer available and are yet in the archives, either, at least not here. So what is my best option for installing a few packages one time on Debian 7.9? I've attached the list below, and the best option may be different for different packages. The system has gcc and make, but not cmake... of course I can check others. It has git 1.7.10.4. ntp ftp - preferred, but not essential sqlite3 - installed from source sqlite-autoconf-3280000.tar.gz openvpn libffi-dev Perhaps it will be as easy as downloading pkg files and installing manually with dpkg. If so, how do I determine and find the correct versions? Maybe if someone can walk me through one example, I can figure out the rest. $ uname -a Linux beaglebone 3.8.13-bone79 #1 SMP Tue Oct 13 20:44:55 UTC 2015 armv7l GNU/Linux For those who can't resist suggesting that I just upgrade: we are working on that. I have so far been unable to enable the UARTs in Stretch and even Jessie, and the documentation for that in sparse and/or contradictory. In the meantime, this would be helpful for our fairly restricted use case.
From the comments above. The packages can be installed from the debian wheezy archive. Change /etc/apt/sources.list to deb http://archive.debian.org/debian/ wheezy main contrib then install the missing packages with apt-get update apt-get install ntp ftp openvpn libffi-dev
How to install a few specific packages one time on Debian Wheezy (after EoL)
1,418,657,498,000
There is a troublemaking empty file (md5sums of kernel 4.19.1) left on my ubuntu system, with has strange owner/group/date/attributes How to fix or workaround this defect file? $ uname -a Linux olly-ryzen-pc1 4.20.10-042010-generic #201902150516 SMP Fri Feb 15 10:19:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux stat $ stat /var/lib/dpkg/info/linux-image-unsigned-4.19.1-041901-generic.md5sums   Datei: /var/lib/dpkg/info/linux-image-unsigned-4.19.1-041901-generic.md5sums   Größe: 0             Blöcke: 0          EA Block: 4096   Normale leere Datei <= empty file Gerät: 802h/2050d    Inode: 27918873    Verknüpfungen: 1 Zugriff: (5625/-rwS-w-r-t)  Uid: (477987903/ UNKNOWN)   Gid: (3699747887/ UNKNOWN) Zugriff    : 2381-05-02 11:29:39.163881368 +0100 Modifiziert: 2293-06-01 00:54:46.455862499 +0100 Geändert   : 2167-05-10 21:19:01.867729249 +0100  Geburt    : - lsattr $ lsattr /var/lib/dpkg/info/linux-image-unsigned-4.19.1-041901-generic.md5sums lsattr: Keine Daten verfügbar Beim Lesen der Flags von /var/lib/dpkg/info/linux-image-unsigned-4.19.1-041901-generic.md5sums apt, dpkg This file can't changed or deleted (remove/purge 4.19.1), but troubles apt-get to install applications. --fix-broken or --reinstall dpkg exit also with 'not allowed' message. Cannot be deleted. Die Control-Info-Datei »/var/lib/dpkg/info/linux-image-unsigned-4. 19.1-041901-generic.md5sums« kann nicht gelöscht werden: Vorgang nicht zulässig chmod -st, chown root:root No changes. rm -f No. live USB Also tried a boot of ubuntu (install 4.18) from USB-Stick to repair, but: sudo e2fsck -f /dev/sba2 does not report an error sudo badblocks -vsn /dev/sda2 reports 0 bad blocks and rm, chmod, chown: same behaivior as above .. Only to compare, here is a neighbor file: $ stat /var/lib/dpkg/info/linux-sound-base.md5sums   Datei: /var/lib/dpkg/info/linux-sound-base.md5sums   Größe: 545           Blöcke: 8          EA Block: 4096   Normale Datei Gerät: 802h/2050d    Inode: 27269131    Verknüpfungen: 1 Zugriff: (0644/-rw-r--r--)  Uid: (    0/    root)   Gid: (    0/    root) Zugriff    : 2019-02-03 16:56:08.943545720 +0100 Modifiziert: 2015-07-31 05:42:23.000000000 +0200 Geändert   : 2018-05-22 01:20:37.178864616 +0200  Geburt    : - $ lsattr /var/lib/dpkg/info/linux-image-unsigned-4.19.1-041901-generic.list --------------e--- /var/lib/dpkg/info/linux-image-unsigned-4.19.1-041901-generic.list
As fsck does not find anything wrong, you may need to use debugfs to clear the inode. Note that I last used debugfs years ago, so take care! Read the manpage first to see what's possible with this tool. Boot from a rescue medium, and run debugfs /dev/sda2 You can try to use debugfs's rm command to remove the file: rm /var/lib/dpkg/info/linux-image-unsigned-4.19.1-041901-generic.md5sums (assuming that /dev/sda2 is mounted on /, not /var) If that doesn't work, you might try freeing the inode. You already know the inode number (27918873) from the stat output. You can free the inode with: freei 27918873 After manipulating the filesystem with debugfs I recommend running fsck again.
Error when move or delete file on ext4 in dpkg info directory
1,418,657,498,000
With Raspbian and a 64-bit kernel, I am fetching packages from the following sources: deb [arch=armhf] http://raspbian.raspberrypi.org/raspbian/ stretch main contrib non-free rpi deb http://deb.debian.org/debian stretch main contrib non-free deb http://deb.debian.org/debian stretch-updates main contrib non-free Attempting to install the minimal dependencies to run something like gzip:arm64 reports conflicts such as: libgcc1 : Breaks: libgcc1:arm64 (!= 1:6.3.0-18+rpi1+deb9u1) but 1:6.3.0-18+deb9u1 is to be installed gcc-6-base:arm64 : Breaks: gcc-6-base (!= 6.3.0-18+deb9u1) but 6.3.0-18+rpi1+deb9u1 is to be installed It looks like the "+rpi1" armhf packages are conflicting with the non-rpi1 arm64 packages. But that would mean that it's comparing package versions across two different architectures! Error messages with apt-get can be misleading anyhow, so to bring my system into a state similar to bamarni's Debian Pi64 (where multiarch works), I can try downloading some non-rpi1 armhf packages from links such as https://packages.debian.org/stretch/armhf/libgcc1/download Once I replace libgcc1:armhf, gcc-6-base:armhf, libc6:armhf, libatomic1:armhf and others, basic conflicts go away and I can install libgcc1:arm64 gcc-6-base:arm64 libc6:arm64 via apt. However, this isn't a great solution because in the process I have likely lost ARMv6 compatibility and other Raspbian-specific modifications. And the above could still mean there's something else fishy hiding in the Raspbian packages. My next test is to use the Raspbian *.deb files, except with a script I repackage them to remove the +rpi1 part of the version text in each control file. Once I do this and reinstall those packages, the conflicts with arm64 packages go away. This again indicates that APT is comparing package versions across two different architectures. When I run apt-cache show on any of these they all say Multi-Arch: same with their correct corresponding Architecture: lines. As I understand things, it would only care about versions across different architectures in the cases of Multi-Arch: foreign or Multi-Arch: allowed. What's going on here? It seems like APT is comparing package versions across different architectures when it shouldn't, which leads to bogus conflicts. I wonder if the fact that multiarch works okay on bamarni's Pi64 or Ubuntu MATE--or most i386+x86_64 systems--is in part luck that these systems have generally consistent package versions across 32-bit and 64-bit.
This is mandated by the multiarch specification: multiarch packages are required to be kept in lockstep; i.e., an implicit Breaks: ${self}:other (!= ${binary:Version}). The reason is that packages always ship some arch-independent files in shared directories (/usr/share/doc), so the package management system has to ensure that they are identical across architectures. It does that by enforcing identical versions across architectures, even with binNMUs. Inside a single distribution this isn’t much of a problem, but across distributions it is. In your case specifically, let’s consider gcc-6-base (since that’s where the documentation lives). The Debian Stretch version installs its changelog in /usr/share/doc/gcc-6-base/changelog.Debian.gz. Installing the same package for other architectures, using the same version, installs the same file, so while technically there’s a conflict, it’s ignored. The Raspbian version however adds the following entry: gcc-6 (6.3.0-18+rpi1+deb9u1) stretch-staging; urgency=medium [changes brought forward from 6.1.1-1+rpi1 by Peter Michael Green <[email protected]> at Wed, 11 May 2016 20: * Disable testsuite. -- Raspbian forward porter <[email protected]> Thu, 01 Mar 2018 00:03:02 +0000 Now the /usr/share/doc/gcc-6-base/changelog.Debian.gz is no longer identical. If we were to install both Debian Stretch and Raspbian Stretch versions of the package side-by-side, which version of the file should be kept? There’s no way to decide, so the packaging system forbids the situation entirely.
APT version conflicts across different architectures even with Multi-Arch: same?
1,418,657,498,000
I'm using Debian 9.5 and recently uninstalled a package (mariadb), now as I try to install a new package, I keep getting this: E: Unable to correct problems, you have held broken packages. I have tried these commands but no result: sudo dpkg --configure -a sudo apt-get install -f apt-get install --fix-broken I have also ran this command to show the broken packages but it didn't show anything: apt-mark showhold Even when I try run sudo apt-get upgrade I get this: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. then i was able to install aptitude package manager(don't know how), and tried to install the new package with sudo aptitude install mysql-server and it showed something: The following packages have unmet dependencies: libdbi-perl : Depends: perlapi-5.24.1 which is a virtual package, provided by: - perl-base (5.24.1-3+deb9u4), but 5.26.2-7 is installed libfcgi-perl : Depends: perlapi-5.24.1 which is a virtual package, provided by: - perl-base (5.24.1-3+deb9u4), but 5.26.2-7 is installed libterm-readkey-perl : Depends: perlapi-5.24.1 which is a virtual package, provided by: - perl-base (5.24.1-3+deb9u4), but 5.26.2-7 is installed libdbd-mysql-perl : Depends: perlapi-5.24.1 which is a virtual package, provided by: - perl-base (5.24.1-3+deb9u4), but 5.26.2-7 is installed The following actions will resolve these dependencies: Keep the following packages at their current version: 1) default-mysql-server [Not Installed] 2) libcgi-fast-perl [Not Installed] 3) libdbd-mysql-perl [Not Installed] 4) libdbi-perl [Not Installed] 5) libfcgi-perl [Not Installed] 6) libterm-readkey-perl [Not Installed] 7) mariadb-server-10.1 [Not Installed] 8) mysql-server [Not Installed] Leave the following dependencies unresolved: 9) libcgi-pm-perl recommends libcgi-fast-perl (>= 1:2.01) 10) mariadb-client-10.1 recommends libdbd-mysql-perl (>= 1.2202) 11) mariadb-client-10.1 recommends libdbi-perl 12) mariadb-client-10.1 recommends libterm-readkey-perl and this is the output of apt policy pearl-base: perl-base: Installed: 5.26.2-7 Candidate: 5.26.2-7 Version table: *** 5.26.2-7 500 500 http://ftp.us.debian.org/debian testing/main amd64 Packages 100 /var/lib/dpkg/status 5.24.1-3+deb9u4 500 500 http://httpredir.debian.org/debian stretch/main amd64 Packages 500 http://ftp.de.debian.org/debian stretch/main amd64 Packages 500 http://deb.debian.org/debian stretch/main amd64 Packages
You have testing in your repositories, with priority 500, the same as your stable repositories; this effectively means that you’re running Debian testing, not Debian 9.5. (Thanks for helping test the next release of Debian!) mysql-server is currently not available in testing, so apt install mysql-server (or variants thereof) attempts to install the version in Debian stable; but that requires the Debian stable of Perl, not the Debian testing one, so the installation can’t proceed. To fix this, I recommend reverting to Debian stable. If you want to stay on testing, you’ll have to wait for MySQL to migrate there, or switch to a mixed testing/unstable setup.
APT holds broken install
1,418,657,498,000
I get the following error when running the command: $ sudo apt-get clean && sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoclean -y && sudo apt-get autoremove -y Hit:1 http://ppa.launchpad.net/remmina-ppa-team/remmina-next/ubuntu xenial InRelease Hit:2 http://gb.archive.ubuntu.com/ubuntu xenial InRelease Hit:3 http://security.ubuntu.com/ubuntu xenial-security InRelease Hit:4 http://gb.archive.ubuntu.com/ubuntu xenial-updates InRelease Hit:5 http://gb.archive.ubuntu.com/ubuntu xenial-backports InRelease Hit:6 http://repository.spotify.com stable InRelease Ign:7 http://dl.google.com/linux/chrome/deb stable InRelease Hit:8 https://packages.cisofy.com/community/lynis/deb xenial InRelease Hit:9 https://download.virtualbox.org/virtualbox/debian xenial InRelease Hit:10 https://download.sublimetext.com apt/stable/ InRelease Hit:11 http://dl.google.com/linux/chrome/deb stable Release Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages have been kept back: libmm-glib0 libqmi-proxy modemmanager The following packages will be upgraded: avahi-dnsconfd 1 to upgrade, 0 to newly install, 0 to remove and 3 not to upgrade. Need to get 14.1 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://gb.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 avahi-dnsconfd amd64 0.6.32~rc+dfsg-1ubuntu2.1 [14.1 kB] Fetched 14.1 kB in 0s (168 kB/s) dpkg: warning: files list file for package 'avahi-daemon' missing; assuming package has no files currently installed (Reading database ... 280768 files and directories currently installed.) Preparing to unpack .../avahi-dnsconfd_0.6.32~rc+dfsg-1ubuntu2.1_amd64.deb ... Job for avahi-daemon.socket canceled. dpkg: warning: subprocess old pre-removal script returned error exit status 1 dpkg: trying script from the new package instead ... Job for avahi-daemon.socket canceled. dpkg: error processing archive /var/cache/apt/archives/avahi-dnsconfd_0.6.32~rc+dfsg-1ubuntu2.1_amd64.deb (--unpack): subprocess new pre-removal script returned error exit status 1 Errors were encountered while processing: /var/cache/apt/archives/avahi-dnsconfd_0.6.32~rc+dfsg-1ubuntu2.1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) I tried the following: sudo apt-get -f install sudo dpkg --configure -a sudo rm /var/lib/dpkg/info/avahi-daemon.* But it didn't help. Information: $ uname -a Linux mybox 4.13.0-38-generic #43~16.04.1-Ubuntu SMP Wed Mar 14 17:48:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
Similar to: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=768949 I was able to fix my broken upgrade by doing sudo systemctl disable avahi-daemon sudo apt upgrade sudo systemctl enable avahi-daemon
dpkg: error processing archive
1,494,363,560,000
In Debian Jessie's /etc/cron.d/ there's a file called .placeholder, the contents of which claim: # DO NOT EDIT OR REMOVE # This file is a simple placeholder to keep dpkg from removing this directory Now, .placeholder files are mentioned various places, but under what conditions would one be necessary? When would dpkg decide to delete an empty directory under /etc?
This is probably left over from historical behaviour in dpkg. Nowadays removal is handled in remove.c, and directories are removed only if they are empty and the current package (being removed) is the only one using them (this is determined in help.c, in dir_is_used_by_others() and dir_is_used_by_pkg()). Looking at the cron package reveals the placeholders were introduced in 2004 as a remedy to bug #217760; it's possible that at the time, dpkg didn't check things as thoroughly as it does now, in such a way that if removing a package caused a directory to become empty, that directory would be deleted as well. So cron would install /etc/cron.d, but no file inside that directory; then another package would drop a file there, and removing that package would delete the file and also the directory (since it then became empty). This broke cron, so to avoid the bug a placeholder was added.
When will dpkg delete directories?
1,494,363,560,000
Installing python gives a dpkg error. I have done these commands, output below $ sudo apt-get install python3.4 $ sudo dpkg -C $ sudo apt-get check $ apt-cache policy libglib2.0-dev $ sudo dpkg --configure libglib2.0-dev $ sudo dpkg --audit $ sudo apt-get install cdrecord mkisofs slib libident spice-protocol \ default-jdk libaudio2:i386 libcacard default-jre $ apt-cache policy python $ sudo apt-get install python $ apt-cache policy libc6 $ sudo apt-get update ## no error $ sudo apt-get -f install python The output: $ sudo apt-get install python3.4 $ sudo apt-get install python3.4 Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: librrd4 ntop-data python-mako python-markupsafe Use 'apt-get autoremove' to remove them. The following extra packages will be installed: libdb5.3 libmpdec2 libpython3.4-minimal libpython3.4-stdlib python3.4-minimal Suggested packages: python3.4-venv python3.4-doc The following NEW packages will be installed: libdb5.3 libmpdec2 libpython3.4-minimal libpython3.4-stdlib python3.4 python3.4-minimal 0 upgraded, 6 newly installed, 0 to remove and 488 not upgraded. 1 not fully installed or removed. Need to get 4,804 kB of archives. After this operation, 19.0 MB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://ftp.de.debian.org/debian/ testing/main libdb5.3 i386 5.3.28-3 [662 kB] Get:2 http://ftp.de.debian.org/debian/ testing/main libmpdec2 i386 2.4.0-6 [76.4 kB] Get:3 http://ftp.de.debian.org/debian/ unstable/main libpython3.4-minimal i386 3.4.1-6 [484 kB] Get:4 http://ftp.de.debian.org/debian/ unstable/main libpython3.4-stdlib i386 3.4.1-6 [2,018 kB] Get:5 http://ftp.de.debian.org/debian/ unstable/main python3.4-minimal i386 3.4.1-6 [1,366 kB] Get:6 http://ftp.de.debian.org/debian/ unstable/main python3.4 i386 3.4.1-6 [198 kB] Fetched 4,804 kB in 7s (621 kB/s) Selecting previously unselected package libdb5.3:i386. (Reading database ... 459131 files and directories currently installed.) Unpacking libdb5.3:i386 (from .../libdb5.3_5.3.28-3_i386.deb) ... Selecting previously unselected package libmpdec2:i386. Unpacking libmpdec2:i386 (from .../libmpdec2_2.4.0-6_i386.deb) ... Selecting previously unselected package libpython3.4-minimal:i386. Unpacking libpython3.4-minimal:i386 (from .../libpython3.4-minimal_3.4.1-6_i386.deb) ... Selecting previously unselected package libpython3.4-stdlib:i386. Unpacking libpython3.4-stdlib:i386 (from .../libpython3.4-stdlib_3.4.1-6_i386.deb) ... Selecting previously unselected package python3.4-minimal. Unpacking python3.4-minimal (from .../python3.4-minimal_3.4.1-6_i386.deb) ... Selecting previously unselected package python3.4. Unpacking python3.4 (from .../python3.4_3.4.1-6_i386.deb) ... Processing triggers for man-db ... Processing triggers for menu ... Processing triggers for gnome-menus ... Processing triggers for desktop-file-utils ... dpkg: dependency problems prevent configuration of libglib2.0-dev: libglib2.0-dev depends on python:any (>= 2.6.6-7~). dpkg: error processing libglib2.0-dev (--configure): dependency problems - leaving unconfigured Setting up libdb5.3:i386 (5.3.28-3) ... Setting up libmpdec2:i386 (2.4.0-6) ... Setting up libpython3.4-minimal:i386 (3.4.1-6) ... Setting up libpython3.4-stdlib:i386 (3.4.1-6) ... Setting up python3.4-minimal (3.4.1-6) ... Setting up python3.4 (3.4.1-6) ... Processing triggers for menu ... Errors were encountered while processing: libglib2.0-dev E: Sub-process /usr/bin/dpkg returned an error code (1) $ sudo dpkg -C knoppix@Microknoppix:/var/lib$ sudo dpkg -C The following packages have been unpacked but not yet configured. They must be configured using dpkg --configure or the configure menu option in dselect for them to work: libglib2.0-dev Development files for the GLib library The following packages are missing the md5sums control file in the database, they need to be reinstalled: cdrecord Dummy transition package for wodim mkisofs Dummy transition package for genisoimage slib Portable Scheme library libident simple RFC1413 client library - runtime spice-protocol spice-protocol default-jdk Standard Java or Java compatible Development Kit libaudio2:i386 Network Audio System - shared libraries libcacard libcacard default-jre Standard Java or Java compatible Runtime $sudo apt-get check knoppix@Microknoppix:/var/lib$ apt-get check E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root? knoppix@Microknoppix:/var/lib$ sudo apt-get check Reading package lists... Done Building dependency tree Reading state information... Done $ apt-cache policy libglib2.0-dev knoppix@Microknoppix:/var/lib$ apt-cache policy libglib2.0-dev libglib2.0-dev: Installed: 2.40.0-3 Candidate: 2.40.0-3 Version table: 2.41.0-1 0 1 http://ftp.de.debian.org/debian/ experimental/main i386 Packages *** 2.40.0-3 0 500 http://ftp.de.debian.org/debian/ testing/main i386 Packages 500 http://ftp.de.debian.org/debian/ unstable/main i386 Packages 100 /var/lib/dpkg/status 2.33.12+really2.32.4-5 0 990 http://ftp.de.debian.org/debian/ stable/main i386 Packages $sudo dpkg --configure libglib2.0-dev knoppix@Microknoppix:~$ sudo dpkg --configure libglib2.0-dev dpkg: dependency problems prevent configuration of libglib2.0-dev: libglib2.0-dev depends on python:any (>= 2.6.6-7~). dpkg: error processing libglib2.0-dev (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: libglib2.0-dev $sudo dpkg --audit knoppix@Microknoppix:~$ sudo dpkg --audit The following packages have been unpacked but not yet configured. They must be configured using dpkg --configure or the configure menu option in dselect for them to work: libglib2.0-dev Development files for the GLib library The following packages are missing the md5sums control file in the database, they need to be reinstalled: cdrecord Dummy transition package for wodim mkisofs Dummy transition package for genisoimage slib Portable Scheme library libident simple RFC1413 client library - runtime spice-protocol spice-protocol default-jdk Standard Java or Java compatible Development Kit libaudio2:i386 Network Audio System - shared libraries libcacard libcacard default-jre Standard Java or Java compatible Runtime $ sudo apt-get install cdrecord mkisofs slib libident spice-protocol default-jdk libaudio2:i386 libcacard default-jre knoppix@Microknoppix:~$ sudo apt-get install cdrecord mkisofs slib libident spice-protocol default-jdk libaudio2:i386 libcacard default-jre Reading package lists... Done Building dependency tree Reading state information... Done default-jdk is already the newest version. default-jdk set to manually installed. default-jre is already the newest version. libident is already the newest version. libident set to manually installed. slib is already the newest version. cdrecord is already the newest version. mkisofs is already the newest version. spice-protocol is already the newest version. libcacard is already the newest version. The following packages were automatically installed and are no longer required: librrd4 ntop-data python-mako python-markupsafe Use 'apt-get autoremove' to remove them. Suggested packages: nas The following packages will be upgraded: libaudio2 1 upgraded, 0 newly installed, 0 to remove and 487 not upgraded. 1 not fully installed or removed. Need to get 87.0 kB of archives. After this operation, 4,096 B of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://ftp.de.debian.org/debian/ stable/main libaudio2 i386 1.9.3-5wheezy1 [87.0 kB] Fetched 87.0 kB in 0s (302 kB/s) (Reading database ... 459964 files and directories currently installed.) Preparing to replace libaudio2:i386 1.9.3-5 (using .../libaudio2_1.9.3-5wheezy1_i386.deb) ... Unpacking replacement libaudio2:i386 ... dpkg: dependency problems prevent configuration of libglib2.0-dev: libglib2.0-dev depends on python:any (>= 2.6.6-7~). dpkg: error processing libglib2.0-dev (--configure): dependency problems - leaving unconfigured Setting up libaudio2:i386 (1.9.3-5wheezy1) ... Errors were encountered while processing: libglib2.0-dev E: Sub-process /usr/bin/dpkg returned an error code (1) knoppix@Microknoppix:~$ $ apt-cache policy python knoppix@Microknoppix:/var/lib$ apt-cache policy python python: Installed: 2.7.3-4 Candidate: 2.7.3-4+deb7u1 Version table: 2.7.6-2 0 500 http://ftp.de.debian.org/debian/ testing/main i386 Packages 500 http://ftp.de.debian.org/debian/ unstable/main i386 Packages 2.7.3-4+deb7u1 0 990 http://ftp.de.debian.org/debian/ stable/main i386 Packages *** 2.7.3-4 0 100 /var/lib/dpkg/status knoppix@Microknoppix:/var/lib$ Trying apt-get install python (not specifying version) $ sudo apt-get install python knoppix@Microknoppix:/var/lib$ sudo apt-get install python Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: librrd4 ntop-data python-mako python-markupsafe Use 'apt-get autoremove' to remove them. The following extra packages will be installed: python-minimal Suggested packages: python-doc The following packages will be upgraded: python python-minimal 2 upgraded, 0 newly installed, 0 to remove and 485 not upgraded. 1 not fully installed or removed. Need to get 223 kB of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://ftp.de.debian.org/debian/ stable/main python all 2.7.3-4+deb7u1 [181 kB] Get:2 http://ftp.de.debian.org/debian/ stable/main python-minimal all 2.7.3-4+deb7u1 [42.8 kB] Fetched 223 kB in 0s (390 kB/s) (Reading database ... 459964 files and directories currently installed.) Preparing to replace python 2.7.3-4 (using .../python_2.7.3-4+deb7u1_all.deb) ... Unpacking replacement python ... Preparing to replace python-minimal 2.7.3-4 (using .../python-minimal_2.7.3-4+deb7u1_all.deb) ... Unpacking replacement python-minimal ... Processing triggers for doc-base ... Processing 1 changed doc-base file... Registering documents with scrollkeeper... Processing triggers for man-db ... Setting up python-minimal (2.7.3-4+deb7u1) ... Setting up python (2.7.3-4+deb7u1) ... dpkg: dependency problems prevent configuration of libglib2.0-dev: libglib2.0-dev depends on python:any (>= 2.6.6-7~). dpkg: error processing libglib2.0-dev (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: libglib2.0-dev E: Sub-process /usr/bin/dpkg returned an error code (1) knoppix@Microknoppix:/var/lib$ $ apt-cache policy libc6 knoppix@Microknoppix:~$ apt-cache policy libc6 libc6: Installed: 2.17-5 Candidate: 2.19-1 Version table: 2.19-1 0 500 http://ftp.de.debian.org/debian/ testing/main i386 Packages 500 http://ftp.de.debian.org/debian/ unstable/main i386 Packages *** 2.17-5 0 100 /var/lib/dpkg/status 2.13-38+deb7u1 0 990 http://ftp.de.debian.org/debian/ stable/main i386 Packages knoppix@Microknoppix:~$ after sudo apt-get update and doing sudo apt-get -f install python, I still get the error $sudo apt-get -f install python knoppix@Microknoppix:~/ntopngtr2/ntopng-1.1_6932$ sudo apt-get -f install python Reading package lists... Done Building dependency tree Reading state information... Done python is already the newest version. python set to manually installed. The following packages were automatically installed and are no longer required: librrd4 ntop-data python-mako python-markupsafe Use 'apt-get autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 486 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y dpkg: dependency problems prevent configuration of libglib2.0-dev: libglib2.0-dev depends on python:any (>= 2.6.6-7~). dpkg: error processing libglib2.0-dev (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: libglib2.0-dev E: Sub-process /usr/bin/dpkg returned an error code (1) knoppix@Microknoppix:~/ntopngtr2/ntopng-1.1_6932$
0 upgraded, 6 newly installed, 0 to remove and 488 not upgraded. The problem here is that you are in-between several upgrade paths for every package. You are not using stable, nor testing, and that brings about problems. You should upgrade as many packages as possible to stable first: sudo apt-get -t stable dist-upgrade Then decide if you want to downgrade everything to stable or follow through to testing, in which case you should remove stable entries in your sources.list and upgrade again: sudo sed -i '/stable/d' /etc/apt/sources.list sudo apt-get dist-upgrade I would personally just re-install the system just to make sure there's no further problems with dependencies and stick with either stable or testing. I don't know what Knoppix uses as a basis, but you don't seems to be using any repository apart from Debian.
Installing python gives dpkg error
1,494,363,560,000
Please someone explain to me this, because it makes no sense: $ dpkg -i freeling-3.1-quantal-x86_64.deb Selecting previously unselected package freeling. (Reading database ... 283003 files and directories currently installed.) Preparing to unpack freeling-3.1-quantal-x86_64.deb ... Unpacking freeling (3.1) ... dpkg: dependency problems prevent configuration of freeling: freeling depends on libboost-program-options1.49.0 (>= 1.49); however: Package libboost-program-options1.49.0 is not installed. freeling depends on libboost-regex1.49.0 (>= 1.49); however: Package libboost-regex1.49.0 is not installed. freeling depends on libboost-system1.49.0 (>= 1.49); however: Package libboost-system1.49.0 is not installed. freeling depends on libicu48 (>= 4.8.1); however: Package libicu48:amd64 is not installed. But I have liboost 1.54 !!! (ALL packages) $ apt-cache policy libboost-program-options1.54.0 libboost-program-options1.54.0: Installed: 1.54.0-5 Candidate: 1.54.0-5 $ apt-cache policy libboost-program-options-dev libboost-program-options-dev: Installed: 1.54.0.1 Candidate: 1.54.0.1 And so on for all of the dependencies. Is this package broken, or am I looking at a problem with my settings? As far as I understand, (>= 1.49) means greater or equal to 1.49, right?
You need the package called libboost-program-options1.49.0. It can be any version greater or equal to 1.49, but it needs to be that package name. libboost-program-options1.54.0 is a different package name. There are different package names because they have incompatible ABIs, so an executable compiled for 1.49.0 won't work with 1.54.0 or vice versa. Since the package names are different, you can have both installed, which allows you to use programs compiled for 1.49.0 and programs compiled for 1.54.0 on the same system. The package name …-quantal-… indicates that this is a package intended for Ubuntu 10.10 quantal. On a more recent Ubuntu release such as saucy or trusty, you should grab the source package and recompile it, or find a binary intended for your Ubuntu version. Alternatively, you can try grabbing the old 1.49.0 libraries which are still available in raring (also, old Ubuntu releases are archived on old-releases.ubuntu.com), but this might bring you into some dependency hell, so I recommend recompiling Freeling.
dpkg won't install package with dependencies that have newer version
1,494,363,560,000
Let's say I installed foo. The foo package depends on bar, so bar was installed to satisfy foo's dependency. How can I get Ubuntu/APT/dpkg to tell me that bar is installed because foo is installed? I know aptitude has a way to do this. But I can't for the life of me get it to switch the bottom pane to the "why installed" tab. How to do that would be a potential answer.
From the command line you can run aptitude why bar This seems to do whatever it takes to provide an answer, meaning it will never tell you "explicitly installed" and will instead find a recommends or suggests that the package fulfills.
How can I know the dependency packages for an installed package?
1,494,363,560,000
I want to install a systemd unit using debhelper and dh_installsystemd. My control file: Package: prometheus-wireguard-exporter Version: 3.6.3-###CI_JOB_ID### Maintainer: Ronny Forberger Architecture: amd64 Build-Depends: debhelper, dh-systemd (>= 1.5) Description: Prometheus Wireguard Exporter My rules file: #!/usr/bin/make -f export DH_VERBOSE = 1 %: dh $@ --with systemd override_dh_installsystemd: dh_installsystemd --name=prometheus-wireguard-exporter Directory tree: prometheus_wireguard_exporter_amd64 ├── debian -> DEBIAN └── DEBIAN ├── control ├── postinst ├── prometheus-wireguard-exporter.prometheus-wireguard-exporter.service -> prometheus-wireguard-exporter.service ├── prometheus-wireguard-exporter.service └── rules 2 directories, 5 files my postinst script: #!/bin/sh set -e # source debconf library . /usr/share/debconf/confmodule # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# db_stop exit 0 I build the package with dpkg-deb --build --root-owner-group -v prometheus_wireguard_exporter_amd64 The postinst script runs, but seems not to call debhelper. Anyone knows what is wrong?
If you want to benefit from debhelper, you need to build from a source package, instead of building a binary package directly: drop the debian symlink to DEBIAN rename DEBIAN to debian rename prometheus_wireguard_exporter_amd64 to prometheus-wireguard-exporter add a debian/changelog file (dch --create) build your package using dpkg-buildpackage (dpkg-buildpackage -us -uc)
Debian package rules file: debhelper doesn't seem to be called as expected
1,494,363,560,000
I have created a deb package that includes a postrm script that fails to be executed. The error message says that the script cannot be found but it is well placed, it can be run manually with bash and the execution permissions seem ok. What else should I check to find out the cause of the failure? Here there is an example of the error with minimal postrm script: user@linux:~$ sudo apt-get remove mypkg Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: mypkg 0 upgraded, 0 newly installed, 1 to remove and 79 not upgraded. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 123043 files and directories currently installed.) Removing mypkg (1.8.1) ... dpkg (subprocess): unable to execute installed mypkg package post-removal script (/var/lib/dpkg/info/mypkg.postrm): No such file or directory dpkg: error processing package mypkg (--remove): installed mypkg package post-removal script subprocess returned error exit status 2 dpkg: too many errors, stopping Errors were encountered while processing: mypkg Processing was halted because there were too many errors. E: Sub-process /usr/bin/dpkg returned an error code (1) user@linux:~$ more /var/lib/dpkg/info/mypkg.postrm #!/bin/sh echo "Post rm" user@linux:~$ bash /var/lib/dpkg/info/mypkg.postrm Post rm user@linux:~$ ls -l /var/lib/dpkg/info/mypkg.* -rwxr-xr-x 1 root root 30 Jun 15 17:39 /var/lib/dpkg/info/mypkg.conffiles -rw-r--r-- 1 root root 60 Jun 21 10:27 /var/lib/dpkg/info/mypkg.list -rw-r--r-- 1 root root 5052 Jun 21 10:21 /var/lib/dpkg/info/mypkg.md5sums -rwxr-xr-x 1 root root 107 Jun 20 10:06 /var/lib/dpkg/info/mypkg.postinst -rwxr-xr-x 1 root root 25 Jun 20 13:29 /var/lib/dpkg/info/mypkg.postrm -rwxr-xr-x 1 root root 0 Jun 15 17:39 /var/lib/dpkg/info/mypkg.preinst -rwxr-xr-x 1 root root 10 Jun 15 17:39 /var/lib/dpkg/info/mypkg.prerm
The postrm script was not working because it had been created on a windows machine with CRLF line-endings. I had assumed that was not the case because I could run it with bash. However /bin/sh in my system is pointing to dash so I could not directly run the postrm script. Thanks to @cas comment I did a proper check and I found out the issue: user@linux:~$ file /var/lib/dpkg/info/mypkg.postrm /var/lib/dpkg/info/mypkg.postrm: POSIX shell script, ASCII text executable, with CRLF line terminators user@linux:~$ /var/lib/dpkg/info/mypkg.postrm -bash: /var/lib/dpkg/info/mypkg.postrm: /bin/sh^M: bad interpreter: No such file or directory user@linux:~$ ls -l /bin lrwxrwxrwx 1 root root 7 Aug 24 2021 /bin -> usr/bin user@linux:~$ ls -l /usr/bin/sh lrwxrwxrwx 1 root root 4 Aug 24 2021 /usr/bin/sh -> dash
Postrm script fails to execute
1,494,363,560,000
I have a PC with WSL2/Ubuntu 20.04. I recently tried installing a package on it (the Dell srvadmin package). The installation fell over half way through as WSL2 doesn't have systemd on it. This has left the package in a half-installed/broken status and I can't remove/purge etc. it with wither dpkg or apt e.g. tim@DESKTOP-Q35QTRS:~/interlocutor$ sudo dpkg -r --force-all srvadmin-hapi (Reading database ... 54160 files and directories currently installed.) Removing srvadmin-hapi (9.3.2) ... System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down dpkg: error processing package srvadmin-hapi (--remove): installed srvadmin-hapi package pre-removal script subprocess returned error exit status 1 System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down dpkg: error while cleaning up: installed srvadmin-hapi package post-installation script subprocess returned error exit status 1 Processing triggers for libc-bin (2.31-0ubuntu9.2) ... Errors were encountered while processing: srvadmin-hapi tim@DESKTOP-Q35QTRS:~/interlocutor$ So is it possible for me to manually do the steps that dpkg is failing to do or otherwise somehow remove the broken package?
Edit /var/lib/dpkg/info/srvadmin-hapi.prerm, and insert set -x as the second line (i.e. immediately after the #! line). Editing this script will need to be done as root. Then run dpkg -r --force-all srvadmin-hapi again. This will show you what's happening inside the .prerm script, and exactly which command is failing. That should give you enough info to fix the problem and remove the package. Alternatively, for a brute-force "fix", if it doesn't look like the .prerm doing much important (or if the only significant thing it does is to execute systemctl stop srvadmin-hapi or systemctl status or similar), then just insert exit 0 as the second line of the .prerm script. You should then be able to purge the package without further problems.
Manually remove package which can't be removed with apt/dpkg
1,494,363,560,000
TLDR I issued a dpkg -i PACKAGE of a newer version of PACKAGE from a newer version of the distrib. It depends on a new libc6 package, thus it failed installing. Now the package blocks the whole apt system. I just want the system to understand that it can stop wanting to install this package. How would I do that ? Longer full version My server is on Debian 10. It ships with mawk-1.3.3 from 1996 (according to mawk -W version). On my ubuntu laptop I have mawk-1.3.4, the script I wrote on my laptop is not compatible with mawk-1.3.3. So I headed to find a quick way (yeah I know...) to install this on my server. It happens that mawk-1.3.4 is in unstable and testing for sid, the next debian. I sneakily downloaded the deb, and wanted to have a try about dpkg -i mawk_1.3.4.20200120-2_amd64.deb. This failed: mawk depends on libc6 (>= 2.29); however: Version of libc6:amd64 on system is 2.28-10. Fair enough, this is not the way to go, how do I go back to before ? nothing was installed anyway, this shouldn't be too hard, should it ? What I tried apt --fix-broken install want to uninstall base-files and bash, and I have a very bad feeling about this: The following packages will be REMOVED: base-files bash mawk rsync WARNING: The following essential packages will be removed. This should NOT be done unless you know exactly what you are doing! base-files mawk (due to base-files) bash I remembered about dpkg -r and issued a dpkg -r mawk with a little bit of fear for my actual legacy version of mawk: base-files depends on awk; however: Package awk is not installed. Package mawk which provides awk is to be removed. dpkg: error processing package mawk (--remove): dependency problems - not removing Errors were encountered while processing: mawk So I tried installing gawk in a subtle attempt to keep awk dependency intact and thus keep base-files and bash (mawk and gawk both can provide awk). But remember, the install system is blocked, this is what I get from apt-get install gawk. The following packages have unmet dependencies: gawk : PreDepends: libsigsegv2 (>= 2.9) but it is not going to be installed mawk : Depends: libc6 (>= 2.29) but 2.28-10 is to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). And it seems it doesn't want to let me do anything before "specifying a solution". Which is ironic : I have a pretty clear and sound solution for this issue: stop wanting to install this package. How can I do that ? More info As dpkg seems to tell me it can't install anything, I assume that nothing have really been touched on the system, all this problem seems to be located in dpkg's state. So in despair, I've looked in /var/lib/dpkg and found mention of the culprit package in status, here are some part that seemed interesting: ... Package: mawk Status: install ok unpacked Priority: required ... Architecture: amd64 Multi-Arch: foreign Version: 1.3.4.20200120-2 Config-Version: 1.3.3-17+b3 ... If anyone has a suggestion. I'm ready to hack my way through files and folder on /var/lib/dpkg, but this seems a little silly situation (and it seems that it could be quite common scenario also) that ought to have a nice dpkg command to tell politely to dpkg to forget about me wanting to install this package.
I don’t think any hack should be necessary; asking apt to install the current Debian 10 version should be enough: sudo apt install mawk/buster Alternatively, ask dpkg: sudo dpkg -i /var/cache/apt/archives/mawk_1.3.3-17+b3_amd64.deb (assuming you still have the package in your APT cache).
How to abort installation of an uninstallable package with debian packaging
1,494,363,560,000
I'm currently creating a custom live-image installer. Anyways, I'm taking a look at all other packages in the binary stage and many (if not all) are using debconf to show progress bars and take inputs, etc. My problem is none of the debconf manuals states about commands like db_progress nor are there any helpful information in /usr/share/debconf/confmodule. Not even a google search with quotes ["debconf" "db_progress"] would lead me to any valid information. Where do I find them?
The debconf commands are supposed to be described in man debconf-devel (look at it on your system, the online version is poorly-formatted), but db_progress isn’t mentioned there. As far as I can tell, the only description of progress-bar handling is in Debconf::ConfModule. You can see it in use in the demo sample.
Where are the manuals for debconf specific commands?
1,494,363,560,000
I have a package that I am installing directly from a .deb file by running sudo dpkg -i. After running that, I am presented with the list of unmet dependencies for the package. When I run sudo apt-get install -f to install the dependencies, apt-get instead removes my package without explaining why. Is there a way to see why apt-get is removing my package instead of installing its dependencies?
I was able to figure out what was going wrong by running apt-get with a debug option: sudo apt-get -o Debug::pkgProblemResolver=true install -f This showed why the package was being removed. In my case, apt-get couldn't find a certain dependency in the repositories.
Can I see why apt-get install -f is removing my package?
1,494,363,560,000
I've been experiencing this problem the past few days with the gnuplot packages. First of all, i execute dpkg --configure -a and this is the output: Processing triggers for tex-common (6.09) ... Running mktexlsr. This may take some time... done. dpkg: dependency problems prevent configuration of gnuplot-qt: gnuplot-qt depends on gnuplot-data (= 5.2.0+dfsg1-2); however: Package gnuplot-data is not installed. dpkg: error processing package gnuplot-qt (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of gnuplot: gnuplot depends on gnuplot-qt | gnuplot-x11 | gnuplot-nox; however: Package gnuplot-qt is not configured yet. Package gnuplot-x11 is not installed. Package gnuplot-nox is not installed. Package gnuplot-qt which provides gnuplot-nox is not configured yet. dpkg: error processing package gnuplot (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: gnuplot-qt gnuplot Afterwards i try apt-get update && apt-get upgrade: Hit:1 http://ftp.cc.uoc.gr/mirrors/linux/kali/kali kali-rolling InRelease Reading package lists... Done Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: gnuplot-qt : Depends: gnuplot-data (= 5.2.0+dfsg1-2) but it is not installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). And finally apt --fix-broken install: Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required: castxml espeak-data firebird2.5-common firebird2.5-common-doc gccxml gdebi-core gnome-icon-theme-symbolic gnome-mime-data gnupg-agent gnuplot-tex gnuplot5-data gnuplot5-qt imagemagick-common iproute libasn1-8-heimdal libbind9-90 libblas-common libbonobo2-0 libbonobo2-common libboost-filesystem1.58.0 libboost-python1.58.0 libboost-system1.58.0 libboost-thread1.58.0 libcamel-1.2-54 libclutter-gst-2.0-0 libcrypto++6 libcrypto++9v5 libdbus-1-dev libdns100 libebook-1.2-16 libedataserver-1.2-21 libemu2 libespeak1 libevent-core-2.0-5 libevent-openssl-2.0-5 libevent-pthreads-2.0-5 libgdict-1.0-9 libgdict-common libgeos-3.5.0 libgfortran3 libgif4 libglew1.13 libgmime-2.6-0 libgnome-2-0 libgnome2-common libgnomevfs2-0 libgnomevfs2-common libgnomevfs2-extra libgrilo-0.2-1 libgssapi3-heimdal libgtop-2.0-10 libhcrypto4-heimdal libhdb9-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhunspell-1.3-0 libhx509-5-heimdal libical1a libilmbase6v5 libisc95 libisccc90 libisccfg90 libjasper1 libjavascriptcoregtk-3.0-0 libjim0.76 libjpeg9 libjs-mochikit libkdc2-heimdal libkrb5-26-heimdal libllvm3.7 liblouis9 liblua5.1-0 liblwres90 libnm-glib-vpn1 libnm-gtk-common libntdb1 libopenexr6v5 liborbit-2-0 libpango1.0-0 libpangox-1.0-0 libpoppler57 libpth20 libpython3.4-minimal libpython3.4-stdlib libpython3.5 libpython3.5-minimal libpython3.5-stdlib libqgsttools-p1 libqmi-glib1 libqt5multimedia5-plugins libqt5multimediawidgets5 libquvi-scripts libquvi7 libradare2-0.9.9 libregfi0 libroken18-heimdal libtracker-control-1.0-0 libtracker-miner-1.0-0 libtracker-sparql-1.0-0 libtrio2 libunistring0 liburcu4 libusbmuxd2 libva-x11-1 libwebkitgtk-3.0-0 libwebpdemux1 libwebpmux1 libwebrtc-audio-processing-0 libwind0-heimdal libwireshark6 libwiretap5 libwsutil6 libzip2 python-alembic python-boltons python-characteristic python-cheetah python-ctypeslib python-dap python-dbus-dev python-distlib python-ecdsa python-editor python-formencode python-geoip2 python-geojson python-icalendar python-ipaddr python-lzma python-lzo python-maxminddb python-mpltoolkits.basemap python-ntdb python-opengl python-openid python-paste python-pastedeploy python-pastedeploy-tpl python-pastescript python-pyatspi python-pycryptopp python-pylibemu python-pyotp python-pyqtgraph python-qt4-gl python-scgi python-smoke-zephyr python-tempita python-tidylib python-tzlocal python3.4 python3.4-minimal ruby-rainbow ruby-rexec ruby2.2-dev Use 'apt autoremove' to remove them. The following additional packages will be installed: gnuplot-data The following NEW packages will be installed: gnuplot-data 0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded. 2 not fully installed or removed. Need to get 166 kB of archives. After this operation, 416 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://ftp.cc.uoc.gr/mirrors/linux/kali/kali kali-rolling/main amd64 gnuplot-data all 5.2.0+dfsg1-2 [166 kB] Fetched 166 kB in 1s (99.8 kB/s) (Reading database ... 351586 files and directories currently installed.) Preparing to unpack .../gnuplot-data_5.2.0+dfsg1-2_all.deb ... Unpacking gnuplot-data (5.2.0+dfsg1-2) ... dpkg: error processing archive /var/cache/apt/archives/gnuplot-data_5.2.0+dfsg1-2_all.deb (--unpack): trying to overwrite '/usr/share/texmf/tex/latex/gnuplot/gnuplot-lua-tikz-common.tex', which is also in package gnuplot-tex 4.6.6-3 Errors were encountered while processing: /var/cache/apt/archives/gnuplot-data_5.2.0+dfsg1-2_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) apt autoremove and apt-get -f install end with the same gnuplot-data problem. Output of sudo apt purge gnuplot{,-qt,-data,-tex}: Reading package lists... Done Building dependency tree Reading state information... Done Package 'gnuplot-data' is not installed, so not removed You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: gnuplot5-data : Depends: gnuplot-tex but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). And output of sudo apt install gnuplot: Reading package lists... Done Building dependency tree Reading state information... Done gnuplot is already the newest version (5.2.0+dfsg1-2). gnuplot set to manually installed. You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies: gnuplot-qt : Depends: gnuplot-data (= 5.2.0+dfsg1-2) but it is not going to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). Didn't seem to do anything, so i tried sudo apt purge gnuplot{,-qt,-data,-tex} gnuplot5{,-qt,-data}, cause i don't have gnuplot5-tex: Reading package lists... Done Building dependency tree Reading state information... Done Package 'gnuplot5' is not installed, so not removed Package 'gnuplot-data' is not installed, so not removed The following packages were automatically installed and are no longer required: aglfn castxml espeak-data firebird2.5-common firebird2.5-common-doc gccxml gdebi-core gnome-icon-theme-symbolic gnome-mime-data gnupg-agent imagemagick-common iproute libasn1-8-heimdal libbind9-90 libblas-common libbonobo2-0 libbonobo2-common libboost-filesystem1.58.0 libboost-python1.58.0 libboost-system1.58.0 libboost-thread1.58.0 libcamel-1.2-54 libclutter-gst-2.0-0 libcrypto++6 libcrypto++9v5 libdbus-1-dev libdns100 libebook-1.2-16 libedataserver-1.2-21 libemu2 libespeak1 libevent-core-2.0-5 libevent-openssl-2.0-5 libevent-pthreads-2.0-5 libgdict-1.0-9 libgdict-common libgeos-3.5.0 libgfortran3 libgif4 libglew1.13 libgmime-2.6-0 libgnome-2-0 libgnome2-common libgnomevfs2-0 libgnomevfs2-common libgnomevfs2-extra libgrilo-0.2-1 libgssapi3-heimdal libgtop-2.0-10 libhcrypto4-heimdal libhdb9-heimdal libheimbase1-heimdal libheimntlm0-heimdal libhunspell-1.3-0 libhx509-5-heimdal libical1a libilmbase6v5 libisc95 libisccc90 libisccfg90 libjasper1 libjavascriptcoregtk-3.0-0 libjim0.76 libjpeg9 libjs-mochikit libkdc2-heimdal libkrb5-26-heimdal libllvm3.7 liblouis9 liblua5.1-0 liblwres90 libnm-glib-vpn1 libnm-gtk-common libntdb1 libopenexr6v5 liborbit-2-0 libpango1.0-0 libpangox-1.0-0 libpoppler57 libpth20 libpython3.4-minimal libpython3.4-stdlib libpython3.5 libpython3.5-minimal libpython3.5-stdlib libqgsttools-p1 libqmi-glib1 libqt5multimedia5-plugins libqt5multimediawidgets5 libquvi-scripts libquvi7 libradare2-0.9.9 libregfi0 libroken18-heimdal libtracker-control-1.0-0 libtracker-miner-1.0-0 libtracker-sparql-1.0-0 libtrio2 libunistring0 liburcu4 libusbmuxd2 libva-x11-1 libwebkitgtk-3.0-0 libwebpdemux1 libwebpmux1 libwebrtc-audio-processing-0 libwind0-heimdal libwireshark6 libwiretap5 libwsutil6 libzip2 python-alembic python-boltons python-characteristic python-cheetah python-ctypeslib python-dap python-dbus-dev python-distlib python-ecdsa python-editor python-formencode python-geoip2 python-geojson python-icalendar python-ipaddr python-lzma python-lzo python-maxminddb python-mpltoolkits.basemap python-ntdb python-opengl python-openid python-paste python-pastedeploy python-pastedeploy-tpl python-pastescript python-pyatspi python-pycryptopp python-pylibemu python-pyotp python-pyqtgraph python-qt4-gl python-scgi python-smoke-zephyr python-tempita python-tidylib python-tzlocal python3.4 python3.4-minimal ruby-rainbow ruby-rexec ruby2.2-dev Use 'sudo apt autoremove' to remove them. The following packages will be REMOVED: gnuplot* gnuplot-qt* gnuplot-tex* gnuplot5-data* gnuplot5-qt* 0 upgraded, 0 newly installed, 5 to remove and 0 not upgraded. 10 not fully installed or removed. After this operation, 6,452 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 352000 files and directories currently installed.) Removing gnuplot (5.2.0+dfsg1-2) ... Removing gnuplot-qt (5.2.0+dfsg1-2) ... Removing gnuplot5-qt (5.0.2+dfsg1-1) ... Removing gnuplot5-data (5.0.2+dfsg1-1) ... Removing gnuplot-tex (4.6.6-3) ... Processing triggers for tex-common (6.09) ... Running mktexlsr. This may take some time... done. Setting up exploitdb (20171114-0kali1) ... Processing triggers for menu (2.1.47+b1) ... Setting up aptitude-common (0.8.9-1) ... Processing triggers for libc-bin (2.24-17) ... Setting up libio-string-perl (1.08-3) ... Processing triggers for man-db (2.7.6.1-2) ... Setting up libcwidget3v5:amd64 (0.5.17-6) ... Setting up aptitude-doc-en (0.8.9-1) ... Setting up libclass-accessor-perl (0.51-1) ... Setting up aptitude (0.8.9-1) ... update-alternatives: using /usr/bin/aptitude-curses to provide /usr/bin/aptitude (aptitude) in auto mode Setting up libparse-debianchangelog-perl (1.2.0-12) ... (Reading database ... 351903 files and directories currently installed.) Purging configuration files for gnuplot5-qt (5.0.2+dfsg1-1) ... Processing triggers for menu (2.1.47+b1) ... Processing triggers for libc-bin (2.24-17) ... It probably removed everything gnuplot related. Going to reboot and run this sudo apt install gnuplot.
Wow, you’ve got an old gnuplot-tex package causing problems. Remove that: sudo apt purge gnuplot-tex and everything should return to normal. If the above doesn’t work because of the missing gnuplot-data, use the following instead to remove gnuplot-tex while installing gnuplot-data: sudo aptitude install gnuplot-tex_ gnuplot-data (the _ tells aptitude to purge gnuplot-tex even though the command is install). Since aptitude’s not working, you can remove the offending packages and re-install them: sudo apt purge gnuplot{,-qt,-data,-tex} sudo apt install gnuplot
Getting errors while trying to install a package in Kali Linux
1,494,363,560,000
Is there a way to prevent gdebi (on the command line) from reinstalling the same version of a .deb file that is already installed? For example, if I do $ gdebi -n example.deb Reading package lists... Done Building dependency tree Reading state information... Done Reading state information... Done (Reading database ... 568005 files and directories currently installed.) Preparing to unpack example.deb ... Unpacking example (13.6.0.10243651) over (13.6.0.10243651) ... Setting up example (13.6.0.10243651) ... I see “Unpacking example (13.6.0.10243651) over (13.6.0.10243651)”. I would rather have gdebi do nothing if I already have the same version of the package installed. How can I achieve that? For example, using dpkg, I can use the option -E (a.k.a --skip-same-version) for exactly this purpose: $ dpkg -E -i example.deb but dpkg doesn’t install dependencies. I’m open to any workarounds. The only things I need are the ability to automatically install dependencies and a way to prevent reinstalling the same version of a package. Note: I previously asked this question on Launchpad (without response).
Use apt install: when given the filename of a package file, with a path, it will behave in the same way as gdebi if the package isn’t already installed with the same version, but it will skip installing the package if the installed version is identical to that contained in the given file. apt install ./example.deb
gdebi: Prevent reinstalling the same version of a package?
1,494,363,560,000
I have both 3.2 and 2.6 installed on a server, but neither sudo apt-get dist-upgrade nor sudo apt-get install linux-image-3.2.0-4-amd64 can upgrade the kernel. user@server:~$ uname -a Linux server 2.6.32-5-xen-amd64 #1 SMP Tue May 13 18:41:58 UTC 2014 x86_64 GNU/Linux user@server:~$ lsb_release -a No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 7.11 (wheezy) Release: 7.11 Codename: wheezy user@server:~$ sudo apt-cache policy linux-image-3.2.0-4-amd64 linux-image-3.2.0-4-amd64: Installed: 3.2.89-2 Candidate: 3.2.89-2 Version table: *** 3.2.89-2 0 500 http://security.debian.org/ wheezy/updates/main amd64 Packages 100 /var/lib/dpkg/status 3.2.78-1 0 500 http://ftp.us.debian.org/debian/ wheezy/main amd64 Packages user@server:~$ sudo apt-cache policy linux-image-2.6.32-5-xen-amd64 linux-image-2.6.32-5-xen-amd64: Installed: 2.6.32-48squeeze6 Candidate: 2.6.32-48squeeze6 Version table: *** 2.6.32-48squeeze6 0 100 /var/lib/dpkg/status Here's the last couple of lines from dpkg.log 2017-08-03 15:05:39 install linux-image-3.2.0-4-amd64:amd64 <none> 3.2.89-2 2017-08-03 15:05:39 status half-installed linux-image-3.2.0-4-amd64:amd64 3.2.89-2 2017-08-03 15:05:43 status unpacked linux-image-3.2.0-4-amd64:amd64 3.2.89-2 2017-08-03 15:05:44 status unpacked linux-image-3.2.0-4-amd64:amd64 3.2.89-2 2017-08-03 15:05:44 startup packages configure 2017-08-03 15:05:44 configure linux-image-3.2.0-4-amd64:amd64 3.2.89-2 <none> 2017-08-03 15:05:44 status unpacked linux-image-3.2.0-4-amd64:amd64 3.2.89-2 2017-08-03 15:05:44 status half-configured linux-image-3.2.0-4-amd64:amd64 3.2.89-2 2017-08-03 15:05:55 status installed linux-image-3.2.0-4-amd64:amd64 3.2.89-2
My hosting provider doesn't use the normal Debian grub setup where GRUB_DEFAULT is declared in the file /etc/default/grub. For me, I had to manually edit the file /boot/grub/menu.lst and change the default directive to 0. Make sure to ask your host if they've got an alternative setup for grub.
Stuck on old kernel when trying to upgrade from Squeeze to Wheezy
1,494,363,560,000
This comes from how to apply patch in a debian package? . Now after building the packages, I have no idea whether the packages got built correctly or not. I did see this in the parent directory - ┌─[shirish@debian] - [~/games] - [5870] └─[$] cat dpkg_1.18.15+nmu1_amd64.changes Format: 1.8 Date: Mon, 21 Nov 2016 01:04:02 +0530 Source: dpkg Binary: dpkg libdpkg-dev dpkg-dev libdpkg-perl dselect Architecture: source amd64 all Version: 1.18.15+nmu1 Distribution: UNRELEASED Urgency: medium Maintainer: Dpkg Developers <[email protected]> Changed-By: shirish <shirish@debian> Description: dpkg - Debian package management system dpkg-dev - Debian package development tools dselect - Debian package management front-end libdpkg-dev - Debian package management static library libdpkg-perl - Dpkg perl modules Changes: dpkg (1.18.15+nmu1) UNRELEASED; urgency=medium . * Non-maintainer upload. * Apply d-m-h fix from #844701 Checksums-Sha1: 8e50f097f70d621071e1e22384c1d68da7693929 1169 dpkg_1.18.15+nmu1.dsc 16aa8483b0ce8d9eb1f0daebca6da84578226966 4617028 dpkg_1.18.15+nmu1.tar.xz 3f3eae9de5bb31e178a4acb32654e68410902bda 1238392 dpkg-dbgsym_1.18.15+nmu1_amd64.deb 3877d627c7c70bd98f16ee0b71d80c69667a6885 1581332 dpkg-dev_1.18.15+nmu1_all.deb b678906567a0c8ba089a5eb109855eba608f60e7 2067816 dpkg_1.18.15+nmu1_amd64.deb 6130872887cd4eeba0b0cc0d0c7354322709dfe7 280736 dselect-dbgsym_1.18.15+nmu1_amd64.deb 58eb460ab48e1c802ee7ae439dc0295424ef7742 1270868 dselect_1.18.15+nmu1_amd64.deb 41e17c39ced6f55b9e72d042255a7a9b647b2e8e 1040980 libdpkg-dev_1.18.15+nmu1_amd64.deb a38005cde488603a7ee5de9ce7bc307c79277bb9 1242182 libdpkg-perl_1.18.15+nmu1_all.deb Checksums-Sha256: 2c8cf8ab1256814aa7115009a4620da913b27935351872335cd429ae4e7a9c70 1169 dpkg_1.18.15+nmu1.dsc 47390a1ca4a296852ef3c25c0bdc82217e49738438882a980e8da28dca0d809e 4617028 dpkg_1.18.15+nmu1.tar.xz 4a47a968b5dd4b1e87c99e5de9e3fd31b610ebb1891989de3a72ef08afb3405b 1238392 dpkg-dbgsym_1.18.15+nmu1_amd64.deb a05ae6dcefd5bc9affe355c8dd4106b42f795678fa4de31bc063a9784fc845ab 1581332 dpkg-dev_1.18.15+nmu1_all.deb b9682da9975541f385b47cf1148028deea4a48a51156293589b124c6f706d7b7 2067816 dpkg_1.18.15+nmu1_amd64.deb d75479bb9005788d96e839ae8b2dde56701993ac6421df1f5aaf79634f008a48 280736 dselect-dbgsym_1.18.15+nmu1_amd64.deb 8b317f45808d408485c566b9748522d63d556bcec7525dcaa442a9720073dd27 1270868 dselect_1.18.15+nmu1_amd64.deb e45e67c3ab034ed3d1bf9f268daba92ee3cc406c3b75ef2bd0354ec79dc30d7f 1040980 libdpkg-dev_1.18.15+nmu1_amd64.deb d75ff545c612a7eb5f4563bb3619cd33ea4d4baff6cade9452e94bb1e7b7a412 1242182 libdpkg-perl_1.18.15+nmu1_all.deb Files: faab0ae6b71c8216a634cbef6759d122 1169 admin required dpkg_1.18.15+nmu1.dsc 69eeaa680e11f291860217a9536e93dc 4617028 admin required dpkg_1.18.15+nmu1.tar.xz 91961eae15e20a3bf2ad614cf42ee4ab 1238392 debug extra dpkg-dbgsym_1.18.15+nmu1_amd64.deb aa361b4cde6020393c75a601c51f54e6 1581332 utils optional dpkg-dev_1.18.15+nmu1_all.deb 325a9629e03781c027f884a17ada0550 2067816 admin required dpkg_1.18.15+nmu1_amd64.deb 75dbcd90ada67522d79206b65519865e 280736 debug extra dselect-dbgsym_1.18.15+nmu1_amd64.deb e490b38b2b132c26670635628e302941 1270868 admin optional dselect_1.18.15+nmu1_amd64.deb 0d206c14b1ffd5cb6b09608e9774b3bf 1040980 libdevel optional libdpkg-dev_1.18.15+nmu1_amd64.deb e22e289a709d36d2186da60e07b68225 1242182 perl optional libdpkg-perl_1.18.15+nmu1_all.deb I also saw a build-tree in the same directory and from the time-stamps the build-tree must have generated during the last step only . $dpkg-buildpackage -us -uc Now the checksums that are provided, these should be canonical (meaning same). At least from what little I understand that is the claim of reproducible builds. . I want that me and the maintainer should be able to check the integrity of the packages built . I looked at the manpage of dpkg-buildpackage and tried searching for 'reproducible' keyword but didn't find it there.
The maintainer has only asked you to check whether the supplied patch fixes things. If dpkg with the patch allows you to install libconfig-model-perl without the errors you were getting before, that would suggest that the patch fixes the issue. If it doesn't, the patch also includes more verbose output which should help pinpoint the real issue. That's all that's needed — there's no need to worry about reproducible builds. Since you have a .changes file, your build completed successfully; and since dpkg includes an extensive test suite, you can be confident that it built correctly. In any case, building a package reproducibly currently requires a modified toolchain, and reproducible builds answer a very specific question: "given an identical build environment, can I build a package identically to some reference?". It's unlikely that the maintainer and you have an identical build environment. The checksums in the .changes file aren't canonical in a reproducible sense. They're present for two reasons: to verify that a package uploaded to the archive was uploaded correctly; to verify that a package uploaded to the archive matches what was signed by the uploader (this is part of the "chain of integrity" of Debian packages). Successive rebuilds of the same source are currently expected to result in different checksums.
Building a .deb package reproducibly
1,494,363,560,000
I saw Debian Jessie - dpkg / apt intall, update and uninstall broken and unlike that one, python is well and good herein. [$] ls -l /usr/bin/python lrwxrwxrwx 1 root root 9 Jun 3 20:09 /usr/bin/python -> python2.7 There are 3-4 packages which are making updates/upgrades on the system next to impossible. [$] sudo dpkg --audit cme libconfig-model-perl libconfig-model-dpkg-perl fonts-arphic-uming The following packages are in a mess due to serious problems during installation. They must be reinstalled for them (and any packages that depend on them) to function properly: cme Check or edit configuration data with Config::Model fonts-arphic-uming (no description available) libconfig-model-dpkg-perl editor for Dpkg source files with validation libconfig-model-perl module for describing and editing configuration data The following packages are missing the list control file in the database, they need to be reinstalled: fonts-arphic-uming (no description available) The following packages are missing the md5sums control file in the database, they need to be reinstalled: fonts-arphic-uming (no description available) Trying to reinstall the packages via aptitude I get this - [$] sudo aptitude reinstall cme libconfig-model-perl libconfig-model-dpkg-perl fonts-arphic-uming The following packages will be REINSTALLED: cme fonts-arphic-uming libconfig-model-dpkg-perl libconfig-model-perl 0 packages upgraded, 0 newly installed, 4 reinstalled, 0 to remove and 29 not upgraded. E: Can't find a source to download version '2.092-1' of 'libconfig-model-perl:amd64' After unpacking 0 B will be used. E: Can't find a source to download version '2.092-1' of 'libconfig-model-perl:amd64' E: Internal error: couldn't generate list of packages to download Forgot to share that I had already downloaded the libconfig-model-perl binary package from snapshots.debian.org and tried installing it, got the following - [$] sudo dpkg -i libconfig-model-perl_2.092-1_all.deb [sudo] password for shirish: D000001: ensure_diversions: new, (re)loading D000001: ensure_statoverrides: new, (re)loading (Reading database ... 1205324 files and directories currently installed.) Preparing to unpack libconfig-model-perl_2.092-1_all.deb ... D000001: process_archive oldversionstatus=broken due to postinst failure dpkg-maintscript-helper: error: version '2.075-2~' is not valid dpkg: warning: subprocess old pre-removal script returned error exit status 1 dpkg: trying script from the new package instead ... dpkg-maintscript-helper: error: version '2.075-2~' is not valid dpkg: error processing archive libconfig-model-perl_2.092-1_all.deb (--install): subprocess new pre-removal script returned error exit status 1 D000001: ensure_diversions: same, skipping dpkg-maintscript-helper: error: version '2.070-1~' is not valid dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 1 D000001: ensure_diversions: same, skipping D000001: cmpversions a='0:2016.03.30' b='0:2016.05.24' r=-2 D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2 D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2 D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2 Errors were encountered while processing: libconfig-model-perl_2.092-1_all.deb I am nonplussed, can somebody help? My sources.list - [$] cat /etc/apt/sources.list #### testing ######### deb http://httpredir.debian.org/debian/ testing main contrib non-free deb-src http://httpredir.debian.org/debian testing main contrib non-free #### unstable ######### deb http://httpredir.debian.org/debian unstable main contrib non-free deb-src http://httpredir.debian.org/debian unstable main contrib #### experimental ######### deb http://httpredir.debian.org/debian experimental main contrib deb-src http://httpredir.debian.org/debian experimental main contrib ##### Debug packages ####### deb http://debug.mirrors.debian.org/debian-debug/ testing-debug main deb http://debug.mirrors.debian.org/debian-debug/ unstable-debug main deb http://debug.mirrors.debian.org/debian-debug/ experimental-debug main DPkG version - [$] apt-cache policy dpkg dpkg: Installed: 1.18.14 Candidate: 1.18.14 Version table: 1.18.15 1 1 http://httpredir.debian.org/debian unstable/main amd64 Packages *** 1.18.14 600 600 http://httpredir.debian.org/debian testing/main amd64 Packages 100 /var/lib/dpkg/status On Stephen's advice did the following - [$] sudo rm /var/lib/dpkg/info/libconfig-model-perl.prerm and tried to install the old package - ┌─[shirish@debian] - [~] - [5108] └─[$] sudo dpkg -i libconfig-model-perl_2.092-1_all.deb D000001: ensure_diversions: new, (re)loading D000001: ensure_statoverrides: new, (re)loading (Reading database ... 1205324 files and directories currently installed.) Preparing to unpack libconfig-model-perl_2.092-1_all.deb ... D000001: process_archive oldversionstatus=broken due to postinst failure dpkg-maintscript-helper: error: version '2.070-1~' is not valid dpkg: error processing archive libconfig-model-perl_2.092-1_all.deb (--install): subprocess new pre-installation script returned error exit status 1 D000001: ensure_diversions: same, skipping dpkg-maintscript-helper: error: version '2.075-2~' is not valid dpkg: error while cleaning up: subprocess new post-removal script returned error exit status 1 D000001: ensure_diversions: same, skipping D000001: cmpversions a='0:2016.03.30' b='0:2016.05.24' r=-2 D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2 D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2 D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2 Errors were encountered while processing: libconfig-model-perl_2.092-1_all.deb Any more ideas anybody? Searching for broken packages shows nothing - [$] alias aptb aptb='aptitude search '\''~b'\' And the search - ┌─[shirish@debian] - [~] - [5109] └─[$] aptb ┌─[shirish@debian] - [~] - [5110] This shouldn't happen, right? I had already turned on dpkg-debug as can be seen - ┌─[shirish@debian] - [~] - [4998] └─[$] cat /etc/dpkg/dpkg.cfg # dpkg configuration file # # This file can contain default options for dpkg. All command-line # options are allowed. Values can be specified by putting them after # the option, separated by whitespace and/or an `=' sign. # debug=1 # Do not enable debsig-verify by default; since the distribution is not using # embedded signatures, debsig-verify would reject all packages. no-debsig # Log status changes and actions to a file. log /var/log/dpkg.log but still did do as Stephen asked - ┌─[shirish@debian] - [~] - [5126] └─[$] su - Password: root@debian:~# DPKG_DEBUG=1 dpkg -i libconfig-model-perl_2.092-1_all.deb dpkg: error: cannot access archive 'libconfig-model-perl_2.092-1_all.deb': No such file or directory root@debian:~# pwd /root root@debian:~# cd /home/shirish root@debian:/home/shirish# DPKG_DEBUG=1 dpkg -i libconfig-model-perl_2.092-1_all.deb D000001: ensure_diversions: new, (re)loading D000001: ensure_statoverrides: new, (re)loading (Reading database ... 1205324 files and directories currently installed.) Preparing to unpack libconfig-model-perl_2.092-1_all.deb ... D000001: process_archive oldversionstatus=broken due to failed removal or installation dpkg-maintscript-helper: error: version '2.070-1~' is not valid dpkg: error processing archive libconfig-model-perl_2.092-1_all.deb (--install): subprocess new pre-installation script returned error exit status 1 D000001: ensure_diversions: same, skipping dpkg-maintscript-helper: error: version '2.075-2~' is not valid dpkg: error while cleaning up: subprocess new post-removal script returned error exit status 1 D000001: ensure_diversions: same, skipping D000001: cmpversions a='0:2016.03.30' b='0:2016.05.24' r=-2 D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2 D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2 D000001: cmpversions a='0:1.18.14' b='0:1.16' r=2 Errors were encountered while processing: libconfig-model-perl_2.092-1_all.deb With the old version of dpkg, the packages were able to install and show no issues - ┌─[shirish@debian] - [~] - [5168] └─[$] sudo dpkg --audit cme libconfig-model-perl libconfig-model-dpkg-perl fonts-arphic-uming ┌─[shirish@debian] - [~] - [5169] I am going to keep it open for a day just in case something untoward happens. Meanwhile, I will upgrade everything except dpkg and do that at the very last.
You can try reinstalling from snapshots; you'll find the appropriate version of libconfig-model-perl there: wget http://snapshot.debian.org/archive/debian/20160924T233848Z/pool/main/libc/libconfig-model-perl/libconfig-model-perl_2.092-1_all.deb sudo dpkg -i libconfig-model-perl_2.092-1_all.deb Given the dpkg-maintscript-helper errors you're getting, with a current version of dpkg, there's probably something else badly messed up. To get libconfig-model-perl reinstalled, delete the prerm script and reinstall the package: sudo rm /var/lib/dpkg/info/libconfig-model-perl.prerm sudo dpkg -i libconfig-model-perl_2.092-1_all.deb If that doesn't work, you can try downgrading dpkg itself to version 1.18.10, which is the last version released before the failing version checks were introduced. Once you've done that, try reinstalling libconfig-model-perl yet again — the version checks won't fail, and the maintainer scripts should complete without any other difficulties. Once that's done, try aptitude reinstall ... again and if necessary, reinstall any other missing package from snapshots.
Debian stretch - update broken - seems buggy dpkg
1,494,363,560,000
In this question the user is getting the error "not found". I realized that the error is "not found" instead of "command not found". Are these two errors different? I'm not sure if I've just never paid attention to this before or if this is different. Here's an example: /etc/cron.daily/apt: /etc/cron.daily/apt: 91: /etc/cron.daily/apt: date: not found /etc/cron.daily/apt: 97: /etc/cron.daily/apt: rm: not found /etc/cron.daily/apt: 448: /etc/cron.daily/apt: pidof: not found xargs: rm: No such file or directory /etc/cron.daily/apt: 176: /etc/cron.daily/apt: date: not found /etc/cron.daily/apt: 176: /etc/cron.daily/apt: date: not found
Its the difference between how bash and dash handle cases when a command is not found. In bash, there is a function named command_not_found_handle : $ type command_not_found_handle command_not_found_handle is a function command_not_found_handle () { if [ -x /usr/lib/command-not-found ]; then /usr/lib/command-not-found -- "$1"; return $?; else if [ -x /usr/share/command-not-found/command-not-found ]; then /usr/share/command-not-found/command-not-found -- "$1"; return $?; else printf "%s: command not found\n" "$1" 1>&2; return 127; fi; fi } So in bash : $ foobar foobar: command not found In case of dash, there is no such function defined and we get : $ foobar dash: 1: foobar: not found As Ubuntu uses dash as the default shell for internal operations so when dash is parsing some script it would show its own format.
What is the difference between the error "not found" and the error "command not found" are they the same?
1,494,363,560,000
How do I resolve the following error to get rsync installed? unable to create '/usr/bin/rsync.dpkg-new' (while processing './usr/bin/rsync'): Input/output error Full log follows: ubuntu@explorer:~$ uname -a Linux explorer 3.8.2-g659a590 #1 SMP PREEMPT Tue Sep 24 02:38:40 PDT 2013 armv7l armv7l armv7l GNU/Linux ubuntu@explorer:~$ sudo apt-get install rsync sudo: unable to resolve host explorer Reading package lists... Done Building dependency tree Reading state information... Done The following NEW packages will be installed: rsync 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/282 kB of archives. After this operation, 516 kB of additional disk space will be used. (Reading database ... 27315 files and directories currently installed.) Unpacking rsync (from .../rsync_3.0.9-4_armhf.deb) ... dpkg: error processing /var/cache/apt/archives/rsync_3.0.9-4_armhf.deb (--unpack): unable to create `/usr/bin/rsync.dpkg-new' (while processing `./usr/bin/rsync'): Input/output error dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Processing triggers for ureadahead ... Errors were encountered while processing: /var/cache/apt/archives/rsync_3.0.9-4_armhf.deb E: Sub-process /usr/bin/dpkg returned an error code (1) Running Linux for Tegra.
The most likely cause of the Input/Output Error would be an actual disk I/O error. See if the kernel is reporting any disk I/O errors or filesystem errors by looking at the recent entries in your dmesg kernel log buffer: dmesg | tail -30
Cannot install rsync (unable to create...Input/output error)
1,494,363,560,000
I wanted to uninstall the libboost libraries. I wrote in the console: sudo apt-get remove libboost-* But looking more precisely at the console output, I noticed apt-get was ready to remove several packages that looks completely unrelated to libboost Although I may not use once in a month compiz, ubuntu-desktop, or unity, I don't want them to be removed. And I can't understand they are programmed for removal ? So I am wondering if there could be a mess in the dependence tree, and if there were any operation to put the situation back to normal ? More precisely the end of the console output is: The following packages were automatically installed and are no longer required: libtorque2 texlive-fonts-recommended libopenmpi1.3 libibverbs-dev tipa mpi-default-dev lyx-common libnuma1 gccxml texlive-fonts-recommended-doc libibve libicu-dev gwibber libopenmpi-dev Use 'apt-get autoremove' to remove them. The following packages will be REMOVED: akonadi-server aptitude compiz compiz-fusion-plugins-extra compiz-fusion-plugins-main compiz-plugins compiz-plugins-extra compiz-plugins-main compiz-pl kdepim-runtime libboost-all-dev libboost-date-time-dev libboost-date-time1.46-dev libboost-date-time1.46.1 libboost-dbg libboost-dev libboost-doc libbo libboost-filesystem1.46-dev libboost-filesystem1.46.1 libboost-graph-dev libboost-graph-parallel-dev libboost-graph-parallel1.46-dev libboost-graph-par libboost-graph1.46-dev libboost-graph1.46.1 libboost-iostreams-dev libboost-iostreams1.46-dev libboost-iostreams1.46.1 libboost-math-dev libboost-math1 libboost-mpi-dev libboost-mpi-python-dev libboost-mpi1.46-dev libboost-mpi1.46.1 libboost-program-options-dev libboost-program-options1.46-dev libboost libboost-python-dev libboost-python1.46-dev libboost-python1.46.1 libboost-regex-dev libboost-regex1.40.0 libboost-regex1.46-dev libboost-regex1.46.1 l libboost-serialization1.46-dev libboost-serialization1.46.1 libboost-signals-dev libboost-signals1.46-dev libboost-signals1.46.1 libboost-system-dev li libboost-system1.46.1 libboost-test-dev libboost-test1.46-dev libboost-test1.46.1 libboost-thread-dev libboost-thread1.46-dev libboost-thread1.46.1 lib libboost-wave1.46-dev libboost-wave1.46.1 libboost1.46-dbg libboost1.46-dev libboost1.46-doc libtorrent-rasterbar6 lyx python-kde4 qbittorrent software tasksel-data ubuntu-desktop uex unity 0 upgraded, 0 newly installed, 77 to remove and 4 not upgraded. After this operation, 489 MB disk space will be freed. Do you want to continue [Y/n]? n
The dependency tree is NOT corrupted. using apt-rpdepends and the command line I got: $ sudo apt-rdepends unity | grep boost Reading package lists... Done Building dependency tree Reading state information... Done Depends: libboost-serialization1.46.1 (>= 1.46.1-1) libboost-serialization1.46.1 So indeed, all those executables are using libboost, with various version numbers, and the biggest conclusion is that I must not uninstall libboost...
Is my apt-get dependency tree corrupted?
1,494,363,560,000
I am using Linux Mint 12 and currently have the Mate desktop running. The icon in the upper right showed their were updates. Tried to do it and it said that The package system is broken Check if you are using third party repositories. If so disable them, since they are a common source of problems. Furthermore run the following command in a Terminal: apt-get install -f The details are: The following packages have unmet dependencies: mint-artwork-gnome: Depends: gtk2-engines-clearlooks but it is a virtual package Depends: mint-backgrounds-lisa but it is not installed sudo apt-get install -f gives this output: Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following extra packages will be installed: mint-backgrounds-lisa The following NEW packages will be installed: mint-backgrounds-lisa 0 upgraded, 1 newly installed, 0 to remove and 32 not upgraded. 4 not fully installed or removed. Need to get 0 B/3,003 kB of archives. After this operation, 3,265 kB of additional disk space will be used. Do you want to continue [Y/n]? y (Reading database ... 482703 files and directories currently installed.) Unpacking mint-backgrounds-lisa (from .../mint-backgrounds-lisa_1.1_all.deb) ... dpkg: error processing /var/cache/apt/archives/mint-backgrounds-lisa_1.1_all.deb (--unpack): trying to overwrite '/usr/share/gnome-background-properties/linuxmint-lisa.xml', which is also in package mint-artwork-kde 2.0.1 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: /var/cache/apt/archives/mint-backgrounds-lisa_1.1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) If I try and install the latest version of Chromium by double-clicking the deb file is says: gdebi-gtk Broken Dependencies Your system has broken dependencies. This application cannot continue until this is fixed. To fix it run 'gksudo synaptic' or 'sudo apt-get install -f' in a terminal window. If I run 'gksudo synaptic' Synaptic comes up and says: (as superuser) You have 1 broken package on your system! Use the "Broken" filter to locate it. The Broken filter shows: Synaptic Broken Installed Version Latest Version Description mint-artwork-gnome 2.6.20 2.6.20 Default Artwork for Linux Mint Trying to reinstall the above package gives: An error occurred The following details are provided: E: /var/cache/apt/archives/mint-backgrounds-lisa_1.1_all.deb: trying to overwrite '/usr/share/gnome-background-properties/linuxmint-lisa.xml', which is also in package mint-artwork-kde 2.0.1 One easy solution is probably to not run Mate with Linux Mint (this is my first try), but just wondering if this is fixable.
A quick and dirty fix, was hack the dpkg records, Since /usr/share/gnome-background-properties/linuxmint-lisa.xml belongs two packages, you're going to remove it from one, Goto /var/lib/dpkg/info/mint-artwork-kde.list, remove that xml filename from the file. And redo apt-get -f install Notice in the future this package conflicts will be solved by the packager (let's hope), and later updates will not be affected.
Update is telling me my package system is broken - the instruction to fix it doesn't work - what to do?
1,494,363,560,000
me@friedly_server:~$ aptitude search samba-tools i samba-tools - Samba testing utilities me@friendly_server:~$ aptitude show samba-tools Package: samba-tools New: yes State: not installed Automatically installed: no Version: 2:3.6.6-3 Priority: optional Section: net Maintainer: Debian Samba Maintainers <[email protected]> Uncompressed Size: 34.5 M Depends: libacl1 (>= 2.2.51-8), libattr1 (>= 1:2.4.46-8), libc6 (>= 2.10), libcap2 (>= 2.10), libcomerr2 (>= 1.01), libcups2 (>= 1.4.0), libgssapi-krb5-2 (>= 1.10+dfsg~), libk5crypto3 (>= 1.6.dfsg.2), libkrb5-3 (>= 1.10+dfsg~), libldap-2.4-2 (>= 2.4.7), libpam0g (>= 0.99.7.1), libpopt0 (>= 1.14), libreadline6 (>= 6.0), libtalloc2 (>= 2.0.4~git20101213), libtdb1 (>= 1.2.7+git20101214), libtinfo5, libwbclient0 (>= 2:3.6.0~pre3), zlib1g (>= 1:1.1.4) PreDepends: dpkg (>= 1.15.6~) Conflicts: samba4, samba4-testsuite Description: Samba testing utilities Samba is an implementation of the SMB/CIFS protocol for Unix systems, providing support for cross-platform file and printer sharing with Microsoft Windows, OS X, and other Unix systems. This package contains extra command-line tools such as smbtorture for performance-testing CIFS servers and clients. Homepage: http://www.samba.org So, does the 'i' mark in aptitude search contradict to "aptitude show"'s report? Or I don't understand something about that mark's meaning?
When you run aptitude search, you are told that some package called samba-tools is installed. When you run aptitude show, you are given information about the candidate version of samba-tools, i.e. the version that aptitude install (or apt-get install) would install. On your system, the candidate version is apparently not the version you have installed. Maybe your system is not up-to-date, or maybe you have installed samba-tools from an alternate source such as the Debian backports which is only installed on explicit demand.
Aptitude Search reports package installed, while Aptitude Show reports it not installed - how is that possible?
1,494,363,560,000
Edited: Operating System: Debian GNU/Linux 11 (bullseye) Debian version: 11.5 apt history and dpkg history I tried to install multiple packages using dpkg somefile.deb but it hasn't completed as having dependency problems due to lack of the internet connection. Now that I run 'apt update' or 'apt-get update', I get these errors: apt-get: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6) apt-get: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6) apt-get: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /lib/x86_64-linux-gnu/libstdc++.so.6)
The culprit is package libstdc++6 which was upgraded to Debian testing/sid, preventing apt-get, which is a C++ application, to work anymore. 2022-10-18 10:37:01 upgrade libstdc++6:amd64 10.2.1-6 12.2.0-5 2022-10-18 10:37:01 status triggers-pending libc-bin:amd64 2.31-13+deb11u4 2022-10-18 10:37:01 status half-configured libstdc++6:amd64 10.2.1-6 2022-10-18 10:37:01 status unpacked libstdc++6:amd64 10.2.1-6 2022-10-18 10:37:01 status half-installed libstdc++6:amd64 10.2.1-6 2022-10-18 10:37:01 status unpacked libstdc++6:amd64 12.2.0-5 apt-get is not available anymore, but it leaves dpkg, a C application and thus not affected, to fix the problem. So revert what you tried to installed that isn't intended for Debian 11: most likely lokinet-bin (its suffix does suggest it's not for Debian 11 but future Debian 12). dpkg --purge lokinet-bin Download from out-of-band information the correct libstdc++6 package. On any other functional Debian 11 system this would work: apt-get --print-uris download libstdc++6 which could for example return (today): 'http://ftp.us.debian.org/debian/pool/main/g/gcc-10/libstdc%2b%2b6_10.2.1-6_amd64.deb' libstdc++6_10.2.1-6_amd64.deb 492540 SHA256:5c155c58935870bf3b4bfe769116841c0d286a74f59eccfd5645693ac23f06b1 which could then be downloaded from any mirror, including the mirror above, either from an other system and then transferred or directly on the damaged system if a download tool is available: curl -JRLO 'http://ftp.us.debian.org/debian/pool/main/g/gcc-10/libstdc%2b%2b6_10.2.1-6_amd64.deb' and be compared with the checksum from above: $ sha256sum libstdc%2b%2b6_10.2.1-6_amd64.deb 5c155c58935870bf3b4bfe769116841c0d286a74f59eccfd5645693ac23f06b1 libstdc%2b%2b6_10.2.1-6_amd64.deb checksums match. You can also get it following links at https://packages.debian.org/bullseye/libstdc++6 or from https://snapshot.debian.org/ Finally install it over the offending version on the damaged system: dpkg -i libstdc%2b%2b6_10.2.1-6_amd64.deb apt-get should now become functional. Before attempting again what you tried, please have a look at this Debian wiki: DontBreakDebian and especially Don't make a FrankenDebian, because that's exactly what happened in this case.
apt/apt-get update leads to error
1,494,363,560,000
I am studying for LPIC exam and one of the tasks in the lab is to find details about package with dpkg -p, concretely about vim with dpkg -p vim. In the solution, the command produces information about the package, but my output is: root@home:~# dpkg -p vim dpkg-query: package 'vim' is not available Use dpkg --info (= dpkg-deb --info) to examine archive files, and dpkg --contents (= dpkg-deb --contents) to list their contents. Vim is installed, I am using it offen and it can also be found on system root@home:~# type vim vim is hashed (/usr/bin/vim) root@home:~# which vim /usr/bin/vim I thought the dpkg -p is somehow broken, but it works with other packages (I have tried several and they all worked fine): root@home:~# dpkg -p eject Package: eject Priority: important Section: utils Installed-Size: 160 Origin: Ubuntu Maintainer: Ubuntu Developers <[email protected]> Bugs: https://bugs.launchpad.net/ubuntu/+filebug ... My system (VPS) info is Ubuntu 18.04.5 LTS Linux 4.15.0-143-generic #147-Ubuntu SMP Wed Apr 14 16:10:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux Why can I not reproduce the solution from the course? Thank you!
In a distant time, dpkg wasn't used by apt which didn't exist yet but by other front-ends, like dselect. Those tools took care of updating the available list of packages which ends in the file /var/lib/dpkg/available eg when running dselect update. dpkg -p's feature depends on an up to date available list file. That's not always the case today. apt doesn't care about /var/lib/dpkg/available at all. There might be other (possibly GUI) tools that still get this file updated somehow, and thus /var/lib/dpkg/available might be partially filled-in. The manpage for dpkg (or dpkg-query) tells: -p, --print-avail package-name... Display details about package-name, as found in /var/lib/dpkg/available. Users of APT-based frontends should use apt-cache show package-name instead. There's also: --update-avail [Packages-file] --merge-avail [Packages-file] Update dpkg's and dselect's idea of which packages are available. With action --merge-avail, old information is combined with information from Packages-file. With action --update-avail, old information is replaced with the information in the Packages-file. The Packages-file distributed with Debian is simply named «Packages». If the Packages-file argument is missing or named «-» then it will be read from standard input (since dpkg 1.17.7). dpkg keeps its record of available packages in /var/lib/dpkg/available. You can use apt-cache dumpavail to generate on-the-fly an available file format output: dumpavail dumpavail prints out an available list to stdout. This is suitable for use with dpkg(1) and is used by the dselect(1) method. And merge the result (this example wasn't run on Ubuntu): # apt-cache dumpavail | dpkg --merge-avail - Updating available packages info, using -. Information about 119859 packages was updated. dpkg -p vim will now work, but it would have probably been simpler to use directly apt-cache show vim or apt show vim. Conclusion: some LPIC questions are probably outdated, but to get your exam, you'll have to learn specific exam things that aren't used anywhere anymore.
dpkg -p is not working for some packages (like vim)
1,494,363,560,000
I recognised that after purging some packages (e. g. texlive-lang-japanese), directories remain because they contain a file named .uuid (e. g. /usr/share/fonts/opentype/ipaexfont-gothic/.uuid). It contains only a single UUID which seems to vary for every .uuid file, but I couldn't find that UUID anywhere. What's the purpose of these files? How to find out wether they can be removed without any problems later on?
This is a known bug: Debian bug #897040 fontconfig: .uuid files in font directories not removed during purge The files are internal fontconfig cache files and should be removed when removing the font packages. You can remove the files manually, there should be no problem with that.
Files ".uuid" remain after package removal
1,494,363,560,000
I'm trying to cross-build a Debian/Ubuntu package on a running amd64 system to mips arch. I've tried several methods, from pubilder to sbuild, but I keep failing. About the latter, on a freshly installed Debian 9 I do: apt-get -y install sbuild sbuild-createchroot --arch=mips --make-sbuild-tarball=/srv/chroots/wheezy-sbuild.tgz wheezy /srv/chroots/wheezy http://archive.debian.org/debian/ But in the end I get: W: Failure trying to run: chroot /srv/chroots/wheezy dpkg-deb -f /var/cache/apt/archives/dpkg_1.16.18_mips.deb Version W: See /srv/chroots/wheezy/debootstrap/debootstrap.log for details W: Failure trying to run: chroot /srv/chroots/wheezy mount -t proc proc /proc W: See /srv/chroots/wheezy/debootstrap/debootstrap.log for details E: Error running debootstrap at /usr/sbin/sbuild-createchroot line 268. and the log contains: chroot: failed to run command 'dpkg-deb': Exec format error chroot: failed to run command 'mount': Exec format error All the methods I tried end up with that Exec format error while trying different commands.
Cross-building only became nice and easy with Debian 9 as a target; it’s do-able with Debian 8 too, but targeting Debian 7 is a bit too complex. (EmDebian was dropped before Debian 7.) There is however a simple setup to build mipsel Wheezy packages on any system capable of running QEMU, and building packages there will still be much faster than building on your router: start an mipsel setup in a chroot using debootstrap: sudo debootstrap --arch=mipsel --foreign --variant=buildd \ --include=fakeroot,build-essential \ wheezy ./wheezy-mipsel-chroot \ http://archive.debian.org/debian install QEMU and binfmt_misc support: sudo apt install qemu-user-static binfmt-support copy the QEMU binary into the chroot: sudo cp /usr/bin/qemu-mipsel-static wheezy-mipsel-chroot/usr/bin (it’s statically-linked, so it will work fine) enter the chroot and finish debootstrap: sudo chroot wheezy-mipsel-chroot /debootstrap/debootstrap --second-stage You can now use your chroot to build packages. Manually, copy your package into the chroot, enter it, and build with dpkg-buildpackage after installing the build dependencies. To build with sbuild, you’ll need to at least register the chroot with schroot; add a file named /etc/schroot/chroot.d/wheezy-mipsel-sbuild with the following contents: [wheezy-mipsel-sbuild] description=Debian wheezy/mipsel autobuilder groups=root,sbuild root-groups=root,sbuild profile=sbuild type=directory directory=/usr/var/backups/steve/wheezy-mipsel-chroot union-type=overlay There are probably other steps required to get the chroot to work correctly with sbuild, in particular setting up the sbuild group inside the chroot and fixing ownership.
Building mips package on amd64: Exec format error chroot: failed to run command 'mount'
1,494,363,560,000
I maintain a native Debian package which installs an application and an initial SQLite database. I expect the application to edit the database. How do I prevent upgrades from replacing the database? I thought conffiles would be the solution, but the Debian's maintainer guide says: If your program uses configuration files but also rewrites them on its own, it's best not to make them conffiles because dpkg will then prompt users to verify the changes all the time. What is the best alternative?
If you’re really talking about shipping a database, and not the configuration files to access a database, the answer is somewhat in the problem statement: a database isn’t a configuration file. The best alternative (in my opinion) is to install the database in maintainer scripts, not directly as an installed file in the package. That way your maintainer scripts can deal with the various situations that can arise, including initial installation with no database; upgrade with an existing database which should be preserved as-is; upgrade with an existing database which needs to be migrated. You’d ship the database in a temporary location in your package, somewhere under /usr/share/yourpackage, and only move it to its real location if necessary. Don’t ship it in /tmp, and don’t attempt to “de-register” the file. See also Where do temporary files go while installing a .deb package? For extra bonus points, you could look at dbconfig-common.
Debian conffiles alternative
1,494,363,560,000
For example, if I run the following command dpkg -l ‘*compiz*’ the output is as follows: Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-============-============-================================= pi compiz 1:0.9.12.2+1 all OpenGL window and compositing man ii compiz-core 1:0.9.12.2+1 amd64 OpenGL window and compositing man un compiz-core-ab <none> <none> (no description available) [more output deleted] The output is a little cryptic. There are several detailed explanations on StackExchange, of which, example, is one. Likewise, man dpkg and man dpkg-query give similar explanations. The first character in the first field, ‘p’, in our example output above, indicates the desired status of the package. Which is the status that the packaging system thinks the package should be in. What is the underlying meaning of the desired status? I.e. Why does the packaging managing system have an idea of what status a package should be in? I could see that an intelligent system would recommend (or desire) a package to be purged if it was only ever used as a dependency to an already removed parent package. However, this is not the case in our example. In our example, the package ‘compiz’ is installed, however dpkg believes it should be purged, or at least that it is desirable that the package is purged, why is this? Moreover, how does this particular field work in general? I.e. how does the system decide on a ‘desired status’ for a package and what are the underlying reasons for this functionality?
The p is NOT what the packaging system "thinks" the desired status should be. It's what you, or someone else, has TOLD it that it should be - e.g. with a program like aptitude or synaptic, or even a simple utility like apt-mark. It is marked to be purged the next time an apt-get dselect-upgrade, apt-get dist-upgrade, aptitude full-upgrade or similar is run. apt is great at dependency resolution, but it's not "intelligent" and it doesn't make decisions like that for you. It tries to do what you told it to, to the best of its ability. Usually that Just Works. Sometimes it either bails out because the conflicts are unable to be resolved automatically, and sometimes when you run it, it offers to remove hundreds of packages you don't want it to so you have to say "no". In cases like that, you'll have to resolve the problem yourself (with the help of tools like aptitude). If you want to change the desired status of the compiz package, you could run something like: apt-mark install compiz Note: as is always the case with packages, this will interact with the Dependencies and Conflicts of other packages. If, for example, it gained that p status because you used aptitude to mark another package to be installed that happens to conflict with compiz, then that creates a dependency conflict that will have to be resolve when you run apt-get dist-upgrade.
How is the desired status in the Debian Package Manager determined?
1,494,363,560,000
Operating System: Debian GNU/Linux 8.8 (jessie) Kernel: Linux 3.16.0-4-amd64 Architecture: x86-64 I have several Debian servers. Each have included in default repository nginx version 1.6. After updating from original nginx repository, receive same error on all servers: Preparing to unpack .../nginx_1.12.0-1~jessie_amd64.deb ... Unpacking nginx (1.12.0-1~jessie) over (1.6.2-5+deb8u4) ... dpkg: error processing archive /var/cache/apt/archives/nginx_1.12.0-1~jessie_amd64.deb (--unpack): trying to overwrite '/etc/default/nginx', which is also in package nginx-common 1.6.2-5+deb8u4 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: /var/cache/apt/archives/nginx_1.12.0-1~jessie_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) I've tried to build deb package from source and still get same error. I can't find any way to upgrade it without reinstalling the Debian to newer version. /var/log/dpkg.log: 2017-06-26 19:56:31 startup archives install 2017-06-26 19:56:31 upgrade nginx:all 1.6.2-5+deb8u4 1.12.0-1~jessie 2017-06-26 19:56:31 status half-configured nginx:all 1.6.2-5+deb8u4 2017-06-26 19:56:31 status unpacked nginx:all 1.6.2-5+deb8u4 2017-06-26 19:56:31 status half-installed nginx:all 1.6.2-5+deb8u4 2017-06-26 19:56:32 status unpacked nginx:all 1.6.2-5+deb8u4 2017-06-26 19:56:32 status installed nginx:all 1.6.2-5+deb8u4 I've tried to fully uninstall / purge the default nginx and install newer but still get error. The following packages have been kept back: libpcre3 libpcre3-dev nginx nginx-common nginx-full 0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
Become root: sudo -i or: su 2017-06-26 19:56:31 status half-configured nginx:all 1.6.2-5+deb8u4 Configure packages: dpkg --configure -a Fix broken packages: apt-get install --fix-broken Proceed with upgrade: apt-get dist-upgrade
How to debug dpkg error code (1) on upgrade of deb package?
1,494,363,560,000
I installed 3.6 from source to /opt in Ubuntu 16.04 thinking that I was avoiding startnig any python conflicts this way. Next time I tried to run apt-get update I ran into an error that says... You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: ... when I run apt-get -f install I see a warning saying that a lot of stuff is going to be removed... when I run apt-cache policy python I see this... python: Installed: 3.6.0-1 Candidate: 3.6.0-1 Version table: *** 3.6.0-1 100 100 /var/lib/dpkg/status 2.7.11-1 500 500 http://mirrors.digitalocean.com/ubuntu xenial/main amd64 Packages So my questions... Why would installing from source (to /opt) interfere with dpkg? How can I get dpkg to forget about my python3.6 install I don't want to remove a lot of stuff that I need on the system, so other than making dpkg forget about python3, what can I do?
Installing purely from source wouldn't interfere with dpkg, you must have somehow installed a package at some point. You need to re-install the python package: apt-get --reinstall install python=2.7.11-1 This should restore your Python setup and stop asking you to remove lots of packages. You'll probably need to re-install Python 3.6 in /opt, from source without a package. See above.
install python 3.6 from source, now dpkg is messed up
1,494,363,560,000
Can you help me with this problem please? I have updated (apt-get upgrade) my system Debian GNU/Linux 7.6 (wheezy) but for problem with disk space operation failed. After I have released disk space, but MongoDB does not start. I have tried several procedures. First apt-get --purge remove mongodb-org: invoke-rc.d: unknown initscript, /etc/init.d/mongod not found. dpkg: error processing mongodb-org-server (--configure): subprocess installed post-installation script returned error exit status 100 Errors were encountered while processing: mongodb-org-server E: Sub-process /usr/bin/dpkg returned an error code (1) In /etc/init.d/ was: mongod -> /lib/init/upstart-job I removed this and replace it with mongod from other mongoDB installation from other system. Then uninstallation was correct. After I run apt-get install -y mongodb-org but it failed with: invoke-rc.d: unknown initscript, /etc/init.d/mongod not found. dpkg: error processing mongodb-org-server (--configure): subprocess installed post-installation script returned error exit status 100 Setting up MongoDB package-org-Mongos (2.6.4) ... Setting up MongoDB package-org-tools (2.6.4) ... dpkg: unmet dependencies prevent configuration package MongoDB-org: MongoDB-org depends on MongoDB-org-server; but: MongoDB package-org-server is not configured yet. In /etc/init.d/ was: mongod -> /lib/init/upstart-job mongod.dpkg-bak I removed mongod and renamed mongod.dpkg-bak to mongod. Then installation was correct. But MongoDB does not start. Reading package lists ... Done It creates a dependency tree Reading state information ... Done MongoDB-org is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 2 not fully installed or removed. After this operation will be used to drive other 0 B. Setting up MongoDB package-org-server (2.6.4) ... [FAIL] Starting database: mongodb failed! invoke-rc.d: initscript mongod, action "start" failed. dpkg: error processing MongoDB-org-server (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: unmet dependencies prevent configuration package MongoDB-org: MongoDB-org depends on MongoDB-org-server; but: MongoDB package-org-server is not configured yet. dpkg: error processing MongoDB-org (--configure): dependency problem - leave it unconfigured Errors were encountered while processing: MongoDB-org-server MongoDB-org E: Sub-process /usr/bin/dpkg returned an error code (1) If I run service mongod start: [FAIL] Starting database: mongodb failed! But /var/log/mongod/mongod.log does not contain any entries from this time. Thank you very much for help. dpkg-query -l "MongoDB-org *" output: +++-=================================-=====================-=====================-======================================================================= iU mongodb-org 2.6.4 i386 MongoDB open source document-oriented database system (metapackage) ii mongodb-org-mongos 2.6.4 i386 MongoDB sharded cluster query router iF mongodb-org-server 2.6.4 i386 MongoDB database server ii mongodb-org-shell 2.6.4 i386 MongoDB shell client ii mongodb-org-tools 2.6.4 i386 MongoDB tools un mongodb-org-unstable <none> (no description available) un mongodb-org-unstable-mongos <none> (no description available) un mongodb-org-unstable-server <none> (no description available) un mongodb-org-unstable-shell <none> (no description available) un mongodb-org-unstable-tools <none> (no description available) dpkg --configure mongodb-org-server mongodb-org: Setting up mongodb-org-server (2.6.4) … [FAIL] Starting database: mongodb failed! invoke-rc.d: initscript mongod, action "start" failed. dpkg: error processing mongodb-org-server (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: unmet dependencies prevent configuration package MongoDB-org: MongoDB-org depends on MongoDB-org-server; but: MongoDB package-org-server is not configured yet. dpkg: error processing MongoDB-org (--configure): dependency problem - leave it unconfigured Errors were encountered while processing: MongoDB-org-server MongoDB-org dpkg --configure --force-depends mongodb-org-server mongodb-org: Setting up mongodb-org-server (2.6.4) … [FAIL] Starting database: mongodb failed! invoke-rc.d: initscript mongod, action "start" failed. dpkg: error processing mongodb-org-server (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems, but configuring as per your requirement: mongodb-org depends on mongodb-org-server; however: MongoDB package-org-server is not configured yet. Setting org-package MongoDB (2.6.4) ... Errors were encountered while processing: mongodb-org-server
Option 1: As you seem to have half-configured mongodb-org-server and unpacked but (not configured) mongodb-org, please try the following command: dpkg --configure mongodb-org-server mongodb-org If also that fails for dependency issues, try this: dpkg --configure --force-depends mongodb-org-server mongodb-org Option 2: As package configuration doesn't seem to get done ok in your case, I'd suggest next to try to clean up the system of the previous installation and then do a fresh install. However, the following is pretty rough way of doing it and I suggest you to first read it through and keep in mind that I haven't actually tested it. First, obtain the list of files installed by the mongodb-org packages: dpkg-query -L mongodb-org mongodb-org-server mongodb-org-mongos mongodb-org-shell mongodb-org-tools | grep "^\/[^\.]" > mongo.files Then, do validate the contents of mongo.files (to make sure it only contains paths that are ok to be deleted) by doing: less mongo.files Then, remove those files from the system by issuing: rm `cat mongo.files` Next it is time to tell the package manager that those packages are not currently installed in the system by modifying manually /var/lib/dpkg/status. Before doing anything to that file, back it up in case something goes wrong (remember, we're doing surgery on the package manager internal data...). The file is formatted in sections of sequential lines of text with the sections separated by an empty line. Find out all sections in the file that begin by Package: mongodb-org and remove those up (delete all lines from the line starting with 'Package' up to the empty line). When done, save the file and run apt-get update followed by apt-get install mongodb-org. I certainly hope that doesn't break anything and in the end you get a functioning copy of MongoDB.
After upgrade MongoDB it does not start and log is empty
1,494,363,560,000
On my Elementary OS system, dpkg reports a number of kernel packages that aren't installed. (I did an apt-get purge on them previously.) I'd like to have them forgotten about entirely, but I can't figure out how to get them that way. For example: elementary:~$ dpkg -l linux-*-3.2.0-51* Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-====================================-====================================-======================================================================================== un linux-headers-3.2.0-51 <none> (no description available) un linux-headers-3.2.0-51-generic <none> (no description available) un linux-image-3.2.0-51-generic <none> (no description available) apt-get purge doesn't work: elementary:~$ sudo apt-get purge linux-headers-3.2.0-51 Reading package lists... Done Building dependency tree Reading state information... Done Package linux-headers-3.2.0-51 is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. dpkg doesn't work: elementary:~$ sudo dpkg --purge linux-headers-3.2.0-51 dpkg: warning: there's no installed package matching linux-headers-3.2.0-51 elementary:~$ sudo dpkg --forget-old-unavail dpkg: warning: obsolete '--forget-old-unavail' option, unavailable packages are automatically cleaned up. apt-cache shows: elementary:~$ apt-cache policy linux-headers-3.2.0-51 linux-headers-3.2.0-51: Installed: (none) Candidate: 3.2.0-51.77 Version table: 3.2.0-51.77 0 500 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages 500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages aptitude isn't installed. Obviously, there's something I'm not understanding. Why does dpkg -l show purged packages? How do I go about making dpkg forget about them?
According to your apt-cache policy output, they're still in the archive (aka available), so dpkg won't forget about them. So the short answer is there isn't a way to get rid of that record. The long answer is you could probably edit /var/lib/dpkg/status (it's a plain-text file) to do it. Make sure to keep a backup. Breaking this file would not be a good thing, badness level approaching "have you considered re-installing?"
How can I purge old kernel packages in Elementary OS?
1,494,363,560,000
I'm trying to create a Debian package that doesn't delete an empty directory after it's purged. Specifically, I'm creating my own package containing some CA certificates I trust. I'm following Debian's suggested method of installing the certificates to /usr/local/share/ca-certificates. The problem I'm running in to is that the ca-certificates package creates /usr/local/share/ca-certificates when it's installed and I'd like that directory to stick around when my package is purged. My goal is to install my trust chain into /usr/local/share/ca-certificates/mychain but when my Debian package is removed I want dpkg to not remove /usr/local/share/ca-certificates if it's empty since the ca-certificates package explicitly created that directory. I searched around for a definitive answer but all I managed to find were long forum posts and e-mail threads.
Add postrm script: #!/bin/sh set -e case "$1" in purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) # Recreate the /usr/local/share/ca-certificates directory, since we are # ignoring Debian Policy by intentionally installing here. Removal of # ca-certificates-local removes this directory if empty. if [ ! -e /usr/local/share/ca-certificates ]; then if mkdir /usr/local/share/ca-certificates 2>/dev/null; then chown root:staff /usr/local/share/ca-certificates chmod 2775 /usr/local/share/ca-certificates fi fi ;; *) echo "postrm called with unknown argument \`$1'" >&2 exit 1 ;; esac #DEBHELPER# exit 0 This code is from ca-certificates-local: This is an example stub source package that includes a dummy CA certificate in the local/ directory. Remove the dummy certificate, copy your trusted local root CA (in PEM format with the filename ending in ".crt") to the local/ directory, edit files in the debian/ directory as desired, and build your custom package. See README, Steps to build your custom local root CA package from this example So, the quick way to create and install such packages: git clone git://anonscm.debian.org/collab-maint/ca-certificates.git ~/ca-certificates cd ~/ca-certificates/examples/ca-certificates-local/ rm local/Local_Root_CA.crt cp <path-to-your-cert> local/ # edit debian/control: change package-name, description, etc # install build dependencies: http://unix.stackexchange.com/questions/177505/how-to-install-parse-build-dependencies-from-debian-control/211319#211319 dpkg-buildpackage dpkg -i ../<package-name-version>.deb
Creating a Debian package that does not remove directories after it's purged
1,494,363,560,000
In Debian Wheezy, I'm trying to install the vmware-view-client package from the Ubuntu Software Center (because the open client won't work for my situation), but dpkg can't handle it. Synaptic says I have libssl1.0.0 installed (1.0.1c-4, along with -dev and -doc), but I get the following error message: $ dpkg -i vmware-view-client_1.6.0-0ubuntu0.13.04_i386.deb (Reading database ... 154107 files and directories currently installed.) Preparing to replace vmware-view-client 1.6.0-0ubuntu0.13.04 (using vmware-view-client_1.6.0-0ubuntu0.13.04_i386.deb) ... Unpacking replacement vmware-view-client ... dpkg: dependency problems prevent configuration of vmware-view-client: vmware-view-client depends on libssl0.9.8 (>= 0.9.8m-1); however: Package libssl0.9.8 is not installed. dpkg: error processing vmware-view-client (--install): dependency problems - leaving unconfigured Processing triggers for desktop-file-utils ... Errors were encountered while processing: vmware-view-client Do I need to somehow get an earlier version of libssl (if so, how?) or can I somehow convince dpkg to use my version of libssl anyways?
0.9.8 is the ABI version (aka soversion), so, yes, you need to install the older version. The 0.9.8 and 1.0 ABIs are not compatible. I'd suggest installing libssl0.9.8 in the normal manner, e.g., using the GUI or aptitude install libssl0.9.8. 0.9.8 is available in both 12.04 and 12.10 according to http://packages.ubuntu.com/ Then you should be able to install the vmware client.
libssl1.0.0 doesn't satisfy libssl0.9.8 dependency?
1,494,363,560,000
I recently became acquainted with the restorative power of dpkg-reconfigure following a bodged installation of the GNU mailutils package. At the end of the installation process a dialog (ncurses?) appears prompting the user to make choices and fill in some blanks. That's all well and good, and I suppose if you're proficient enough, you simply avoid making any mistakes in the "post-install configuration dialog", or PICD as I'll call it in the sequel. I'm not proficient, and needed to re-run the 'PICD'. Not yet being acquainted with dpkg-reconfigure, I assumed that it was necessary to un-install, then re-install. But when I did that, the installation completed - but the 'PICD' did not re-appear. I tried a reboot, but still no 'PICD'!?! Eventually, someone clued me about dpkg-reconfigure, but dpkg-reconfigure mailutils also failed to restore the 'PICD'. It turned out that it was not mailutils that needed to be reconfigured - it was postfix - the MTA. This took a while to sort out because the Debian packager for mailutils cleverly hid postfix under an innocuous "virtual package" called default-mta. And so the magic required to get a second chance for re-configuration was: dpkg-reconfigure postfix. This discovery enabled my trial-and-error approach to configuration, and I finally completed it. But this has raised a question or two for me: What is it that disables presentation of the 'PICD' on subsequent installations? I mean, how does the install script know that the user has already seen the 'PICD'? Is there some value recorded & saved by the installer to prevent the 'PICD' replay? Why does the installer disable subsequent presentations of the 'PICD' (without the dpkg-reconfigure incantation)? What is the point of that actually?
The postfix package uses debconf for its configuration. You can think of this as a kind of registry in Debian; it’s used by most packages which need configuration during installation. You can see the values it currently stores by running debconf-get-selections. A package can determine during installation whether a value it expects has already been stored in the debconf database. Once a value is set in debconf, general practice is to not show the corresponding dialog during package installation. This avoids asking the user the same question multiple times, in particular every time a package is upgraded (this is strongly recommended by Debian Policy). It also allows packages to be pre-configured, so they can be installed with custom settings without user interaction; this is common practice for automated installations where many systems need to be configured in the same way. As you determined, if a configuration setting needs to be amended, the best way to proceed is to run dpkg-reconfigure. Another possibility is to purge the affected package, and re-install it: if nothing else depended (even weakly) on default-mta or postfix, sudo apt purge --autoremove mailutils would have cleared everything without your having to determine that postfix was the package actually at fault. (In practice, you’d have to purge postfix itself since many packages will prevent default-mta from being an auto-removal candidate, including unattended-upgrades or cron.)
Why is it necessary to run 'dpkg-reconfigure' on bodged installs?
1,494,363,560,000
I recently installed Debian 12. Apt was working, but was complaining about a not fully configured linux-image. I tried to remove the image and upgrade, but now I'm unable to us apt or dpkg to remove or install anything. It has issues with a "not fully installed or removed" package, runs into an error while attempting to resolve it, and aborts. Summary of the problems I have run into (details below): Can't apt/dpkg remove, purge, install, or upgrade dpkg post-removal script subprocess returned error raspi-firmware complains /boot/firmware may not be mounted I do have a 1K EXT4-fs partition that's not mounting raspi-firmware - Do I need this? Running a Panasonic Toughbook CF-31 initramfs-tools - Complains if I just remove raspi-firmware I am using kernel 6.1.0-9-amd64, but am getting these problems due to linux-image-6.1.0-10-amd64. Following what I've found on the web, I have manually deleted all files associated with the latter package, but still get the error. (dpkg-query -L linux-image-6.1.0-10-amd64 varifies that the package indeed "does not contain any files") This is an example of the output returned by apt when attempting to install or remove any package: Reading package lists... Building dependency tree... Reading state information... Suggested packages: cmatrix-xfont The following packages will be REMOVED: linux-image-6.1.0-10-amd64 The following NEW packages will be installed: cmatrix 0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded. 1 not fully installed or removed. Need to get 17.5 kB of archives. After this operation, 408 MB disk space will be freed. Do you want to continue? [Y/n] Get:1 https://deb.debian.org/debian bookworm/main amd64 cmatrix amd64 2.0-3 [17.5 kB] Fetched 17.5 kB in 1s (12.3 kB/s) (Reading database ... 252302 files and directories currently installed.) Removing linux-image-6.1.0-10-amd64 (6.1.37-1) ... /etc/kernel/postrm.d/initramfs-tools: update-initramfs: Deleting /boot/initrd.img-6.1.0-10-amd64 /etc/kernel/postrm.d/z50-raspi-firmware: raspi-firmware: missing /boot/firmware, did you forget to mount it? run-parts: /etc/kernel/postrm.d/z50-raspi-firmware exited with return code 1 dpkg: error processing package linux-image-6.1.0-10-amd64 (--remove): installed linux-image-6.1.0-10-amd64 package post-removal script subprocess returned error exit status 1 dpkg: too many errors, stopping Errors were encountered while processing: linux-image-6.1.0-10-amd64 Processing was halted because there were too many errors. E: Sub-process /usr/bin/dpkg returned an error code (1) Following what it says takes me to line 35 of /etc/kernel/postinst.d/z50-raspi-firmware, where my error is thrown when the following condition holds true: ! mountpoint -q /boot/firmware I'm not familiar with what -q means in this context. I am not running dpkg from chroot or a virtual machine. I do have the directory /boot/firmware in my root partition. In case it's related, I do have an unmounted 1K Ext4-fs partition sda2 which fails to mount with dmesg reporting: "unable to read superblock". Since I'm not running a Rasberry Pi, I attempted removing these files and running apt autoremove, /etc/initramfs/post-update.d/z50-raspi-firmware /etc/kernel/postrm.d/z50-raspi-firmware but apt said: Removing linux-image-6.1.0-10-amd64 (6.1.37-1) ... /etc/kernel/postrm.d/initramfs-tools: update-initramfs: Deleting /boot/initrd.img-6.1.0-10-amd64 /etc/kernel/postrm.d/z50-raspi-firmware: /etc/kernel/postrm.d/z50-raspi-firmware: 2: exec: /etc/kernel/postins t.d/z50-raspi-firmware: not found run-parts: /etc/kernel/postrm.d/z50-raspi-firmware exited with return code 127 It seems something is telling initramfs-tools to expect to find the raspi-firmware. I saw dpkg-query -L includes /usr/share/initramfs-tools/hooks/raspi-firmware-fsck and experimented with removing that too, but it made no difference. I saw a similar question, but the solution there was not enough in my case. I'm new to stack exchange, and I'm not sure how or if this question should be appended to that. dpkg: error processing package linux-image-amd64 (--configure): dependency problems - leaving unconfigured
For the solution in the linked question to work, postinst.d/z50-raspi-formware must first be reinstated. Create /etc/kernel/postinst.d/z50-raspi-firmware consisting of two lines: #!/bin/sh true Make it executable: chmod a=rx /etc/kernel/postinst.d/z50-raspi-firmware Then purging should work: apt purge raspi-firmware After doing this I was able to run apt autoremove, install, and so forth without errors.
apt/dpkg not working due to linux-image/firmware problems
1,494,363,560,000
I tried to build a Debian package, which depends on Nodejs. I have specified my dependency in the control file of the package this way: Depends: nodejs (>= 10.24.0) But when I try to install the package, I get a dependency error: dpkg: dependency problems prevent configuration of xxx: xxx depends on nodejs (>= 10.24.0); however: Version of nodejs on system is 10.24.0~dfsg-1~deb10u1. How can I specify the dependency in the control file such that it gets also satisfied by a package having the "~dfsg" suffix? I can not find it in the documentation. I tried to use a globing pattern, but that does not work at all: 'Depends' field, reference to 'nodejs': version '10.24.0*': invalid character in version number
The workaround here is to add a tilde: Depends: nodejs (>= 10.24.0~) See What does a tilde (~) mean at the end of a dependency requirement in a deb file or in apt? for details.
How to depend only on the upstream version of a Debian package?
1,494,363,560,000
vrms [1] returns "No non-free or contrib packages installed on Hostname! rms would be proud." and dpkg-query -W -f='${Section}\t${Package}\n' | grep ^non-free [2] returns nothing on the terminal. However, after running packages=`dpkg --get-selections | awk '{ print $1 }' | sed 's/:amd64//'` for package in $packages; do echo "<<< $package >>> "; cat /usr/share/doc/$package/copyright; done > ./licenses I see an output as following, which says there is no license for some packages: cat: /usr/share/doc/libddccontrol0/copyright: No such file or directory cat: /usr/share/doc/linux-image-4.19.0-12-amd64/copyright: No such file or directory cat: /usr/share/doc/live-tools/copyright: No such file or directory cat: /usr/share/doc/rsync/copyright: No such file or directory cat: /usr/share/doc/user-setup/copyright: No such file or directory How [1] and [2] commands decide they are also free in this case?
Execute dpkg --get-selections | grep deinstall If same packages in the output are returned, purge them with apt-get purge PACKAGENAME And repeat your steps over again
Terminal commands show there is no non-free software on the system
1,560,767,500,000
For a little something I made (that used to be a word-of-mouth thing only and that's interesting to just a very narrow, and usually non-technical, user base), I'd like to be able to provide a .deb file for easier installation. The something doesn't have any actual files that it needs to install in the system. Instead it needs to add some lines to already existing files (which belong to the xkb-data package on Debian-derived distributions). To the best of my knowledge, after searching and asking around, there's no way to put these lines into new, separate files and still have them be picked up by the system, so I wrote a Rakefile to do the installation. That works well but requires the user to interact with a command-line, which doesn't always work so well. Also, whenever xkb-data gets updated through the package manager, the rake task needs to be ran again manually, which is cumbersome. I know about DpkgPostpone and DpkgTriggers, but none of these seem to be intended or fit for dealing with the above described problem (please do correct me if I'm wrong about that, though!) Is there any way to have a Debian package automatically cause its own reinstall based on the condition that one or all of its dependencies have just been updated? I'm explicitly also interested in a hackish way to do so, DontBreakDebian be damned.
One reasonable way of going about this is as follows: divert all the files you modify, so that dpkg no longer replaces them, but instead installs them with a different name; make your Rakefile do its work using the newly-named files instead of the originals, reading the newly-named files and writing the originals; install a post-invoke dpkg hook in /etc/dpkg/dpkg.cfg.d which runs the Rakefile after dpkg runs. You could add additional checks, for example only run the Rakefile if the checksums of the original files have changed since the last time the modified files were generated, but that might not save much time compared to running the Rakefile every time dpkg runs, and adds a fair amount of maintenance complexity. (I wrote this assuming that your Rakefile behaved like a Makefile, i.e. didn’t do anything if its targets were newer that their prerequisites, but I get the impression that that isn’t the case here, so it’s probably more relevant to add additional checks or alter your Rakefile to not do anything if there’s nothing to do. Or you could rewrite your processing in a Makefile instead.) I imagine you’ve already thought of this, but I think the ideal solution would be to add a new keyboard type instead of changing existing keyboard definitions; but there could well be some issue with this that I haven’t thought of.
Way to have a Debian package reinstall when dependency updates?
1,560,767,500,000
After trying to install pdfshuffler (from Debian repo) an error related to dependency problems appeared. It seemed that python-pypdf2 package was needed, so I tried to install it but I get to the same error message. After looking up for similar problems, I tried with apt-get clean, install-f, autoremove, etc but it was useless and the list of errors encountered while processing keeps growing. I leave the error I get after apt-get upgrade: Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages have been kept back: mendeleydesktop 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. 15 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up python-crypto (2.6.1-7) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 27, in <module> import optparse File "/usr/lib/python2.7/optparse.py", line 1557 print(self.get_usage(), file=file) ^ SyntaxError: invalid syntax dpkg: error processing package python-crypto (--configure): subprocess installed post-installation script returned error exit status 1 Setting up python-wheel (0.29.0-2) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 27, in <module> import optparse File "/usr/lib/python2.7/optparse.py", line 1557 print(self.get_usage(), file=file) ^ SyntaxError: invalid syntax dpkg: error processing package python-wheel (--configure): subprocess installed post-installation script returned error exit status 1 Setting up python-roman (2.0.0-2) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 27, in <module> import optparse File "/usr/lib/python2.7/optparse.py", line 1557 print(self.get_usage(), file=file) ^ SyntaxError: invalid syntax dpkg: error processing package python-roman (--configure): subprocess installed post-installation script returned error exit status 1 Setting up python-pypdf2 (1.26.0-2) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 27, in <module> import optparse File "/usr/lib/python2.7/optparse.py", line 1557 print(self.get_usage(), file=file) ^ SyntaxError: invalid syntax dpkg: error processing package python-pypdf2 (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of python-keyrings.alt: python-keyrings.alt depends on python-crypto; however: Package python-crypto is not configured yet. dpkg: error processing package python-keyrings.alt (--configure): dependency problems - leaving unconfigured Setting up python-gi (3.22.0-2) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 27, in <module> import optparse File "/usr/lib/python2.7/optparse.py", line 1557 print(self.get_usage(), file=file) ^ SyntaxError: invalid syntax dpkg: error processing package python-gi (--configure): subprocess installed post-installation script returned error exit status 1 Setting up python-epydoc (3.0.1+dfsg-14) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 27, in <module> import optparse File "/usr/lib/python2.7/optparse.py", line 1557 print(self.get_usage(), file=file) ^ SyntaxError: invalid syntax dpkg: error processing package python-epydoc (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of pdfshuffler: pdfshuffler depends on python-pypdf2 | python-pypdf (>= 1.10); however: Package python-pypdf2 is not configured yet. Package python-pypdf is not installed. dpkg: error processing package pdfshuffler (--configure): dependency problems - leaving unconfigured Setting up python-dbus (1.2.4-1+b1) ... Remove stale byte-compiled files... Traceback (most recent call last): File "/usr/bin/pycompile", line 27, in <module> import optparse File "/usr/lib/python2.7/optparse.py", line 1557 print(self.get_usage(), file=file) ^ SyntaxError: invalid syntax dpkg: error processing package python-dbus (--configure): subprocess installed post-installation script returned error exit status 1 Setting up python-xdg (0.25-4) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 27, in <module> import optparse File "/usr/lib/python2.7/optparse.py", line 1557 print(self.get_usage(), file=file) ^ SyntaxError: invalid syntax dpkg: error processing package python-xdg (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of python-secretstorage: python-secretstorage depends on python-dbus; however: Package python-dbus is not configured yet. dpkg: error processing package python-secretstorage (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of python-docutils: python-docutils depends on python-roman; however: Package python-roman is not configured yet. dpkg: error processing package python-docutils (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of python-keyring: python-keyring depends on python-dbus; however: Package python-dbus is not configured yet. python-keyring depends on python-secretstorage; however: Package python-secretstorage is not configured yet. dpkg: error processing package python-keyring (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of python-gobject: python-gobject depends on python-gi (>= 3.22.0-2); however: Package python-gi is not configured yet. dpkg: error processing package python-gobject (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of python-poppler: python-poppler depends on python-gobject (>= 2.10.1); however: Package python-gobject is not configured yet. dpkg: error processing package python-poppler (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: python-crypto python-wheel python-roman python-pypdf2 python-keyrings.alt python-gi python-epydoc pdfshuffler python-dbus python-xdg python-secretstorage python-docutils python-keyring python-gobject python-poppler E: Sub-process /usr/bin/dpkg returned an error code (1) It get something similar when I try sudo apt-get install with any python-PACKAGE. I also tried editing /var/lib/dpkg/status file, deleting the entries of not properly installed or configured python packages, but it didn't help (the same problem reappeared when trying to reinstall or removed these packages). Any idea? Thank you! (System: Debian Stretch w/KDE Plasma. I7 8500U 16Gb) Following Filipe Branderburger's comments, I looked up for errors in optparse.py: eric@debian:~$ dpkg -S /usr/lib/python2.7/optparse.py libpython2.7-minimal:amd64: /usr/lib/python2.7/optparse.py eric@debian:~$ dpkg -V libpython2.7-minimal ??5?????? /usr/lib/python2.7/optparse.py eric@debian:~$ ls -l /usr/lib/python2.7/optparse.py -rw-r--r-- 1 eric eric 60337 Mar 20 00:01 /usr/lib/python2.7/optparse.py eric@debian:~$ readlink -f /usr/lib/python2.7/optparse.py /usr/lib/python2.7/optparse.py Does it means that the md5sum verification has failed?
So it looks like file optparse.py from your Python 2.7 installation got corrupted. More specifically, it seems to have been overwritten and replaced by a copy of optparse.py from Python 3. The output of dpkg -V shows many fields checking owner, group, mode, etc. The 5 in the output indicates that the MD5 checksum of the file in the system doesn't match the one in the package manifest. (In other words, the contents have been modified after the package was installed.) Not really sure how you could find out what might have caused that... If you have installed Python modules, as root, using something other than your O.S. package distribution, that could explain it... Perhaps if you installed something using pip? Though pip is usually good at keeping Python 2 and Python 3 modules separate... Also, I don't see why it would touch optparse.py specifically... In any case, to fix this problem, you could ask apt-get to reinstall the package, which should fix the corruption: $ sudo apt-get install --reinstall libpython2.7-minimal
dpkg returns error when installing python package (Debian)
1,560,767,500,000
I would like to be able to list all the NEWS from packages that have been upgraded since I last ran the script/command. This would then likely be run in a cron job once per week in order to provide a summary of any upgrade information. The apt-listchanges command looks like what I want, but I can't seem to get it to behave exactly as I described. The command I've tried running is: apt-listchanges -f text -a --which=news --save_seen=/var/lib/apt/listchanges.db /var/cache/apt/archives/*.deb It seems to want the actual packages to be listed, rather than just checking all of them by default, so I gave it everything in the cache, I'm not sure if that is the best way to do that. But, the bigger problem, is that by default it only shows changes between the currently installed versions, therefore shows no changes. Therefore I added the -a option to display all changes, and then added the save_seen option which claims that it will stop it displaying changes that have been previously shown. But, each time I run the command it displays all the changes every time. Is there a way to tweak the command to work as expected? Or, maybe some other solution, such as using an apt hook to append the NEWS for each upgraded package to a file, then my script can simply read the file and delete the contents each time it runs.
I can think of two approaches which don’t involve tweaking apt-listchanges too much. Both rely on the default apt-listchanges hook in apt; check that /etc/apt/apt.conf.d/20listchanges exists on your system. This works nicely because apt-listchanges is run with the list of packages which apt is about to upgrade, and can thus compare the current installed versions with these. (apt-listchanges’ design makes it difficult to run after the fact; you could use the --since option but you’d need to keep track of the appropriate values.) The first approach is to configure apt-listchanges to send an email with any changes. This needs a working mail setup on the system, which might not be convenient for you; but I find it very handy. In the [apt] section of /etc/apt/listchanges.conf, set frontend=mail, and email_address as appropriate; then apt-listchanges will run every time apt runs, and send an email containing the news items (and/or changelogs, depending on the which setting). The second, which I haven’t actually tried, is to configure apt-listchanges to simply dump news entries and/or changelogs to its standard output, and redirect that to a log file which you can then read whenever convenient. In the [apt] section of /etc/apt/listchanges.conf, set frontend=text; in /etc/apt/apt.conf.d/20listchanges, add an appending redirection to your target file.
List all NEWS from previously updated packages
1,560,767,500,000
How would you resolve this error when you run sudo apt-get dist-upgrade? Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 2 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up linux-image-4.9.0-3-amd64 (4.9.30-2+deb9u2) ... /etc/kernel/postinst.d/initramfs-tools: update-initramfs: Generating /boot/initrd.img-4.9.0-3-amd64 /etc/kernel/postinst.d/zz-update-grub: /usr/sbin/grub-mkconfig: 1: /etc/default/grub: ]#: not found run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127 dpkg: error processing package linux-image-4.9.0-3-amd64 (--configure): subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of linux-image-amd64: linux-image-amd64 depends on linux-image-4.9.0-3-amd64; however: Package linux-image-4.9.0-3-amd64 is not configured yet. dpkg: error processing package linux-image-amd64 (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: linux-image-4.9.0-3-amd64 linux-image-amd64 E: Sub-process /usr/bin/dpkg returned an error code (1) I'm on Debian 9 (stretch) and the latest version of the kernel is actually the one that I currently have (linux-image-4.9.0-3-amd64) When I run sudo dpkg --configure -a I get the following message: sudo dpkg --configure -a dpkg: dependency problems prevent configuration of linux-image-amd64: linux-image-amd64 depends on linux-image-4.9.0-3-amd64; however: Package linux-image-4.9.0-3-amd64 is not configured yet. dpkg: error processing package linux-image-amd64 (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: linux-image-amd64 I've tried running these commands to no avail: sudo apt-get autoclean sudo apt-get clean sudo apt-get update sudo apt-get upgrade sudo apt-get dist-upgrade sudo apt-get -f install And if I run the sudo dkpg --purge linux-image-4.9.0-3-amd64 and just update and reinstall the kernel, I get this dependency error: dpkg: dependency problems prevent removal of linux-image-4.9.0-3-amd64: linux-image-amd64 depends on linux-image-4.9.0-3-amd64. dpkg: error processing package linux-image-4.9.0-3-amd64 (--purge): dependency problems - not removing Errors were encountered while processing: linux-image-4.9.0-3-amd64 Thanks in advance.
You don't have a dependency problem. You have a package configuration problem. The relevant part of the transcript is: /etc/kernel/postinst.d/zz-update-grub: /usr/sbin/grub-mkconfig: 1: /etc/default/grub: ]#: not found run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127 Everything after that is a consequence of this problem: a kernel post-installation script failed, so the package linux-image-4.9.0-3-amd64 is not installed properly (it is not configured, in Debian terminology), and so packages that depend on it aren't properly installed either. Evidently there is a typo in /etc/default/grub (stray ] at the beginning of a line, it seems). Fix that, then finish the ongoing installations with apt-get -f install
How to resolve dpkg dependencies for linux kernel? (Debian)
1,560,767,500,000
I accidentally ran apt install '*'. Although it didn't install anything due to conflicts (e.g. multiple versions of vim editor), all installed packages lost their "automatic" property, which means I cannot enjoy APT's auto dependency check anymore. That is, if I remove vim, apt no longer prompts me to remove vim-runtime. I'm using a stripped down version of Advanced Packaging Tool, so apt-mark is not available. How can I restore the automatic property for those that are depended by another? Note: I have apt, apt-get, apt-cache, apt-config and apt-key available.
On Debian and derivatives, the information about manual vs automatic installation is stored in /var/lib/apt/extended_states. There are no automatic backups and no logs. If you have a backup of that file, restore it. If you don't have a backup, first make one in case you make up. Then, for each package, change the line Auto-Installed: 0 to Auto-Installed: 1 to mark the package as manually installed. APT itself doesn't keep track of the dependencies of installed packages, that's done by dpkg. The information is in /var/lib/dpkg/status on Debian. Aptitude has an advanced search functionality that can operate on dependencies, but not apt. You can do some ad hoc parsing of /var/lib/dpkg/status. The following script (minimally tested) generates a list of packages that some installed package depends on: </var/lib/dpkg/status awk ' /^Package:/ {package=$2} /^Status:/ && $4 != "installed" {package=""} /^(Depends|Pre-Depends|Recommends|Suggests):/ && package != "" { sub(/^[^:]*: */, ""); gsub(/ (\([^()]*\))/, ""); split($0, dependencies, /[|, ]+/); for (d in dependencies) print dependencies[d]} ' | sort -u >dependencies.txt Review that list, and maybe remove some lines that are packages which happen to be dependencies but that you know you'll want to keep even regardless. Then use this to tweak /var/lib/apt/extended_states: </var/lib/apt/extended_states awk ' BEGIN { while (getline <"dependencies.txt") auto[$0]=1; RS=""; } $2 in auto {sub(/\nAuto-Installed: 0/, "\nAuto-Installed: 1")} {print $0 "\n"} ' >extended_states.new Review the output file and move it into place if you're satisfied.
Accidentally run "apt install *" now all packages are marked as "manually installed"
1,560,767,500,000
I installed gdm on my vps and now I want to remove it but get this error: root@server2:/etc/init.d# apt-get remove gdm3 Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: gdm3 0 upgraded, 0 newly installed, 1 to remove and 6 not upgraded. After this operation, 7066 kB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 119416 files and directories currently installed.) Removing gdm3 ... invoke-rc.d: initscript gdm3, action "stop" failed. dpkg: error processing gdm3 (--remove): subprocess installed pre-removal script returned error exit status 127 configured to not write apport reports invoke-rc.d: initscript gdm3, action "reload" failed. Errors were encountered while processing: gdm3 E: Sub-process /usr/bin/dpkg returned an error code (1) root@server2:/etc/init.d#
when removing the package, some cleanup scripts are run. it seems like one of these fails (namely /etc/init.d/gdm3), rendering the un-installation incomplete. the proper way to fix this, is by checking why the script fails. try running /etc/init.d/gdm3 stop manually, and see why it fails. fix the underlying error, then try to uninstall again. an ugly hack if the underlying problem is unfixable (by you), you might have more luck with the following simple fix: first make sure that gdm3 is no longer running (as a last ressort you might kill it). then add the line exit 0 to the beginning of the /etc/init.d/gdm3 file (somewhen after the shebang, but before the script actually does anything; e.g. line#2). this will practically disable the script and make it pretend to always succeed. finally re-run the uninstallation. NOTE: this is a really ugly hack, as it circumvents any cleanup the init.d-script might need to perform. be warned.
Gdm uninstallation fails (“pre-removal script returned error”)
1,560,767,500,000
I'm not able to install, update or do anything else with apt-get, aptitude, dpkg and so on. The lock-file /var/lib/dpkg/lock exists from boot-time on. When I delete it and run apt-get update, it prints out, that dpkg has been interrupted. I tried dpkg --configure -a as mentioned in the help text, but that runs into a problem with gconf2: root@andre-ubuntu:/home/andre# dpkg --configure -a Setting up libbonoboui2-0:amd64 (2.24.5-0ubuntu2) ... Setting up libgnomeui-0:amd64 (2.24.5-2ubuntu3) ... Processing triggers for libc-bin ... ldconfig deferred processing now taking place Setting up gconf2 (3.2.6-0ubuntu1) ... (gconftool-2:16760): GConf-WARNING **: Client failed to connect to the D-BUS daemon: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken. dpkg stops at this point and i can't even interrupt it with Ctrl+C. I have the following version of Ubuntu: Linux andre-ubuntu 3.8.0-19-generic #30-Ubuntu SMP Wed May 1 16:35:23 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux Do you have any ideas what to do?
I was having the same problem some years ago due to a GUI widget that was looking for system updates and which was locking the package manager. You can maybe verify running GUI applications (including widget, systray) to be sure that no one related to package management is opened.
Can't install anything
1,560,767,500,000
I'm trying to install docker with apt from the https://download.docker.com/linux/debian/ repo. Unfortunately installation always fails with a hash mismatch warning. I have already tried everything suggested in this post https://askubuntu.com/questions/41605/trouble-downloading-packages-list-due-to-a-hash-sum-mismatch-error without any success. The thing is when I compare the hash of the following error Fetched 21.4 MB in 17s (1,290 kB/s) E: Failed to fetch https://download.docker.com/linux/debian/dists/buster/pool/stable/amd64/containerd.io_1.2.13-2_amd64.deb Hash Sum mismatch Hashes of expected file: - SHA512:e0432c524abf9d915d42eab87c0a6cf4bd589cf2f250652253f98099c7961196f59ea0eb3f5683b05eafd969254e614739dc5681da0573b09a2eab64ab4efcfd - SHA256:71209f4a958d94639cba81ba3469d0aa9eff3da484106580959f5cf1fd116666 - SHA1:08fd3a4a4e82a1c0452c6bbd5803b19315c7e968 [weak] - MD5Sum:2ed3788e04a8a8787ea83b8b3a00152f [weak] - Filesize:21404482 [weak] Hashes of received file: - SHA512:24c80b4371056e0b7c34a7e9abde3ee62ecfb8ee5dbbb8db4a48104b16574749588ca00f71bc4d7c4fe148a9f706e86a9a2b4ac1f5f7955bfb316950f093de49 - SHA256:81753f427efcc308215d8a604e020743ab86ff2c45d67d86f35291d14550e203 - SHA1:316d0bbe37b28c9da64bfa263e2b31a3bbe7199e [weak] - MD5Sum:8dacbbff65f077d567ab1bff2cc2ad4b [weak] - Filesize:21404482 [weak] Last modification reported: Fri, 15 May 2020 03:23:56 +0000 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing? with the output of md5sum containerd.io_1.2.13-2_amd64.deb (file downloaded manually from https://download.docker.com/linux/debian/dists/buster/pool/stable/amd64/containerd.io_1.2.13-2_amd64.deb) I get the md5 hash 2ed3788e04a8a8787ea83b8b3a00152f containerd.io_1.2.13-2_amd64.deb which is exactly what apt claims is the expected value. So my only guess is that apt is either downloading something wrong or hashes the wrong way. This sound quite strange to me and I could not find any help searching for this. Here is my sources.list $ cat /etc/apt/sources.list # # deb cdrom:[Official Debian GNU/Linux Live 10.4.0 xfce 2020-05-09T10:59]/ buster main # deb cdrom:[Official Debian GNU/Linux Live 10.4.0 xfce 2020-05-09T10:59]/ buster main deb http://ftp.tu-clausthal.de/debian/ buster main deb-src http://ftp.tu-clausthal.de/debian/ buster main deb http://security.debian.org/debian-security buster/updates main deb-src http://security.debian.org/debian-security buster/updates main # buster-updates, previously known as 'volatile' deb http://ftp.tu-clausthal.de/debian/ buster-updates main deb-src http://ftp.tu-clausthal.de/debian/ buster-updates main # This system was installed using small removable media # (e.g. netinst, live or single CD). The matching "deb cdrom" # entries were disabled at the end of the installation process. # For information about how to configure apt package sources, # see the sources.list(5) manual. deb [arch=amd64] https://download.docker.com/linux/debian buster stable Debian is running in a virtual machine. Host system is Windows 10. Thanks for any advice!
Thanks @muru for referring to this post, it was indeed a problem with Windows' hyper-v and VirtualBox. Disabling the hyper-v acceleration solved the problem.
VirutalBox: apt download / hashing problem (APT Hash Sum Mismatch)
1,560,767,500,000
I'm writing a bash script, and I have a list of dpkg package names and I want my script to write a text file with the following format: name of package description name of package description ... Here is the simple sentence that should do it but it does not... cat /media/sdcard/liste_des_paquets_sans_dependances_inverse | while read ligne ; do dpkg-query --showformat='${Package}\n\n${Description}\n\n\n\n' --show $ligne >> descriptions.txt done Maybe you'll see where my fault is?
OK i found the problem. It was the "end of line" character in the list. i did a "return" press on each beginning of line and an "enter" press to change this "end of line" character and it worked... just a few things that take several hours of your time... i'll work on a different script to make my list... thank you both for your time!
List description of a package list [closed]
1,560,767,500,000
I was trying to crossgrade my architecture from i386 to amd64 (from https://wiki.debian.org/CrossGrading) and I got some error and broke apt-get and dpkg. apt-get and dpkg output cannot execute binary file: Exec format error sudo apt-get outputs /usr/bin/apt-get: 3: /usr/bin/apt-get: Syntax error: ")" unexpected Here is the output from running some commands to give you the idea: http://paste.debian.net/949117/ uname -a outputs Linux chowder 3.16.0-4-686-pae #1 SMP Debian 3.16.43-2 (2017-04-30) i686 GNU/Linux so I think I'm i686 which I think is 32 bit. Therefore I think the issue is that I'm on a 32 bit system running 64 bit apt-get and dpkg. This makes sense because I could have done the "Crossgrade dpkg, tar, and apt" part of that wiki without properly crossgrading my architecture - I could have missed an error. Eventually I want to be on an amd64 bit architecture to download chrome and all sorts of stuff, but first I'll need to fix my apt-get and dpkg, and maybe that end goal is just a pipe dream. Should I just reinstall my os instead of crossgrading? Should I downgrade apt-get and dpkg (change them from 64 bit to 32 bit)? If so, where can I get an official copy of apt-get or dpkg - 32 bit? I wonder how I would have to install it once I got it too... I was on the #debian IRC chat as nate_ (and nate__ at one point because I accidentally had two tabs open) talking about this issue, but had to leave before I got an answer. There "flying_commands" said "maybe you could manually extract the i686 debs from debian.org (on another machine?) to get the binaries back?" but I'm not quite sure how to do that, and how to install the debs without dpkg working. Thank you to those at #debian, who helped extract a lot of this information so far. And thanks in advance to anyone who can help out.
I tried to crossgrade too, ended up with the same results as you. Reinstalling the system is the easiest and fastest way of troubleshooting your problem.
I broke apt-get and dpkg when trying to crossgrade my Debian architecture
1,560,767,500,000
I need to rollback some packages. I have a list of all the packages I need to rollback and the versions I need. All the versions I need are sitting in /var/cache/apt/archives yet apt ignored them telling me that it couldn't find the version I asked for. How can I get apt to see the older versions? I did try using dpkg-scanpackages but it seems to ignore the older ones favoring the newer ones. The command I used is apt-get -s install $(cat rollback.txt | tr '\n' ' '). rollback.txt contains all of the packages I wish to downgrade in the correct apt format. rollback.txt. The errors are linked here: errors.log. I'm basically looking to downgrade of everything from today. I'll then go through and do an upgrade that won't brick my system.
I must correct me. In /var/cache/apt/archives dpkg-scanpackages -m ./ /dev/null | gzip > Packages.gz The parameter -m means -m, --multiversion Include all found packages in the output.
apt-get rollback version not found
1,560,767,500,000
A command like dpkg -i *.deb will install all deb files in a folder without warning of incompatibilities and such. Can this command be changed so that installation of broken packages is avoided, warning displayed, etc?
incompatibilities and such What do you mean by that? Before installing, dpkg first checks if all dependencies of the .deb package(s) to be installed are satisfied. If the dpkg database is inconsistent, a message is printed.
Is there a dpkg argument to warn about incomptibilities/broken dependencies?
1,560,767,500,000
I am trying to install Oracle SQL Developer onto a Debian Linux server. I started off by downloading a package from the Oracle website; sqldeveloper-4.0.3.16.84-1.noarch.rpm I then called the following command to make this into a .deb package. alien sqldeveloper-4.0.3.16.84-1.noarch.rpm This command ran successfully and created the new file: sqldeveloper_4.0.3.16.84-2_all.deb To install this package I then called the following: dpkg -i sqldeveloper_4.0.0.12.27-2_all.deb Which outputted the following: dpkg: warning: downgrading sqldeveloper from 4.0.3.16.84+0.2.3-1 to 4.0.3.16.84-2. (Reading database ... 33017 files and directories currently installed.) Preparing to replace sqldeveloper 4.0.3.16.84+0.2.3-1 (using sqldeveloper_4.0.3.16.84-2_all.deb) ... Unpacking replacement sqldeveloper ... dpkg-deb (subprocess): short read on buffer copy for failed to write to pipe in copy dpkg-deb: subprocess paste returned error exit status 2 dpkg: error processing sqldeveloper_4.0.3.16.84-2_all.deb (--install): short read on buffer copy for backend dpkg-deb during `./opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/lib/pdfbox-app-1.8.0.jar' Errors were encountered while processing: sqldeveloper_4.0.3.16.84-2_all.deb I have looked through Google to try and find solutions to this problem and have come across similar issues for errors with --configure and --uninstallbut nothing for--install`.
You have used alien to transform the package format from .rpm to .deb. In the most cases that tool works flawless. But rarely it fails building an installable package. Especially if there are some install or config-scripts included in the .rpm package (which are like the pre and post install/remove scripts in a .deb package). You didn't tell, whether there were some errors or warnings outputted when running alien. It can “run successfully” and produce an empty or broken package nevertheless… If there were some errors or warnings, have a closer look at them. The messages will likely point in the right direction. But for the following I assume there were no errors outputted by alien. A first check to look for what went wrong would be to extract both package format versions and compare the contents. First make two temp dirs mkdir /tmp/sqldeveloper.deb /tmp/sqldeveloper.rpm Then extract the .deb package dpkg-deb -X sqldeveloper_4.0.0.12.27-2_all.deb /tmp/sqldeveloper.deb And the rpm package cd /tmp/sqldeveloper.rpm rpm2cpio sqldeveloper-4.0.3.16.84-1.noarch.rpm | cpio -idmv You can then compare the directories with diff diff . /tmp/sqldeveloper.deb If there are files missing in the .deb directory, the package was broken by alien. Maybe ask the developers of that tool for help then. But how I read the messages outputted by dpkg -i you posted, there is some issue with the packaging by itself, and the file ./opt/sqldeveloper/sqldeveloper/extensions/oracle.datamodeler/lib/pdfbox-app-1.8.0.jar couldn't be extracted. Maybe the parent directory is missing or there is some wired access rights problem. I think that problems will show up when you try to extract the .deb archive by hand like shown above. By the way: it's a java software, and the “Other Platforms” versions which is available for download is a zip archive. It will presumably run without installation when extracted in your home directory.
Error When trying to install a package using dpkg
1,560,767,500,000
fontconfig issues # dpkg --configure -a Setting up font config (2.13.1-4.5) ... Regenerating fonts cache... failed. See /var/log/fontconfig.log for more information. dpkg: error processing package fontconfig (--configure): installed font config package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: fontconfig # cat /var/log/fontconfig.log fc-cache: symbol lookup error: /lib/x86_64-linux-gnu/libharfbuzz.so.0: undefined symbol: FT_Get_Transform According to the log output, I ran the command to downgrade the libharfbuzz* package from version 5.2.0-2 to 2.7.4-1, but it can't be managed without fixing the fontconfig issue. # apt install libharfbuzz*=2.7.4-1 Reading package lists... Done Building dependency tree... Done Reading state information... Done Note, selecting 'libharfbuzz0' for glob 'libharfbuzz*' Note, selecting 'libharfbuzz-icu0' for glob 'libharfbuzz*' Note, selecting 'libharfbuzz-gobject0' for glob 'libharfbuzz*' Note, selecting 'libharfbuzz0a' for glob 'libharfbuzz*' Note, selecting 'libharfbuzz0b' for glob 'libharfbuzz*' Note, selecting 'libharfbuzz-bin' for glob 'libharfbuzz*' Note, selecting 'libharfbuzz-dev' for glob 'libharfbuzz*' Note, selecting 'libharfbuzz-doc' for glob 'libharfbuzz*' 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Setting up font config (2.13.1-4.5) Regenerating fonts cache... failed. See /var/log/fontconfig.log for more information. dpkg: error processing package fontconfig (--configure): installed fontconfig package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: fontconfig needrestart is being skipped since dpkg has failed E: Sub-process /usr/bin/dpkg returned an error code (1)
I had the exact same problem. Check for manually compiled old versions of libfreetype which is usually provided by the libfreetype6 package. I had and older version compiled in /usr/local/lib which not only broke the fontconfig but as e result of the broken fontconfig, the update-initramfs has been broken too.
dpkg: error processing package fontconfig (--configure)
1,560,767,500,000
when I do dpkg --get-selections or less /proc/modules I see two different list. I don't understand the difference between the elements of each...
The two commands are not related in any way. dpkg --get-selections returns the selection state of available packages. From man dpkg: --get-selections [package-name-pattern...] Get list of package selections, and write it to stdout. Without a pattern, non-installed packages (i.e. those which have been previously purged) will not be shown. The selection state is one of: install The package is selected for installation. hold A package marked to be on hold is not handled by dpkg, unless forced to do that with option --force-hold. deinstall The package is selected for deinstallation (i.e. we want to remove all files, except configuration files). purge The package is selected to be purged (i.e. we want to remove everything from system directories, even configuration files). /proc/modules, on the other hand, is the list of available kernel modules (you can consider these as equivalent to dll files in the Windows world). While some modules will have been installed as packages, others are included in the kernel. So, looking at the list of modules, you will see some overlap with the dpkg command above if you have installed certain modules that are not part of the kernel. For example, on my system, I have installed the fuse package which provides the fuse kernel module. I therefore have an entry for fuse in both lists: $ dpkg --get-selections | grep -P 'fuse\t' fuse install $ grep 'fuse' /proc/modules fuse 67503 3 - Live 0xffffffffa1140000 Conversely, the package firefox does not provide any modules so it is only listed in the dpkg output: $ dpkg --get-selections | grep -P 'firefox\t' firefox install $ grep 'firefox' /proc/modules $
What is the difference between a linux package and a linux module?
1,560,767,500,000
I'm very new to Linux overall and I'm trying to find a way to build a Debian package on an Alpine docker image. It is by far the fastest I can get my pipeline to run, but unfortunately when I try to run dpkg-deb --build I get the following error: 03:22:44 dpkg-deb: building package 'x-sync' in 'x-sync_1.0.2.deb'. 03:22:44 tar: unrecognized option: format=gnu 03:22:44 BusyBox v1.27.2 (2018-01-29 15:48:57 GMT) multi-call binary. 03:22:44 03:22:44 Usage: tar -[cxtZzJjahmvO] [-X FILE] [-T FILE] [-f TARFILE] [-C DIR] [FILE]... 03:22:44 03:22:44 Create, extract, or list files from a tar file 03:22:44 03:22:44 Operation: 03:22:44 c Create 03:22:44 x Extract 03:22:44 t List 03:22:44 f Name of TARFILE ('-' for stdin/out) 03:22:44 C Change to DIR before operation 03:22:44 v Verbose 03:22:44 Z (De)compress using compress 03:22:44 z (De)compress using gzip 03:22:44 J (De)compress using xz 03:22:44 j (De)compress using bzip2 03:22:44 a (De)compress using lzma 03:22:44 O Extract to stdout 03:22:44 h Follow symlinks 03:22:44 m Don't restore mtime 03:22:44 exclude File to exclude 03:22:44 X File with names to exclude 03:22:44 T File with names to include 03:22:44 dpkg-deb: error: subprocess tar -cf returned error exit status 1 I attempted the packaging on the following Dockerfile: FROM alpine RUN apk add --no-cache dpkg openjdk8 Is there any way to build a Debian package on this distro that would be cross compatible with other distros, e.g. my Ubuntu dev environment?
The best environment in which to build Debian packages is always a Debian-based environment. While Alpine-based containers are nice because of their small size and fast setup times, they introduce a number of issues, two of which are particularly troublesome: they use Busybox, where Debian packages rely on the GNU variants of most tools (e.g. tar as you discovered); most importantly, they use musl, where Debian defaults to glibc. Both of these can be worked around, but by the time you do that you’ve lost the advantage of a small Alpine container, compared to a minimal Debian container (such as bitnami/minideb as you mentioned). Note that if you’re running a Debian derivative on your development and/or build systems, you can skip the container stage entirely, while still using a contained build environment, by using pbuilder. For maximum speed, mount a tmpfs on /var/cache/pbuilder/build, and run the build with eatmydata. sbuild and cowbuilder are also worth looking into, especially if you regularly build similar packages. As an aside, instead of building binary packages using dpkg-deb -b, I highly recommend learning how to build source packages; start with Vincent Bernat’s pragmatic Debian packaging, it’s nice and easy.
Building .deb on Alpine
1,560,767,500,000
I have compiled a C++ software on my Ubuntu 22.04 laptop, and used checkinstall to install it. This build the corresponding .deb file and that's nice. But now I want to install that .deb file into a docker container based on "Debian GNU/Linux 11 (bullseye)" and dpkg shows this error: # dpkg --install mypackage-8.0.0_20221030-1_amd64.deb dpkg-deb: error: archive 'mypackage-8.0.0_20221030-1_amd64.deb' uses unknown compression for member 'control.tar.zst', giving up dpkg: error processing archive mypackage-8.0.0_20221030-1_amd64.deb (--install): dpkg-deb --control subprocess returned error exit status 2 Errors were encountered while processing: mypackage-8.0.0_20221030-1_amd64.deb How could I install this .deb file into my container without having to compile the software again (which will mean installing all the C++ building tools into my container, which I want to avoid...)?
dpkg in Debian doesn’t support zstd compression. To be able to even extract your package in Debian, you need to convert it: extract its components: ar -x mypackage-8.0.0_20221030-1_amd64.deb decompress them: zstd -d control.tar.zst zstd -d data.tar.zst recompress them: xz control.tar xz data.tar re-create your package: rm mypackage-8.0.0_20221030-1_amd64.deb ar -rc mypackage-8.0.0_20221030-1_amd64.deb debian-binary control.tar.xz data.tar.xz This will produce a package which Debian’s dpkg can at least attempt to process. Since your package was built on Ubuntu 22.04, you’re liable to run into dependency problems. For best results, you should really build the package on the platform you want to run it on. In your case, that means either using ubuntu:22.04 as your container’s base image, or rebuilding your package in a Debian 11 container.
Installing a deb file build with checkinstall on Ubuntu into a docker container based on Debian
1,560,767,500,000
I'm trying to rebuild a Debian system from a recent backup. All the recipes for doing this that I've found begin with a step of the form dpkg --get-selections > package_list This, of course, must be done on the original system, while all I have is an rsync backup on an external drive. This backup, however, includes all of /etc and most1 of /var. Is there a convenient way to replicate/approximate the output of dpkg --get-selections from the contents of /etc and /var? 1 Excluded from the backup are /var/{tmp,run,lock}.
All you need to retrieve the selections is the status file (from /var/lib/dpkg/status or one of its backups, /var/lib/dpkg.status*), and an updates directory alongside it. Then you can run dpkg --admindir=/mnt/backup/var/lib/dpkg/ --get-selections to retrieve the package selections. Once you've restored the installed packages, and before you do anything else to the rebuilt system, you might want to restore /var/lib/apt/extended_states from the backup — that will restore the "automatically installed" flags.
How to approximate `dpkg --get-selections` from a backup of /etc and /var?
1,560,767,500,000
I had openssh-server working on my dedicated server running proxmox, but everytime I tried to upgrade anything I got this error: dpkg:error processing package openssh-server (--configure): subprocess installed post-installation script returned error exit status 10 So I read on forums that I should uninstall and purge openssh-server and install it again therefore I ran proxmox shell which doesn't need ssh to connect to server and remove openssh-server. Now I cannot install it and I don't have ssh access to my server. I tried this: $ dpkg --configure -D 777 openssh-server ... D000400: checking breaker openssh-sftp-server:amd64 virtbroken <none> D000400: checking virtbroken openssh-server Setting up openssh-server (1:7.4p1-10+deb9u3) ... D000002: fork/exec /var/lib/dpkg/info/openssh-server.postinst ( configure ) dpkg: error processing package openssh-server (--configure): subprocess installed post-installation script returned error exit status 10 D000001: ensure_diversions: same, skipping Errors were encountered while processing: openssh-server I also tried removing openssh-server* from /var/lib/dpkg/info and installing it again I didn't have any success. My OS is Debian Stretch and I installed proxmox kernel on it. How can I install openssh-server with these situation?
At last I couldn't config openssh-server but I edit my /etc/apt/sources.list and added these lines: (As my server is in Hetzner Co.) deb http://mirror.hetzner.de/debian/packages jessie main contrib non-free deb http://mirror.hetzner.de/debian/security jessie/updates main contrib non-free deb http://mirror.hetzner.de/debian/packages jessie-updates main contrib non-free Then I installed the latest previous version of openssh-server which it was on jessie mirror. Like this: apt update apt remove openssh-client openssh-sftp-server openssh-server apt clean apt install openssh-client=1:6.7p1-5+deb8u4 apt install openssh-sftp-server=1:6.7p1-5+deb8u4 apt install openssh-server=1:6.7p1-5+deb8u4 You can also check any package versions you can install by this: apt-cache showpkg package apt-cache showpkg openssh-server
subprocess installed post-installation script returned error exit status 10
1,560,767,500,000
In a case where I write a query for dpkg-query to list me some package, I would like it to return me the package name if it finds something. If it doesn't find anything, I don't want it to output: no package found matching {package-name} I would like it to output nothing at all. The reason for this is because my query is in a script and if it returns that my script breaks. How can I achieve this?
You can redirect dpkg-query's stderr to /dev/null to silence the error message, as in dpkg-query --list <package> 2>/dev/null.
How to ignore warnings from dpkg-query when it doesn't find anything?
1,560,767,500,000
I use cat -n to get a line listing of the content in a .txt file. [$] cat exam.txt 1 let's see how far does this go, and if it works or not. if not till where it 2 goes and what happens after that. In nano, things are much more better than in X 3 text editors as there is no set fill therein as there is in nano and hence are 4 much worse off. In dpkg there doesn't seem to do that, or is there ? I am on Debian testing and running dpkg 1.18.18 . Just to make the listing less cumbersome, am using head - [$] dpkg -L nano | head /. /bin /bin/nano /etc /etc/nanorc /usr /usr/share /usr/share/doc /usr/share/doc/nano /usr/share/doc/nano/AUTHORS Because I'm using head I know these are 10 lines or 10 files, considering . as a file as well. I did try something like - $ dpkg -nL nano But got the error it doesn't know that option. If it's not possible, please let me know so I can file it as a feature-request in dpkg.
dpkg -L nano | cat -n does the trick... (It counts directories as well as files though.) If you just want the total, dpkg -L nano | wc -l
Is there a way to list number of files when using dpkg -L to list files of a package?
1,560,767,500,000
I like to check whether several packages are installed or not on Debian/Ubuntu Here is my attempt at a script to do this: query=`dpkg-query -W -f '${Status}'` ok="install ok" if ! [ `$query` curl == "$ok" ] ;then apt-get -y -qq install curl >> /dev/null 2>&1 fi The result is Install: target Installed is not a directory but it should be what you can see in the second variable. I have a headache, npw because I can't find out the right way to handle this.
You seem to be doing things in a needlessly complicated way. Why not just dpkg -l curl || apt-get -y -qq install curl > /dev/null 2>&1 You did ask for a one-liner after all. Since, presumably, all you want is to know whether curl is available, you could also just do type curl >/dev/null 2>&1 || apt-get -y -qq install curl
Loop to check whether a Debian package is installed or not
1,560,767,500,000
I need to use older version of linphone on Debian 12. The version in bookworm is 4.4.10-3, and I actually need 3.12.0, which is available in Buster. On my bookworm build machine, I changed the sources, and downloaded linphone-3.12.0 sources from buster. Then I switched sources back to bookworm, and installed any necessary dependencies. Update with more details I made some progress, and now I get much further in the compilation process. However, it fails eventually: make[3]: Leaving directory '/mnt/src/deb/LINPHONE/linphone-3.12.0/obj-x86_64-linux-gnu' [ 66%] Built target linphone-static make[2]: Leaving directory '/mnt/src/deb/LINPHONE/linphone-3.12.0/obj-x86_64-linux-gnu' make[1]: *** [Makefile:159: all] Error 2 make[1]: Leaving directory '/mnt/src/deb/LINPHONE/linphone-3.12.0/obj-x86_64-linux-gnu' dh_auto_build: error: cd obj-x86_64-linux-gnu && make -j4 "INSTALL=install --strip-program=true" VERBOSE=1 returned exit code 2 make: *** [debian/rules:15: binary] Error 2 dpkg-buildpackage: error: fakeroot debian/rules binary subprocess returned exit status 2 The full build output here and debian/rules here
The build fails because of Traceback (most recent call last): File "/mnt/src/deb/LINPHONE/linphone-3.12.0/wrappers/cpp/genwrapper.py", line 764, in <module> main() File "/mnt/src/deb/LINPHONE/linphone-3.12.0/wrappers/cpp/genwrapper.py", line 760, in main genwrapper.render_all() File "/mnt/src/deb/LINPHONE/linphone-3.12.0/wrappers/cpp/genwrapper.py", line 700, in render_all self.render(header, self.includedir + '/enums.hh') File "/mnt/src/deb/LINPHONE/linphone-3.12.0/wrappers/cpp/genwrapper.py", line 716, in render with open(tmppath, mode='rU') as f: ^^^^^^^^^^^^^^^^^^^^^^^^ ValueError: invalid mode: 'rU' Python 3 no longer has a “U” mode for open(). To fix this, add debian/patches/genwrapper.patch containing Index: linphone-3.12.0/wrappers/cpp/genwrapper.py =================================================================== --- linphone-3.12.0.orig/wrappers/cpp/genwrapper.py +++ linphone-3.12.0/wrappers/cpp/genwrapper.py @@ -713,7 +713,7 @@ class GenWrapper(object): content = '' with open(tmppath, mode='w') as f: f.write(self.renderer.render(item)) - with open(tmppath, mode='rU') as f: + with open(tmppath, mode='r') as f: content = f.read() with open(path, mode='w') as f: f.write(content) and add it to debian/patches/series: $ echo genwrapper.patch >> debian/patches/series
building Debian package from Buster fails on Bookworm
1,658,759,967,000
I would like my CI/CD to automatically build .deb of my package for each commit, with for instance the version containing the commit hash (e.g. my-package-662b98b), so we can install a specific version by just specifying the version when installing. However, I don't know how to separate them from regular versions. For instance, the version 3.1 would overwrite version 2abdc4a, or inversly, the commit 924af32 would overwrite 3.1. Is there a field, for example in the control or changelog file, that state that a version of a package is experimental and should not be installed in place of a regular version?
There are two aspects to this. The first is version numbering. Since you want your versions to remain in sequence, you need to include the version as well as the hash. To ensure that versions are sorted properly, this is usually done by appending the build date before the hash, with a snapshot number between the two if there can be multiple builds per day (see the Debian Go packaging policy for example). In your case, you’d have versions like 3.1 for the latest release 3.1+git20220725.1.2abdc4a for the build corresponding to hash 2abdc4a (assuming this is the first hash today) 3.1+git20220725.2.924af32 for the build corresponding to hash 924af32 (assuming this is the second hash today) The second is separating release packages from snapshot packages. To handle this, you need to split your repositories, or rather, you need to host one “suite” for release packages and another for snapshot/experimental packages. See Debian’s experimental Release file for an example of the latter; setting “NotAutomatic: yes” ensures that the packages can’t be installed automatically or used as upgrades.
How to make a debian package only installable by specifying the version
1,658,759,967,000
I just created a simple .deb package (using this tutorial). This is my control file: Package: bla Version: 1.0 Architecture: x86_64 Maintainer: bla Description: bla The Architecture I got from uname -m: x86_64, however, dpkg-deb broke due to _ being an invalid char, so I changed to - which worked but broke on the installation phase: dpkg: error processing archive bla_x86_64.deb (--install): package architecture (x86-64) does not match system (amd64) So I turned to use amd64 as my architecture, and voila! Now I just don't understand this mismatch in architectures between uname -m and dpkg...
For historical reasons, the 64-bit x86 architecture in Debian is amd64. The kernel identifies itself as x86-64 but Debian packages specify amd64. Other architectures have different names depending on context too, e.g. arm64 instead of aarch64. The architecture specifics memo on the Debian wiki gives all the details. See also Why are 64-bit distros often called 'amd64'?
dpkg-deb treats my architecture as amd64 instead of x86-64
1,658,759,967,000
It is required to install a bunch of packages when building a project. Such projects may have dedicated Docker images for this or pre-existing meta-packages. But for the ones that have none of the above, you have to manually install the required packages. For example, if you want to install the dependencies to build the PPSSPP project, you have to run (as of 2020-06-02): sudo apt install build-essential cmake libgl1-mesa-dev libsdl2-dev libvulkan-dev The more projects you build from scratch, the more dependency packages you install on your system, losing track of why libsdl2-dev is manually installed on your system. Is there an existing tool (or apt command) that install a group of packages automatically under a given group name, for example by automatically creating a meta-package depending on all given packages, with a given name: sudo my-apt-tool install custom-ppsspp-metapkg build-essential cmake (...) That way, when you remove custom-ppsspp-metapkg, the no longer useful dependency packages are marked as no longer required by APT. Or... is it a bad idea?
Specifically for build dependencies, there’s already a tool for that, or near enough; mk-build-deps (in devscripts) will create a meta-package encapsulating another package’s build-dependencies, so you can then install the meta-package and have any dependencies be automatically installed (and then become autoremoval candidates when the meta-package is removed). See Automatically install unmet build dependencies as detected by dpkg-checkbuilddeps for details. In other scenarios, you could use equivs. See Create a .deb package with only dependencies for details.
Automatically install multiple packages under one custom meta-package
1,658,759,967,000
Say I'm running a Debian based distro and I want to know what packages I ran apt-get install <package-name> to install, but I didn't want to include any packages that were auto-installed as dependencies when I installed another package using apt-get install <package-name>...would there be a way to find this out? My guess is that there isn't a way because apt and dpkg probably don't differentiate between the two, but I'd prefer to be proved wrong if possible.
Packages installed as dependencies are marked as automatically installed. You can see and manipulate these markers with apt-mark. apt-mark showmanual will list packages which aren’t marked as automatically installed, i.e. packages installed explicitly.
How to get a list of which packages were installed with apt-get by a user and not by dependencies?
1,658,759,967,000
I cannot seem to install any package at the app at the moment, it seems like the packages required for those apps to install are bad, I have searched and tried some solutions but those same packages still throw errors when i try them. These are the lines when i run sudo dpkg --configure -a: sudo dpkg --configure -a Setting up python-apt-common (1.6.4+elementary6~ubuntu5.0.1) ... Setting up libgs9-common (9.26~dfsg+0-0ubuntu0.18.04.9) ... Setting up imagemagick-6-common (8:6.9.7.4+dfsg-16ubuntu6.7) ... Installing new version of config file /etc/ImageMagick-6/policy.xml ... Setting up libglvnd0:amd64 (1.0.0-2ubuntu2.3) ... Setting up gnome-settings-daemon-schemas (3.28.1-0ubuntu1.3+elementary4~ubuntu5.0.1) ... Setting up libisc169:amd64 (1:9.11.3+dfsg-1ubuntu1.8) ... Setting up libapt-inst2.0:amd64 (1.6.11) ... Setting up libnss-systemd:amd64 (237-3ubuntu10.24) ... Setting up keyboard-configuration (1.178ubuntu2.9) ... Your console font configuration will be updated the next time your system boots. If you want to update it now, run 'setupcon' from a virtual console. update-initramfs: deferring update (trigger activated) Setting up libwbclient0:amd64 (2:4.7.6+dfsg~ubuntu-0ubuntu2.11) ... Setting up libisccc160:amd64 (1:9.11.3+dfsg-1ubuntu1.8) ... Setting up xserver-common (2:1.19.6-1ubuntu4.3) ... Setting up cups-server-common (2.2.7-1ubuntu2.6) ... Setting up language-pack-pl (1:18.04+20190718) ... Setting up elementary-theme (5.2.4+r954+pkg322~daily~ubuntu5.0.1) ... Setting up libllvm8:amd64 (1:8-3~ubuntu18.04.1) ... Setting up nautilus-data (1:3.26.4-0~ubuntu18.04.4) ... Setting up ppp (2.4.7-2+2ubuntu1.1) ... Setting up psmisc (23.1-1ubuntu0.1) ... Processing triggers for mime-support (3.60ubuntu1) ... Setting up ureadahead (0.100.0-21) ... Setting up language-pack-nl (1:18.04+20190117) ... Setting up xxd (2:8.0.1453-1ubuntu1.1) ... Setting up libpng16-16:amd64 (1.6.34-1ubuntu0.18.04.2) ... Setting up isc-dhcp-common (4.3.5-3ubuntu7.1) ... Setting up libgtk-3-common (3.22.30-1ubuntu4) ... Setting up libldap-common (2.4.45+dfsg-1ubuntu1.2) ... Setting up libarchive13:amd64 (3.2.2-3.1ubuntu0.3) ... Setting up apt-utils (1.6.11) ... Processing triggers for install-info (6.5.0.dfsg.1-2) ... Setting up debconf-i18n (1.5.66ubuntu1) ... Setting up libgranite-common (5.2.4+r1403+pkg108~ubuntu5.0.1) ... Setting up libisc-export169:amd64 (1:9.11.3+dfsg-1ubuntu1.8) ... Setting up libnuma1:amd64 (2.0.11-2.1ubuntu0.1) ... Setting up cups-common (2.2.7-1ubuntu2.6) ... Setting up tzdata (2019b-0ubuntu0.18.04) ... Current default time zone: 'Africa/Lagos' Local time is now: Sun Jul 28 16:00:35 WAT 2019. Universal Time is now: Sun Jul 28 15:00:35 UTC 2019. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up fonts-noto-color-emoji (0~20180810-0ubuntu1) ... Setting up language-pack-ja (1:18.04+20190718) ... Setting up systemd-sysv (237-3ubuntu10.24) ... Setting up libelf1:amd64 (0.170-0.4ubuntu0.1) ... Setting up mutter-common (3.28.4-0ubuntu18.04.1+elementary4~ubuntu5.0.1) ... Setting up gpgconf (2.2.4-1ubuntu1.2) ... Setting up evolution-data-server-common (3.28.5-0ubuntu0.18.04.2) ... Setting up libglib2.0-0:amd64 (2.56.4-0ubuntu0.18.04.4) ... Setting up libasound2-data (1.1.3-5ubuntu0.2) ... Setting up libwayland-client0:amd64 (1.16.0-1ubuntu1.1~18.04.1) ... Setting up language-pack-fr (1:18.04+20190718) ... Setting up mount (2.31.1-0.4ubuntu3.3) ... Setting up gpg-agent (2.2.4-1ubuntu1.2) ... Setting up distro-info-data (0.37ubuntu0.5) ... Setting up libtiff5:amd64 (4.0.9-5ubuntu0.2) ... Setting up gettext-base (0.19.8.1-6ubuntu0.3) ... Setting up libgweather-common (3.28.2-1~ubuntu18.04.1) ... Setting up libu2f-udev (1.1.4-1ubuntu0.1) ... Setting up libglapi-mesa:amd64 (19.0.2-1ubuntu1.1~18.04.2) ... Setting up libpackagekit-glib2-18:amd64 (1.1.9-1ubuntu2.18.04.5) ... Setting up libdevmapper1.02.1:amd64 (2:1.02.145-4.1ubuntu3.18.04.1) ... Setting up perl-modules-5.26 (5.26.1-6ubuntu0.3) ... Processing triggers for gnome-icon-theme (3.12.0-3) ... Setting up pantheon (1.466+r530~daily~ubuntu5.0.1) ... Setting up fonts-noto-cjk (1:20190409+repack1-0ubuntu0.18.04) ... Setting up libkrb5support0:amd64 (1.16-2ubuntu0.1) ... Setting up libkmod2:amd64 (24-1ubuntu3.2) ... Setting up language-pack-gnome-ja (1:18.04+20190718) ... Setting up gstreamer1.0-tools (1.14.4-1~ubuntu18.04.1) ... Setting up libmagic-mgc (1:5.32-2ubuntu0.2) ... Setting up gnupg-l10n (2.2.4-1ubuntu1.2) ... Setting up libasound2:amd64 (1.1.3-5ubuntu0.2) ... Setting up evince-common (3.28.4-0ubuntu1.2+elementary2~ubuntu5.0.1) ... Setting up bzip2 (1.0.6-8.1ubuntu0.2) ... Setting up uuid-runtime (2.31.1-0.4ubuntu3.3) ... Setting up libmagic1:amd64 (1:5.32-2ubuntu0.2) ... Setting up libdrm-common (2.4.97-1ubuntu1~18.04.1) ... Setting up libsane-common (1.0.27-1~experimental3ubuntu2.1) ... Setting up libxslt1.1:amd64 (1.1.29-5ubuntu0.1) ... Setting up libdevmapper-event1.02.1:amd64 (2:1.02.145-4.1ubuntu3.18.04.1) ... Setting up binutils-common:amd64 (2.30-21ubuntu1~18.04.2) ... Setting up busybox-initramfs (1:1.27.2-2ubuntu3.2) ... Setting up libsndfile1:amd64 (1.0.28-4ubuntu0.18.04.1) ... Setting up libfontembed1:amd64 (1.20.2-0ubuntu3.1) ... Setting up libx11-xcb1:amd64 (2:1.6.4-3ubuntu0.2) ... Setting up bubblewrap (0.2.1-1ubuntu0.1) ... Setting up libglib2.0-data (2.56.4-0ubuntu0.18.04.4) ... Setting up libdbusmenu-glib4:amd64 (16.04.1+18.04.20171206-0ubuntu2) ... Setting up krb5-locales (1.16-2ubuntu0.1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Setting up libmm-glib0:amd64 (1.10.0-1~ubuntu18.04.2) ... Setting up libperl5.26:amd64 (5.26.1-6ubuntu0.3) ... Setting up udev (237-3ubuntu10.24) ... update-initramfs: deferring update (trigger activated) Setting up language-pack-it (1:18.04+20190718) ... Setting up libldap-2.4-2:amd64 (2.4.45+dfsg-1ubuntu1.2) ... Setting up epiphany-browser-data (3.28.5-0ubuntu1+elementary20~ubuntu5.0.1) ... dpkg: error processing package libplank-common (--configure): package is in a very bad inconsistent state; you should reinstall it before attempting configuration Processing triggers for doc-base (0.10.8) ... Processing 4 changed doc-base files... Setting up language-pack-gnome-pl (1:18.04+20190718) ... Setting up gpgsm (2.2.4-1ubuntu1.2) ... Setting up libdns-export1100 (1:9.11.3+dfsg-1ubuntu1.8) ... Setting up openssl (1.1.1-1ubuntu2.1~18.04.4) ... Installing new version of config file /etc/ssl/openssl.cnf ... Setting up libplymouth4:amd64 (0.9.3-1ubuntu7.18.04.2) ... Setting up wget (1.19.4-1ubuntu2.2) ... Setting up libupower-glib3:amd64 (0.99.7-2ubuntu0.18.04.1) ... Setting up gnupg-utils (2.2.4-1ubuntu1.2) ... Setting up vim-common (2:8.0.1453-1ubuntu1.1) ... Setting up libsqlite3-0:amd64 (3.22.0-1ubuntu0.1) ... Setting up dmsetup (2:1.02.145-4.1ubuntu3.18.04.1) ... update-initramfs: deferring update (trigger activated) Setting up language-pack-gnome-nl (1:18.04+20190117) ... Setting up libgles2:amd64 (1.0.0-2ubuntu2.3) ... Setting up man-db (2.8.3-2ubuntu0.1) ... Updating database of manual pages ... Setting up libxkbcommon0:amd64 (0.8.0-1ubuntu0.1) ... Setting up libical3:amd64 (3.0.5-0elementary5.0.1) ... Setting up avahi-autoipd (0.7-3.1ubuntu1.2) ... Setting up libjavascriptcoregtk-4.0-18:amd64 (2.24.2-0ubuntu0.18.04.1) ... Setting up gstreamer1.0-plugins-base-apps (1.14.4-1ubuntu1.1~ubuntu18.04.1) ... Setting up libgda-5.0-common (5.2.4-9ubuntu0.1) ... Setting up libntfs-3g88 (1:2017.3.23-2ubuntu0.18.04.2) ... Setting up busybox-static (1:1.27.2-2ubuntu3.2) ... Setting up initramfs-tools-bin (0.130ubuntu3.8) ... Setting up friendly-recovery (0.2.38ubuntu1.1) ... Sourcing file `/etc/default/grub' Generating grub configuration file ... Found linux image: /boot/vmlinuz-4.15.0-55-generic Found initrd image: /boot/initrd.img-4.15.0-55-generic Found linux image: /boot/vmlinuz-4.15.0-36-generic Found initrd image: /boot/initrd.img-4.15.0-36-generic Found Windows Boot Manager on /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi Adding boot menu entry for EFI firmware configuration done Setting up console-setup-linux (1.178ubuntu2.9) ... Setting up libpython2.7-minimal:amd64 (2.7.15-4ubuntu4~18.04) ... Setting up libpci3:amd64 (1:3.5.2-1ubuntu1.1) ... Setting up dirmngr (2.2.4-1ubuntu1.2) ... Processing triggers for hicolor-icon-theme (0.17-2) ... Setting up irqbalance (1.3.0-0.1ubuntu0.18.04.1) ... Setting up libglib2.0-bin (2.56.4-0ubuntu0.18.04.4) ... Setting up policykit-desktop-privileges (0.20ubuntu18.04.1) ... Setting up gnome-desktop3-data (3.28.2-0ubuntu1.5) ... Setting up elementary-icon-theme (5.0.3+r2120~ubuntu18.04.1) ... Setting up libxcb1:amd64 (1.13-2~ubuntu18.04) ... Setting up libwayland-cursor0:amd64 (1.16.0-1ubuntu1.1~18.04.1) ... Setting up gstreamer1.0-alsa:amd64 (1.14.4-1ubuntu1.1~ubuntu18.04.1) ... Setting up liblwres160:amd64 (1:9.11.3+dfsg-1ubuntu1.8) ... Setting up rfkill (2.31.1-0.4ubuntu3.3) ... Setting up libx11-data (2:1.6.4-3ubuntu0.2) ... Setting up libpython2.7-stdlib:amd64 (2.7.15-4ubuntu4~18.04) ... Setting up libidn11:amd64 (1.33-2.1ubuntu1.2) ... Processing triggers for rsyslog (8.32.0-1ubuntu4) ... Setting up xserver-xorg-legacy (2:1.19.6-1ubuntu4.3) ... setting xserver-xorg-legacy/xwrapper/allowed_users from configuration file Setting up libpolkit-gobject-1-0:amd64 (0.105-20ubuntu0.18.04.5) ... Setting up libdbus-1-3:amd64 (1.12.2-1ubuntu1.1) ... Setting up gpg (2.2.4-1ubuntu1.2) ... Setting up language-pack-sv (1:18.04+20190718) ... Processing triggers for fontconfig (2.12.6-0ubuntu2) ... Setting up python2.7-minimal (2.7.15-4ubuntu4~18.04) ... Setting up libavahi-common-data:amd64 (0.7-3.1ubuntu1.2) ... Setting up language-pack-de (1:18.04+20190117) ... Setting up libwayland-server0:amd64 (1.16.0-1ubuntu1.1~18.04.1) ... Setting up libxcb-xkb1:amd64 (1.13-2~ubuntu18.04) ... Setting up iputils-ping (3:20161105-1ubuntu3) ... Setting up vim-tiny (2:8.0.1453-1ubuntu1.1) ... Setting up libgda-5.0-4:amd64 (5.2.4-9ubuntu0.1) ... Setting up libxcb-present0:amd64 (1.13-2~ubuntu18.04) ... Setting up libpython3.6-stdlib:amd64 (3.6.8-1~18.04.1) ... Setting up libswitchboard-2.0-0 (2.3.6~r935+pkg64~ubuntu5.0.1) ... Setting up console-setup (1.178ubuntu2.9) ... update-initramfs: deferring update (trigger activated) Setting up gstreamer1.0-plugins-base:amd64 (1.14.4-1ubuntu1.1~ubuntu18.04.1) ... Setting up libgeocode-glib0:amd64 (3.25.4.1-4ubuntu0.18.04.1) ... Setting up libxcb-dri2-0:amd64 (1.13-2~ubuntu18.04) ... Setting up libxcb-dri3-0:amd64 (1.13-2~ubuntu18.04) ... Setting up kmod (24-1ubuntu3.2) ... Installing new version of config file /etc/modprobe.d/blacklist.conf ... Setting up libk5crypto3:amd64 (1.16-2ubuntu0.1) ... Setting up libxcb-glx0:amd64 (1.13-2~ubuntu18.04) ... Setting up libxcb-randr0:amd64 (1.13-2~ubuntu18.04) ... Setting up libparted2:amd64 (3.2-20ubuntu0.2) ... dpkg: dependency problems prevent configuration of libplank1:amd64: libplank1:amd64 depends on libplank-common (= 0.11.4+git20190318.fb624c21-0elementary5.0.1); however: Package libplank-common is not configured yet. dpkg: error processing package libplank1:amd64 (--configure): dependency problems - leaving unconfigured Setting up language-pack-gnome-fr (1:18.04+20190718) ... Setting up libxcb-xfixes0:amd64 (1.13-2~ubuntu18.04) ... Setting up language-pack-gnome-de (1:18.04+20190117) ... Setting up libxcb-render0:amd64 (1.13-2~ubuntu18.04) ... Setting up python3.6 (3.6.8-1~18.04.1) ... Setting up libparted-fs-resize0:amd64 (3.2-20ubuntu0.2) ... Setting up libappstream4:amd64 (0.12.6-0elementary5.0.1) ... Setting up desktop-file-utils (0.23-1ubuntu3.18.04.2+elementary2~ubuntu5.0.1) ... Setting up libbinutils:amd64 (2.30-21ubuntu1~18.04.2) ... Setting up initramfs-tools-core (0.130ubuntu3.8) ... Setting up libpolkit-agent-1-0:amd64 (0.105-20ubuntu0.18.04.5) ... Setting up libxcb-res0:amd64 (1.13-2~ubuntu18.04) ... Setting up language-pack-gnome-sv (1:18.04+20190718) ... Setting up libdbusmenu-gtk3-4:amd64 (16.04.1+18.04.20171206-0ubuntu2) ... Setting up libnm0:amd64 (1.10.6-2ubuntu1.1) ... Setting up libldb1:amd64 (2:1.2.3-1ubuntu0.1) ... Setting up libx11-6:amd64 (2:1.6.4-3ubuntu0.2) ... Setting up wpasupplicant (2:2.6-15ubuntu2.3) ... Setting up python2.7 (2.7.15-4ubuntu4~18.04) ... Setting up libnss3:amd64 (2:3.35-2ubuntu2.3) ... Setting up appstream (0.12.6-0elementary5.0.1) ... Installing new version of config file /etc/apt/apt.conf.d/50appstream ... AppStream cache update completed successfully. Setting up initramfs-tools (0.130ubuntu3.8) ... update-initramfs: deferring update (trigger activated) Setting up gpg-wks-server (2.2.4-1ubuntu1.2) ... Setting up parted (3.2-20ubuntu0.2) ... Setting up gpg-wks-client (2.2.4-1ubuntu1.2) ... Setting up file (1:5.32-2ubuntu0.2) ... Setting up libxkbcommon-x11-0:amd64 (0.8.0-1ubuntu0.1) ... Setting up libpulse0:amd64 (1:11.1-1ubuntu7.2) ... Setting up libdrm2:amd64 (2.4.97-1ubuntu1~18.04.1) ... Setting up isc-dhcp-client (4.3.5-3ubuntu7.1) ... Setting up language-pack-gnome-it (1:18.04+20190718) ... Setting up libxcb-sync1:amd64 (1.13-2~ubuntu18.04) ... Setting up perl (5.26.1-6ubuntu0.3) ... Setting up plymouth (0.9.3-1ubuntu7.18.04.2) ... update-initramfs: deferring update (trigger activated) update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults Setting up libpoppler73:amd64 (0.62.0-2ubuntu2.9) ... Setting up libdrm-intel1:amd64 (2.4.97-1ubuntu1~18.04.1) ... Setting up libpolkit-backend-1-0:amd64 (0.105-20ubuntu0.18.04.5) ... Setting up iputils-tracepath (3:20161105-1ubuntu3) ... Setting up elementary-artwork (1.466+r530~daily~ubuntu5.0.1) ... Setting up ntfs-3g (1:2017.3.23-2ubuntu0.18.04.2) ... Processing triggers for systemd (237-3ubuntu10.24) ... Setting up libpython2.7:amd64 (2.7.15-4ubuntu4~18.04) ... Setting up libxcb-shm0:amd64 (1.13-2~ubuntu18.04) ... Setting up pciutils (1:3.5.2-1ubuntu1.1) ... Setting up libkrb5-3:amd64 (1.16-2ubuntu0.1) ... dpkg: dependency problems prevent configuration of plank: plank depends on libplank1 (= 0.11.4+git20190318.fb624c21-0elementary5.0.1); however: Package libplank1:amd64 is not configured yet. dpkg: error processing package plank (--configure): dependency problems - leaving unconfigured Setting up libavahi-common3:amd64 (0.7-3.1ubuntu1.2) ... Setting up libdrm-radeon1:amd64 (2.4.97-1ubuntu1~18.04.1) ... Setting up libavahi-glib1:amd64 (0.7-3.1ubuntu1.2) ... Setting up apt-config-icons (0.12.6-0elementary5.0.1) ... Setting up dbus (1.12.2-1ubuntu1.1) ... A reboot is required to replace the running dbus-daemon. Please reboot the system when convenient. Setting up libdrm-nouveau2:amd64 (2.4.97-1ubuntu1~18.04.1) ... Setting up libpython3.6:amd64 (3.6.8-1~18.04.1) ... Setting up binutils-x86-64-linux-gnu (2.30-21ubuntu1~18.04.2) ... Setting up libavahi-core7:amd64 (0.7-3.1ubuntu1.2) ... Setting up apt-config-icons-large (0.12.6-0elementary5.0.1) ... Setting up libpython3-stdlib:amd64 (3.6.7-1~18.04) ... Setting up libcairo2:amd64 (1.15.10-2ubuntu0.1) ... Setting up libpoppler-glib8:amd64 (0.62.0-2ubuntu2.9) ... Setting up libpam-systemd:amd64 (237-3ubuntu10.24) ... Setting up poppler-utils (0.62.0-2ubuntu2.9) ... Setting up libpulse-mainloop-glib0:amd64 (1:11.1-1ubuntu7.2) ... Setting up libmagickcore-6.q16-3:amd64 (8:6.9.7.4+dfsg-16ubuntu6.7) ... Setting up python3 (3.6.7-1~18.04) ... running python rtupdate hooks for python3.6... running python post-rtupdate hooks for python3.6... Setting up libpulsedsp:amd64 (1:11.1-1ubuntu7.2) ... Setting up gvfs-common (1.36.1-0ubuntu1.3.3) ... Setting up libdrm-amdgpu1:amd64 (2.4.97-1ubuntu1~18.04.1) ... Setting up plymouth-label (0.9.3-1ubuntu7.18.04.2) ... Setting up gstreamer1.0-pulseaudio:amd64 (1.14.4-1ubuntu1~ubuntu18.04.1) ... Setting up apt-config-icons-hidpi (0.12.6-0elementary5.0.1) ... Setting up pulseaudio-utils (1:11.1-1ubuntu7.2) ... Processing triggers for cracklib-runtime (2.9.2-5build1) ... Setting up policykit-1 (0.105-20ubuntu0.18.04.5) ... Setting up gvfs-bin (1.36.1-0ubuntu1.3.3) ... Setting up libcairo-gobject2:amd64 (1.15.10-2ubuntu0.1) ... Setting up libgbm1:amd64 (19.0.2-1ubuntu1.1~18.04.2) ... Setting up gnupg (2.2.4-1ubuntu1.2) ... Setting up libgl1-mesa-dri:amd64 (19.0.2-1ubuntu1.1~18.04.2) ... Setting up apache2-bin (2.4.29-1ubuntu4.8) ... Setting up dbus-x11 (1.12.2-1ubuntu1.1) ... Setting up python3-gi (3.26.1-2ubuntu1) ... Setting up python3-netifaces (0.10.4-0.1build4) ... Setting up dbus-user-session (1.12.2-1ubuntu1.1) ... Setting up libgssapi-krb5-2:amd64 (1.16-2ubuntu0.1) ... Setting up libcamel-1.2-61:amd64 (3.28.5-0ubuntu0.18.04.2) ... Setting up apt-config-icons-large-hidpi (0.12.6-0elementary5.0.1) ... Setting up gvfs-libs:amd64 (1.36.1-0ubuntu1.3.3) ... Setting up libmagickwand-6.q16-3:amd64 (8:6.9.7.4+dfsg-16ubuntu6.7) ... Setting up python3-gdbm:amd64 (3.6.8-1~18.04) ... Setting up libavahi-client3:amd64 (0.7-3.1ubuntu1.2) ... Setting up libegl-mesa0:amd64 (19.0.2-1ubuntu1.1~18.04.2) ... Setting up binutils (2.30-21ubuntu1~18.04.2) ... Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ... Setting up libdns1100:amd64 (1:9.11.3+dfsg-1ubuntu1.8) ... Setting up openssh-client (1:7.6p1-4ubuntu0.3) ... Setting up networkd-dispatcher (1.7-0ubuntu3.3) ... Setting up packagekit (1.1.9-1ubuntu2.18.04.5) ... Setting up libglx-mesa0:amd64 (19.0.2-1ubuntu1.1~18.04.2) ... Setting up libcups2:amd64 (2.2.7-1ubuntu2.6) ... Setting up pulseaudio (1:11.1-1ubuntu7.2) ... Setting up ufw (0.36-0ubuntu0.18.04.1) ... Installing new version of config file /etc/default/ufw ... Replacing config file /etc/ufw/before.rules with new version Replacing config file /etc/ufw/before6.rules with new version Setting up gvfs-daemons (1.36.1-0ubuntu1.3.3) ... Setting up samba-libs:amd64 (2:4.7.6+dfsg~ubuntu-0ubuntu2.11) ... Setting up python3-apt (1.6.4+elementary6~ubuntu5.0.1) ... Setting up libedataserver-1.2-23:amd64 (3.28.5-0ubuntu0.18.04.2) ... Setting up libcurl3-gnutls:amd64 (7.58.0-2ubuntu3.7) ... Setting up cups-ipp-utils (2.2.7-1ubuntu2.6) ... Setting up language-selector-common (0.188.3+elementary4~ubuntu5.0.1) ... Installing new version of config file /etc/fonts/conf.avail/64-language-selector-prefer.conf ... Installing new version of config file /etc/fonts/conf.avail/69-language-selector-ja.conf ... Installing new version of config file /etc/fonts/conf.avail/69-language-selector-zh-hk.conf ... Setting up gstreamer1.0-packagekit (1.1.9-1ubuntu2.18.04.5) ... Setting up libcurl4:amd64 (7.58.0-2ubuntu3.7) ... Setting up libcupsmime1:amd64 (2.2.7-1ubuntu2.6) ... Setting up libebackend-1.2-10:amd64 (3.28.5-0ubuntu0.18.04.2) ... Setting up cups-daemon (2.2.7-1ubuntu2.6) ... Setting up python3-gi-cairo (3.26.1-2ubuntu1) ... Setting up netplan.io (0.97-0ubuntu1~18.04.1) ... Setting up libgtk-3-0:amd64 (3.22.30-1ubuntu4) ... Setting up libebook-contacts-1.2-2:amd64 (3.28.5-0ubuntu0.18.04.2) ... Setting up libsmbclient:amd64 (2:4.7.6+dfsg~ubuntu-0ubuntu2.11) ... Setting up libcupsppdc1:amd64 (2.2.7-1ubuntu2.6) ... Setting up libcupsfilters1:amd64 (1.20.2-0ubuntu3.1) ... Setting up gvfs:amd64 (1.36.1-0ubuntu1.3.3) ... Processing triggers for bamfdaemon (0.5.3+18.04.20180207.2-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Setting up libisccfg160:amd64 (1:9.11.3+dfsg-1ubuntu1.8) ... Setting up libcupsimage2:amd64 (2.2.7-1ubuntu2.6) ... Setting up libegl1:amd64 (1.0.0-2ubuntu2.3) ... Setting up network-manager (1.10.6-2ubuntu1.1) ... Setting up ubuntu-drivers-common (1:0.5.2.3) ... Setting up pulseaudio-module-bluetooth (1:11.1-1ubuntu7.2) ... Setting up nplan (0.97-0ubuntu1~18.04.1) ... Setting up libnautilus-extension1a:amd64 (1:3.26.4-0~ubuntu18.04.4) ... Setting up cups-filters-core-drivers (1.20.2-0ubuntu3.1) ... Setting up libsane1:amd64 (1.0.27-1~experimental3ubuntu2.1) ... Setting up packagekit-tools (1.1.9-1ubuntu2.18.04.5) ... Setting up libedata-book-1.2-25:amd64 (3.28.5-0ubuntu0.18.04.2) ... Setting up ubuntu-minimal (1.417.2) ... Setting up libgnome-desktop-3-17:amd64 (3.28.2-0ubuntu1.5) ... Setting up libglx0:amd64 (1.0.0-2ubuntu2.3) ... Setting up libgs9:amd64 (9.26~dfsg+0-0ubuntu0.18.04.9) ... Setting up cups-client (2.2.7-1ubuntu2.6) ... Setting up sane-utils (1.0.27-1~experimental3ubuntu2.1) ... Setting up libcupscgi1:amd64 (2.2.7-1ubuntu2.6) ... Setting up libegl1-mesa:amd64 (19.0.2-1ubuntu1.1~18.04.2) ... Setting up libgranite5:amd64 (5.2.4+r1403+pkg108~ubuntu5.0.1) ... Setting up gvfs-backends (1.36.1-0ubuntu1.3.3) ... Setting up elementary-minimal (1.466+r530~daily~ubuntu5.0.1) ... Setting up libecal-1.2-19:amd64 (3.28.5-0ubuntu0.18.04.2) ... Setting up gir1.2-gtk-3.0:amd64 (3.22.30-1ubuntu4) ... Setting up cups-browsed (1.20.2-0ubuntu3.1) ... Setting up curl (7.58.0-2ubuntu3.7) ... Setting up libgweather-3-15:amd64 (3.28.2-1~ubuntu18.04.1) ... Setting up libirs160:amd64 (1:9.11.3+dfsg-1ubuntu1.8) ... Setting up gvfs-fuse (1.36.1-0ubuntu1.3.3) ... Setting up libbind9-160:amd64 (1:9.11.3+dfsg-1ubuntu1.8) ... Setting up libevdocument3-4:amd64 (3.28.4-0ubuntu1.2+elementary2~ubuntu5.0.1) ... Setting up cups-ppdc (2.2.7-1ubuntu2.6) ... Setting up ghostscript (9.26~dfsg+0-0ubuntu0.18.04.9) ... Setting up cups-core-drivers (2.2.7-1ubuntu2.6) ... Setting up network-manager-config-connectivity-ubuntu (1.10.6-2ubuntu1.1) ... Setting up cups-bsd (2.2.7-1ubuntu2.6) ... Setting up libedata-cal-1.2-28:amd64 (3.28.5-0ubuntu0.18.04.2) ... Setting up libevview3-3:amd64 (3.28.4-0ubuntu1.2+elementary2~ubuntu5.0.1) ... Setting up switchboard (2.3.6~r935+pkg64~ubuntu5.0.1) ... Setting up libebook-1.2-19:amd64 (3.28.5-0ubuntu0.18.04.2) ... Setting up libgl1:amd64 (1.0.0-2ubuntu2.3) ... Setting up ghostscript-x (9.26~dfsg+0-0ubuntu0.18.04.9) ... Setting up libnoise-core0 (5.0.4+r2721+pkg114~ubuntu5.0.1) ... Setting up browser-plugin-evince (3.28.4-0ubuntu1.2+elementary2~ubuntu5.0.1) ... Setting up evolution-data-server (3.28.5-0ubuntu0.18.04.2) ... Setting up bind9-host (1:9.11.3+dfsg-1ubuntu1.8) ... Setting up evince (3.28.4-0ubuntu1.2+elementary2~ubuntu5.0.1) ... Installing new version of config file /etc/apparmor.d/abstractions/evince ... Installing new version of config file /etc/apparmor.d/usr.bin.evince ... Setting up elementary-desktop (1.466+r530~daily~ubuntu5.0.1) ... Setting up libmutter-2-0:amd64 (3.28.4-0ubuntu18.04.1+elementary4~ubuntu5.0.1) ... Setting up cups-filters (1.20.2-0ubuntu3.1) ... Setting up libwebkit2gtk-4.0-37:amd64 (2.24.2-0ubuntu0.18.04.1) ... Setting up libwebkit2gtk-4.0-37-gtk2:amd64 (2.24.2-0ubuntu0.18.04.1) ... Setting up cups (2.2.7-1ubuntu2.6) ... Updating PPD files for cups ... Updating PPD files for cups-filters ... Updating PPD files for foomatic-db-compressed-ppds ... Updating PPD files for openprinting-ppds ... Updating PPD files for brlaser ... Updating PPD files for c2esp ... Updating PPD files for foo2zjs-common ... Updating PPD files for gutenprint ... Updating PPD files for hpcups ... Updating PPD files for m2300w ... Updating PPD files for postscript-hp ... Updating PPD files for ptouch ... Updating PPD files for pxljr ... Updating PPD files for sag-gdi ... Updating PPD files for splix ... Setting up dnsutils (1:9.11.3+dfsg-1ubuntu1.8) ... Setting up xserver-xorg-core (2:1.19.6-1ubuntu4.3) ... Setting up avahi-daemon (0.7-3.1ubuntu1.2) ... Setting up noise (5.0.4+r2721+pkg114~ubuntu5.0.1) ... Setting up libedataserverui-1.2-2:amd64 (3.28.5-0ubuntu0.18.04.2) ... Setting up capnet-assist (2.2.3+r319+pkg26~ubuntu5.0.1) ... Setting up elementary-standard (1.466+r530~daily~ubuntu5.0.1) ... Setting up libgeoclue-2-0:amd64 (2.4.7-1ubuntu1+elementary3~ubuntu5.0.1) ... Setting up liblvm2cmd2.02:amd64 (2.02.176-4.1ubuntu3.18.04.1) ... Setting up geoclue-2.0 (2.4.7-1ubuntu1+elementary3~ubuntu5.0.1) ... Installing new version of config file /etc/geoclue/geoclue.conf ... Setting up dmeventd (2:1.02.145-4.1ubuntu3.18.04.1) ... dm-event.service is a disabled or a static unit not running, not starting it. Setting up gnome-settings-daemon (3.28.1-0ubuntu1.3+elementary4~ubuntu5.0.1) ... Processing triggers for libc-bin (2.27-3ubuntu1) ... Processing triggers for initramfs-tools (0.130ubuntu3.8) ... update-initramfs: Generating /boot/initrd.img-4.15.0-55-generic Errors were encountered while processing: libplank-common libplank1:amd64 plank It seems they all depend on each other to be installed and I can't seem to figure out how to go about fixing it. The OS is Elementary OS Juno.
This is the source of your problems: dpkg: error processing package libplank-common (--configure): package is in a very bad inconsistent state; you should reinstall it before attempting configuration To reinstall the package, run sudo apt-get install --reinstall libplank-common That might fail, in which case you can try sudo dpkg -i /var/cache/apt/archives/libplank-common*0.11.4+git20190318.fb624c21-0elementary5.0.1*.deb
I get these errors from dpkg-reconfigure, few packages throw errors while processing
1,658,759,967,000
I'm building a .deb package using: dpkg-deb --build package The directory "package" contains another directory called DEBIAN that has the changelog, but the resulting package doesn't have the changelog.Debian.gz in it, and if I check the package using lintian I get following errors: E: msodbcsql: debian-changelog-file-missing W: msodbcsql: unknown-control-file changelog I don't know if relevant but the permissions on the changelog are as follows: -rwxr-xr-x 1 maximk maximk 159 May 10 11:23 changelog Why is the "changelog" considered to be an unknown control file instead of, you know, a changelog?
In a binary package, the changelog isn’t a control file, it’s just part of the package’s payload. With dpkg-deb -b, that means you need to place the changelog in usr/share/doc/${package}/changelog.Debian.gz directly (or .../changelog.gz for a native package). More explicitly, since you’re building your package in the package directory, instead of putting your changelog in package/DEBIAN/changelog, you put it in package/usr/share/doc/package/changelog.Debian.gz, and build your package as before with dpkg-deb -b package. In source packages, the changelog goes in debian/changelog and is processed by dh_installchangelogs.
dpkg-deb build ignores/misinterprets a changelog