date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,399,366,660,000
I am updating my Debian system to a new major release and as Debian is famous for having one of the largest software repositories among Linux distros, I am interested to see what packages have been added since the last release. Currently I am updating from Debian 10 "Buster" to Debian 11 "Bullseye". Is such a list mai...
My goal was to get a sneak peak of what is to come (and to go) in a new Debian release before making any changes to my system. I also wanted to keep the list to a possible minimum, since the changes in Debian releases are incredibly huge. While other posted answers are great, by borrowing from them I came up with the ...
How to find what packages are added in a new Debian release
1,399,366,660,000
I'm running a custom build of Debian buster/sid. I have broken a lot of things seemingly by mistakenly running apt-get dist-upgrade (I think that's what did it). So the desktop manager\desktop environment no longer loads at all and I just get a command-line shell. Aptitude and apt-get are broken as is dpkg. apt update...
As stated by @Stephen Kitt I had encountered this bug in dash which had broken sh (the Bourne shell) as /bin/sh is a symlink to /bin/dash/ in my particular distribution. Running sudo ln -sf bash /bin/sh in order to point sh to bash and then running sudo apt-get update followed by sudo apt-get install --reinstall dash ...
Broken my Debian install: 'sh' not found in PATH
1,399,366,660,000
I have a problem with an uncompleted upgrade on my local Debian install: Operating System: Debian GNU/Linux buster/sid Kernel: Linux 4.12.0-1-686-pae Architecture: x86 I tried to fix it with apt upgrade -f and dpkg --configure lilypond-data but whatever I do, I get the following message: Setting ...
The general approach would be to look at (shell script) /var/lib/dpkg/info/lilypond-data.postinst and find the ln line that's failing. Then determine why, and work around it (e.g., by rming the existing link, or worst case by editing the postinst). And of course then file a bug. Except someone else has already done so...
Problem with lilypond upgrade on Debian "buster/sid"
1,399,366,660,000
I've got a feeling something bad just happened to this machine. faheem@bulldog:/usr/local/src/mercurial$ sudo dpkg -i mercurial_3.0-1_amd64.deb mercurial-common_3.0-1_all.deb dpkg: warning: 'ldconfig' not found in PATH or not executable dpkg: warning: 'start-stop-daemon' not found in PATH or not executable dpkg...
As the 'Note:' at the bottom of your sudo dpkg -i output hints at, this is usually caused by $PATH being set wrong. One way that happens is when you run dpkg -i without root; but that isn't the case here. An easy way to confirm the path is to run sudo -s, which tells sudo to run a shell instead of some other program. ...
What do you do when you try to sudo and root's PATH has gone kerblooey?
1,399,366,660,000
I often use dpkg or aptitude combined with grep when I want to list certain packages available or installed on my system, but I noticed that when I add | grep, the output lines look a little bit different. Here's a pure dpkg output, the first command was typed when the terminal was smaller, the second one when the ter...
It is not grep changing the output. It is dpkg and aptitude. They check whether the output goes to a terminal or to some other command. If it is a terminal they adapt their own output width to match the terminal size. If the output does not go to a terminal, the command has no idea what column size would be appropriat...
Why does grep change the length of output lines?
1,399,366,660,000
So, I ssh into a (very) remote Ubuntu 10.4 server to do some admin and web dev+design. And I was looking through the various package manager options. There's a lot. The big ones are dpkg, apt, apt-get, aptitude, and synaptic. I don’t remember where I got the idea, but I seem to remember that each of these is basical...
You should be fine. Each front end will have its own set of configuration values, but as far as your system goes, the backend (in your case the Debian package system) is going to have the system-wide package database of things that have been installed etc. The information about your system would not be in your home di...
dpkg, apt, synaptic. aptitude: can user customizations cause conflicts?
1,399,366,660,000
I want to build a version of some software that is more recent than the one that is currently available as a stable release Debian package. To do this, however, other than using a more recent version of the source code, I would like to follow, as closely as possible, the build procedure that was used to build the Debi...
The build procedure for a Debian package is described by its source package. If you have a Debian system, you can download that using apt source ${package} if your sources.list contains the appropriate deb-src entries. If you have multiple releases referenced in your repositories, you can specify that you’re after th...
How to get the build procedure for a Debian package?
1,399,366,660,000
I know I can do dpkg --get-selections to see a list of installed packages. However I have a hard drive that doesn't boot but most files appear to be intact. Is there a way I can get the list of packages that were installed off this broken hard drive without figuring out how to boot a system from it? Where does dp...
The answer to your question is that it is stored in the file /var/lib/dpkg/status (at least by default). However, if you have mounted the old system, then it may be possible to run dpkg --get-selections on it directly, using the --root switch. From man dpkg: --root=dir Changing root changes instdir t...
where does apt or dpkg store the list of installed packages?
1,399,366,660,000
These commands: dpkg -i apt-get install apt-get update apt-get remove apt-get dist-upgrade apt-get purge in these distros: Opensuse, Fedora, Gentoo, Arch, Slackware.
Check this page, you will get all details . Fedora/RHEL/CentOS: yum install/remove/search/update package OpenSuse: yast2 --install/--remove <package_name> Or zypper # to print the list of available global options and commands zypper help search # to print help for the search command zypper lp ...
Equivalent of these commands in the following distros [closed]
1,399,366,660,000
I'm used to using dpkg -S /path/to/file to figure out where something came from on Debian. The ~new "everything-in-usr" AKA usrmerge policy often breaks this. For just on example: > dpkg -S /bin/systemd systemd: /bin/systemd > readlink -f /bin/systemd /usr/lib/systemd/systemd > dpkg -S /usr/lib/systemd/systemd dpkg-qu...
I’m not aware of any /usr-merge-aware equivalent to dpkg -S, but there is a way to avoid this problem: dpkg -S doesn’t need a full path, so dpkg -S lib/systemd/systemd and dpkg -S bin/systemd will give you the answer(s) you’re looking for. If you want to avoid listing all files matching the given patterns as substri...
Debian everything-in-usr directory scheme (usrmerge) breaks dpkg -S. Work around?
1,399,366,660,000
I am upgrading the kernel in Debian 9.0 Stretch to kernel to 4.9.0-1-amd64. The package is installed, however, at the end of the procedure I got the cryptic error: device-mapper: reload ioctl on osprober-linux-sda2 failed: Device or resource busy Command failed I also am worried about rebooting it, and it not bootin...
Given GRUB_OS_PROBER_SKIP_LIST apparently not being used (bug?), I had to configure instead GRUB/os-prober for not to scan for the OS in every partition. So it was added to /etc/default/grub the line: GRUB_DISABLE_OS_PROBER=true Now, the commands dpkg-reconfigure linux-image-4.9.0-1-amd64 and update-grub work properl...
Debian: New error message upgrading kernel (to 4.9) - reload ioctl error
1,399,366,660,000
I obtained a strange error message inside a chroot: unknown user 'geoclue' in statoverride file when running apt-get install or apt-get upgrade. I use schroot to enter this chroot. I found that I had a package called geoclue-2.0 installed in the chroot, and I purged it. apt-get purge geoclue-2.0 This made the probl...
In your specific case is because schroot overrides several files, including the /etc/passwd one, which dpkg queries to compare with the statoverride file, it checks that all entries of the statoverride file are in the passwd, and if they are not, issue a warning, which is what is happening. Essentially, it happens whe...
Error message: unknown user 'geoclue' in statoverride file
1,399,366,660,000
When I type dpkg -l | grep xserver-xorg, I get a list of installed packages and their versions: ii xserver-xorg 1:7.7+3~deb7u1 ii xserver-xorg-core 2:1.12.4-6 ii xserver-xorg-input-evdev 1:2.7.0-1+b1 ii xserver-xorg-input-kbd 1:1.6.1-1+b1 ii xserver-xorg-input-mouse 1:1.7.2-3 ii x...
The version numbers in Debian are of the form [epoch:]upstream_version[-debian_revision] where epoch is a single (generally small) unsigned integer, which is included to allow mistakes in the version numbers of older versions of a package. If omitted, the epoch is assumed to be zero. upstream_version is usually t...
Understanding Debian dpkg package version numbers [duplicate]
1,399,366,660,000
e.g. if package specifies Depends: www-browser How does apt/dpkg decide which real package will be installed?
According to this answer on Ask Ubuntu, apt will first try to install any non-virtual packages listed as options instead: Now, according to sources, apt tries first of satisfying the dependency before trying with virtual packages (i.e., if depends are firefox | www-browser, checks if any of the packages are installed...
How does apt/dpkg choose which real package is installed when a virtual package is specified as a dependency?
1,399,366,660,000
I have been running Debian Wheezy for a long time. Today I ran a dpkg upgrade, which has somehow broken things badly. The upgrade aborted, and now apt-get and dpkg are not running. # dpkg dpkg: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory I can downl...
Library files in the standard directories must be registered in a cache for performance. If the upgrade aborted at the wrong time, it's possible that you have library files that are present in the filesystem but not in the cache. Run ldconfig as root to update the cache. To help troubleshoot dynamic library problems, ...
Debian dpkg broken after apt-get upgrade
1,399,366,660,000
I want to list all packages of the form $ dpkg -l libav\* but in addition to this output, I would like the origin/source (I'm not sure of the preferred term) of each package. If the package doesn't correspond to any source, it should say unknown or similar. Off the top of my head, the most promising approach would be...
Dpkg doesn't track this information. Where you got each .deb file is not its concern. Apt doesn't track this information either, but it knows where you can now get the package, which is good enough. As 9000 wrote in a comment, apt-cache policy '^libav' shows you what versions of packages with names matching the regexp...
listing packages in Debian, a la `dpkg -l`, but including the package origin/source
1,399,366,660,000
I've previously added i386 support in order to install wine32 with: sudo dpkg --add-architecture i386 Now I don't need wine32 anymore and removed it, then wanted to remove the i386 architecture again, but it states: sudo dpkg --remove-architecture i386 dpkg: error: cannot remove architecture 'i386' currently in use b...
On a debian amd64 system, the i386 architecture is an optional extra. No i386 packages are required for the system to function. If you are not using any 32-bit programs, you can safely remove all :i386 packages, and the i386 architecture. Personally, I wouldn't bother removing them unless disk space was extremely t...
Added i386 support for wine, removed it now I can't remove the architecture
1,399,366,660,000
I am using Ubuntu 14.04, newly upgraded from 12.04. I was trying to upgrade my software, but it is showing many, many dpkg errors regarding texlive-*. When I type following command: sudo apt-get upgrade I get the following error: Ignoring /etc/texmf/texmf.d/05TeXMF.cnf during generation of texmf.cnf, please remove ma...
This appears to be Ubuntu bug #1236951. See the link for workarounds and the status of a fix.
many many dpkg errors while upgrading
1,399,366,660,000
I have a simple script that applies a patch to a given package, and, since each time said package is upgraded the patch gets overridden, I would really like to automatically apply the patch after every upgrade. To accomplish this, I created a file in /etc/apt/apt.conf.d/ and added a hook for DPkg::Post-Invoke. As docu...
There’s no nice way to do this with apt or dpkg hooks of the style you’re currently using. There might be a simple way of handling such patches on upgrades for the specific package and file you’re modifying, but if you want a generic solution, I think the best approach in Debian currently is to use file triggers. This...
Cleaner way to detect if a particular package was installed in apt-get hook?
1,399,366,660,000
I was trying to build a simple Debian package, I did these steps with user root: First, I downloaded the upstream tarball, then: $ mv hithere-1.0.tar.gz hithere_1.0.orig.tar.gz Then: $ tar xf hithere_1.0.orig.tar.gz After that: $ cd hithere-1.0 $ dch --create -v 1.0-1 --package hithere $ cd debian/ $ rm *.e...
The message is just saying that dpkg-buildpackage command failed. If you read the messages you will notice where's the problem right away: dpkg-source: error: syntax error in hithere-1.0/debian/control at line 15: block lacks the 'Package' field dpkg-buildpackage: error: dpkg-source --before-build hithere-1.0 gave err...
what does "dpkg-buildpackage -rfakeroot -d -us -uc -S failed" mean?
1,399,366,660,000
I am on Linux Mint 19.3 and would like to make the TeamViewer systemd service only run when I launch the GUI app (/opt/teamviewer/tv_bin/script/teamviewer). On Windows, this is fairly easy to do from the Services dialog by selecting the TeamViewer and changing its "Startup Type" from "Automatic" to "Manual". In Linux,...
Usually, the startup of installed daemons is controlled via systemctl [enable|disable] <service_name>. Note, that you can still start your disabled service manually with systemctl start <service_name>. But with Teamviewer it's different. Every time Teamviewer is updated, it overwrites the /etc/systemd/system/teamviewe...
How to make TeamViewer service be on-demand rather than always-on?
1,399,366,660,000
We are hosting a branch of the debian jessie repository with custom, backported and patched packages. Every product release an ISO installer is created from this repo. We now noticed that an upgrade between a release from a couple of months ago to the release of this month fails. The problem occurs thanks to a custom ...
So you have an old custom package which triggers an error when systemd is upgraded due to a bad configuration file. Given the order in which maintainer scripts are executed, the earliest time at which the new version of your package can intervene is the preinst upgrade step, which happens before the new package is unp...
How to influence order of package upgrade (apt-get upgrade/dist-upgrade)
1,399,366,660,000
Having difficulty re-installing Firefox, after an installation to resolve places.sqlite issues. It appears that I'm trapped in circular dependency hell. Need to resolve firefox dependency hell to attempt to resolve Tomcat6 project dependencies (don't ask), ASAP. Have been trying for hours. What I've done (brief) sudo...
Seems like Firefox is trying to do something with /usr/lib/firefox/extensions, which is owned by mint-search-addon. The fact that the directory doesn't exist is not relevant, regarding dependencies. Do you have mint-search-addon installed? Is your system up to date? If both are true, try purging mint-search-addon.
Firefox circular-dependency hell on Linux Mint 13
1,399,366,660,000
I'm running a wheezy:armhf chroot using qemu user emulation on my jessie:x86_64 system. Somehow, a git clone on a particular private repository will hang inside the chroot, while succeed natively. This might be a bug, who knows? To improve my karma, I want to find out what's going on! As a side-note: the hang I'm expe...
Turns out that this particular hang of "git clone" is a qemu-related problem... Other problems in the qemu-user-emulation prevail, so I have to fall back to full-system emulation... ;-( Using a qemu-user-static, compiled from their git (the qemu-2.0.0+dfsg-4+b1 currently in jessie has less fixes and won't work for my ...
Backtrace of "git clone" running inside qemu-user-emulation based arm-chroot
1,399,366,660,000
It is not about the common download & install thing, what apt (aptitude, etc) does, it is a scripted download a package file. I found the dget tool for this task, which works quite well. But, unfortunately, it doesn't have any option to specify a different repository URL as it is given in the /etc/apt/sources.list. Is...
If you're running a reasonably recent version of Debian or other distribution using apt, you can use apt-get for this. Put the following settings in a file called apt-get.conf to make it not use Dir::Etc::main "."; Dir::Etc::Parts "./apt.conf.d"; Dir::Etc::sourcelist "./sources.list"; Dir::Etc::sourceparts "./sources...
How to download packages from a command-line given repository?
1,399,366,660,000
I am trying to remove Dropbox from my computer. So far I have done the following: sudo aptitude remove dropbox sudo aptitude purge dropbox But this didn't get rid of it 100% oshiro@debian:~$ locate dropbox /usr/share/nmap/scripts/broadcast-dropbox-listener.nse /var/cache/apt/archives/dropbox_1.6.1_i386.deb /var/lib/...
You have already completely removed Dropbox from your computer, at least in ways that manifest themselves by a file whose name contains dropbox. You may have other traces of your use of Dropbox remaining, for example in your browser history. When it comes to file names, check Dropbox as well (locate -i dropbox will do...
How to remove Dropbox
1,399,366,660,000
So, for now, let's say we only need this to work for debian-based systems (but I will need to be able to do it for yum in the future). The best I have right now is dpkg-query. So, for example, if I run this: dpkg-query --show I'll get a list like this (with a few thousand entries): ... sudo 1.8.17p1-2 ... v...
This will list the source packages and versions corresponding to the installed binary packages: dpkg-query --show -f '${source:Package} ${source:Version}\n' | sort -u This is the closest match to individual pieces of software you can get automatically: you'll only see gcc-4.9 once, with the associated version, instea...
What's the most robust way to list installed software in debian based distros?
1,399,366,660,000
Given a random .DEB file, how do we check if installation will be successfully completed without actually installation on device? Please see the following snippet: root@VirtualBox:/Folder# dpkg -i mysql-workbench_6.2.3+dfsg-7_armhf.deb Selecting previously unselected package mysql-workbench. (Reading database ... 489...
To determine whether a package can be installed without needing other dependencies to be installed too, your best bet is to use the “simulate” mode with apt: apt -s install ./mysql-workbench_6.2.3+dfsg-7_armhf.deb (note the ./ which is significant). This will output the dpkg operations which would be performed by the...
dpkg --dry-run option is not simulating installation properly
1,399,366,660,000
I am trying to understand how APT works, and here is where I got stuck - who determines what packages are installed, on day-one? It seems that one of the rules is, based on the current snapshot of the system, apt upgrade will install up to the Recommended dependencies of the installed packages. So, from a minimum set ...
See Is there any "base" Debian metapackage? It’s embedded in the Debian installer and the tools it uses (tasksel in particular). The installer installs the essential packages and their dependencies, and tasksel installs the standard-priority packages if the corresponding task is selected. See Is there a command tha...
Debian default installation package list?
1,399,366,660,000
I'm trying to recover from a faulty installation, and want to remove some packages. But I can't. # apt autoremove offending-package dpkg: warning: 'start-stop-daemon' not found in PATH or not executable (My PATH is fine.) According to packages.debian.org, start-stop-daemon should be in /sbin/. It isn't there! What s...
Another way to do this is first create a dummy /usr/local/sbin/start-stop-daemon that does nothing:#!/bin/sh exec true then simply reinstall the dpkg package:aptitude reinstall dpkg then (of course) remove the dummy /usr/local/sbin/start-stop-daemon. Installing the dpkg package does not in fact require start-stop-daem...
Debian Stretch - where did start-stop-daemon go, and how do I get it back?
1,399,366,660,000
All logs of dpkg are saved at /var/log/dpkg . The thing is if you are on Debian testing or/and Unstable/Sid the churn of packages are going to be much more than in a stable release. Now while in a stable release the churn is not so much and 7-8 log files should be in a position to serve . But in testing this simply pr...
You edit the file /etc/logrotate.d/dpkg, there should be a section there similar to this : /var/log/dpkg.log { monthly rotate 12 compress delaycompress missingok notifempty create 644 root root } You change the rotate 12 to rotate 24 to keep 2 years of logs, or ...
Is there a way to have past logs for 1-2 years in dpkg?
1,399,366,660,000
I've been trying to install Percona Toolkit onto my Debian (wheezy) server. I downloaded it as per the instructions: wget percona.com/get/percona-toolkit.deb then installed it sudo dpkg -i percona-toolkit.deb But it told me there were missing dependencies that weren't installed, and wouldn't be installed. I have been ...
First try installing by which will fail. dpkg -i percona-toolkit.deb Then do following to install and fix the missing dependencies. apt-get install --fix-missing -f Then try again to install the .deb package dpkg -i percona-toolkit.deb
Debian - get all dependencies updated when they 'wont be installed'
1,399,366,660,000
I'm "upgrading" to a new distro (from Linux Mint 15 -> 16) by performing a fresh installation to a new drive, and referencing my original drive as needed. I've currently booted to my new installation (Linux Mint 16), and I've mounted my original drive (Linux Mint 15), so I can access all the raw data just fine. It'd b...
Assume you mean with non-running that it is attached and running, but was not booted, and mounted on /mnt/old: dpkg --root=/mnt/old --get-selections should work. You can also boot the old partitions once and redirect the output of dpkg --get-selections to a file ones and read from that.
is it possible to determine installed packages on a secondary mounted drive?
1,399,366,660,000
My Linux Mint 15 broke and there seems to be no way to fix it. I cannot boot it so I haven't got access to the terminal. What I'm going to do is make a backup of /home with a flash disk running Mint (done that) and reinstall Mint -> restoring /home, but I'd like to get a list of installed programs so I can reinstall t...
/var/log/dpkg.log* You could also just mount the parition that contains root (/) and copy the files /var/log/dpkg.log*. These files will contain all the applications that were installed on your system. Just grep through the files looking for the word "installed": $ grep " installed" dpkg.log*|tail -5 dpkg.log.1:2013-0...
List of installed programs without running a program in the system
1,363,800,322,000
(similar to the question Uninstalling default VBoxGuestAdditions on Debian but a Ubuntu install, and the solution there isn't working for me?) and really the issue seems to be with dpkg/apt-get not virtualbox or its linux guest additions: host:/media/VBOXADDITIONS_4.2.10_84104$ dpkg -l | grep virtualbox rc virtualbox...
rc virtualbox-guest-utils 4.1.12-dfsg-2ubuntu0.2 The first two flags in this output tell you exactly what is going on: The 'r' means the package is in remove state. It's still technically installed, but most of it is actually gone. The 'c' means that the configuration files are still installed. Read...
dpkg sees them, but apt-get can't remove them?
1,363,800,322,000
I had put up a query before, and then wanted to put leafpad in editor list but wasn't able. [$] sudo update-alternatives --set editor /usr/bin/leafpad update-alternatives: error: alternative /usr/bin/leafpad for editor not registered; not setting ...
The syntax is usually update-alternatives --install link name path priority (plus a few optional arguments that I omitted). So you could do like this: update-alternatives --install /usr/bin/editor editor /usr/bin/leafpad 0 Then you can re-run that same command and choose leafpad to be your editor. In my example I ...
Putting a new/graphical editor in editor list
1,363,800,322,000
I recently ran a command to install a package on Ubuntu 16.04 with apt-get % sudo apt-get install <package> apt-get was unable to install, it printed some status messages, with the last line being: [ output truncated... ] E: Unable to correct problems, you have held broken packages. I understand that apt and dpkg ha...
That message indicates that apt didn't changed anything and the broken packages it tried to solve were kept in the same state. In this case "held" is used as "keep". If I had to reword it it would say: Unable to correct the problems, packages are left unchanged.
What does the apt-get message "held broken packages" mean?
1,363,800,322,000
From man dpkg (1.16.16 (i386) on a Debian (7) based Linux Distro): --status-fd n Send machine-readable package status and progress information to file descriptor n I read this as: "forward machine readable code, such as with generated through printf to a file descriptor". I (think) to know the fil...
The option --status-fd tells dpkg to report the progress in a way that other programs can parse, for example to present nice progress reports to the user in a GUI. The argument to --status-fd is a file descriptor, i.e. number that designates an open file. Simplifying things a bit: When a process opens a file for the ...
understanding "dpkg --status-fd n"
1,363,800,322,000
When I remove packages from my system with APT-based programs, they often leave behind some kind of residue (referred to as "residual config") that seems to serve no purpose other than annoying me. Cleaning these is normally quite trivial: just purge them in Synaptic or run aptitude purge '?config-files'. Some package...
Okay, I was able to find my own solution (ironically) because Gilles wasn't explaining himself properly and making me research his cryptic comments. Step 1: use dpkg -L $package or Synaptic's Properties dialog to find the file that didn't get purged with the rest of the package. I don't know why a file might not be pu...
How do I remove persistent config data from APT?
1,363,800,322,000
I am testing out the build of a .deb package on different distributions using test-kitchen. The built .deb file installs the command to /usr/bin fine on both Debian and Ubuntu. My problem is that the man pages don't get installed on Ubuntu. The contents of the built .deb file on Ubuntu is: kitchen@ceddd8d3564c:/opt/w...
Your dpkg configuration on your Ubuntu system, namely the path-exclude=/usr/share/man/* directive in /etc/dpkg/dpkg.cfg.d/excludes, instructs dpkg to not install manpages. If you do want to install manpages, remove the corresponding line and install the package again.
manual pages of built .deb install on Debian but not Ubuntu
1,363,800,322,000
I am creating a .deb package that needs a MySQL database. I am building the package using dpkg-deb --build. While installing I want my post install script to execute an SQL script to set up the database like so: cat setup.sql | mysql -u root -p I am currently putting setup.sql into the "DEBIAN" folder of my package. ...
You can’t easily (if at all) access files you add to DEBIAN in a package built with dpkg-deb -b — those files end up in the control information area of the binary package, they aren’t installed as such (in fact, I’m not sure non-standard files are even included in the package; standard files end up in /var/lib/dpkg/in...
Where do temporary files go while installing a .deb package?
1,363,800,322,000
I have Debian Jessie (amd64 with i386 multiarch) installed on my system. But there are some packages not available for installation, although they should. I am trying to install mysql-client, but I get this error: $ apt-get install mysql-client Reading package lists... Done Building dependency tree Reading stat...
[Note: the solution was discovered in the Update 2 data, and explained at the bottom, apt pinning.] Diagnosing this issue requires determining where the failure is happening. First, try this, it appears that something is wrong in terms of your sources, so just replace them with these, then debug backwards once you hav...
Why are some packages not available in my Debian Jessie installation?
1,363,800,322,000
If I mark a package as hold with echo "xyz hold" | sudo dpkg --set-selections and afterwards explicitly use apt upgrade xyz=1.2.3 the package is marked as install in dpkg --get-selections. Is there any way to "permanently" mark a package as hold? - I want to update it, but always manually and never as part of another ...
I don’t think there’s a way to do this with package holds; but there is a different way of preventing upgrades: you can pin a package with priority -1. Create a file in /etc/apt/preferences.d containing Package: xyz Pin: version * Pin-Priority: -1 xyz will then never be a candidate for upgrades, unless a specific...
Upgrading a package marked as hold, marks it as install in dpkg --get-selections
1,363,800,322,000
Through updating debian OS on various hosts (apt-get dist-upgrade), I've seen many often small variations of the same screen; when a configuration file has been modified, it will tell you a new version is available, and ask you to fix the problem: you've modified the file and apt/dpkg cannot reliably integrate your ch...
I’ll address the “user-facing” concerns in your question first: 'do a 3-way merge' is availble This can’t be controlled by users, it depends on how the package manages its configuration files (see below). The new files are always renamed/placed in a consistent way? No, but it shouldn’t matter in practice. In parti...
What is the motivation or cause behind inconsistent configuration file modification screens?
1,363,800,322,000
The man page isn't clear on that. How would I use a signing hook? Especially using the parameter without the config file. What is the meaning of foo in the documentation? For example in --signing-hook-foo? Do I replace foo with my bash script? The would seem very odd and against all conventions that I know. For exampl...
Well spotted, the manpage is incorrect. debuild --help shows the appropriate syntax: --dpkg-buildpackage-hook=HOOK --clean-hook=HOOK --dpkg-source-hook=HOOK --build-hook=HOOK --binary-hook=HOOK --dpkg-genchanges-hook=HOOK --final-clean-hook=HOOK --lintian-hook=HOOK --signing-hook=HO...
How to use debuild hooks (--signing-hook-foo etc)
1,363,800,322,000
I have VPS instances from three different providers, and those from two providers will prompt for a restart of affected services when running apt-get upgrade. VPS instances from one provider do NOT prompt during the upgrade, which then requires me to go and restart services afterwards manually. I've seen mention of th...
The needrestart package will implement what you are describing once installed.
How to make Debian prompt before restarting services after package upgrades?
1,363,800,322,000
I am on kali linux and when I run apt-get update it returns this: W: Unknown flag value: yes W: You may want to run apt-get update to correct these problems after running apt-get update several times it's still the same issue
I think there is something wrong with the: deb http://repo.kali.org/kali kali-bleeding-edge main I think you should wait for kali.org to fix it.
apt-get returns strange error
1,363,800,322,000
I've had to download and install a version of a library from its source code repository. The problem is is that other packages from the Kubuntu package manager require this library to be installed. Right now I'm working with ffmpeg, but I've had to do it before (e.g. OpenCV) and I'm looking into the best way of doing ...
Well, for one thing, Provides: does not work with dependencies that specify a version. From the Debian Policy Manual, "Virtual packages - Provides": If a relationship field has a version number attached, only real packages will be considered [...]. In other words, if a version number is specified, this is a request t...
Replacing Multiple Debian Packages from Compiled Source
1,363,800,322,000
So, I recently acquired a brand new Nokia N900 phone off of an online auction site for a fairly reasonable price. The N900 is a Linux phone, and it came out a long time ago, but it's only just now within my budget. I've spent the past day struggling with it. Its version of apt is particularly frustrating. The point I'...
You could modify the .deb file by hand, and then install it as if were the original one. You could take a look to the official reference The steps I did in some moment in the past, could be summarized as: Create a working directory: mkdir work cd work Make sure that a copy of the .deb file is in that directory. Deco...
Install a .deb completely 'by hand'
1,363,800,322,000
I'm trying to port some scripts from Ubuntu to Centos6 (for docker) Now I'm having trouble trying to replicate this in Centos (which I am not very familiar with) dpkg-divert --local --rename --add /sbin/initctl
There is no equivalent tool to this in RPM packaging that I've ever seen. You control where files get installed via the .spec file. The only thing you can do at install time is override the prefix. $ sudo rpm --prefix=/home/dir/ some.rpm
RPM alternative to dpkg-divert
1,363,800,322,000
I'm trying to limit the risk in using third-party APT repositories. The scenario I'm trying to protect against is a malicious package being introduced into a third-party repo with a newer version than the version I have installed from Debian. Lately whenever I've added a new APT source, I've used APT pinning to make o...
Seems aptitude is dumb... for the logic you want. A workaround is to resort to Python: import apt CACHE = apt.Cache() for pkg in CACHE: if not pkg.installed: continue for orig in pkg.candidate.origins if pkg.candidate else []: if len(orig.site) == 0: continue print(pkg, pk...
How can I list all installed packages along with their APT origin hostnames (not their origin tags)?
1,363,800,322,000
I'm trying to install packages to get a webcam stream running on my raspberry pi. All of a sudden, apt-get is totally busted -- every time I try to install, reinstall or purge something that might fix the problem, I get the following error: dpkg: unrecoverable fatal error, aborting: files list for package 'gnome-the...
The files list for that package is stored in /var/lib/dpkg/info/gnome-themes-standard-data.list; it is quite surprising this is anything other than a normal file. I'd suggest ls -l or stat on it, to figure out what it is. If you can explain why its something other than a plain file (say, you symlink'd it somewhere), t...
apt-get won't install: dpkg: files list for package 'gnome-themes-standard-data' is not a regular file
1,363,800,322,000
What is the standard way to share code between the dpkg scripts (preinst, postinst, prerm, postrm)? I can see how to share code between just postinst and prerm (by installing it as part of the package), but can't see any way to share with preinst and postrm.
I'm pretty sure there's nothing to be done. You can rely on a Pre-Depend:, but these are to be avoided unless absolutely necessary, as they're a heavy burden on the dependency chain. You can pre-process the scripts, if there's code to be shared. The debhelper tools already do this, inserting boilerplate into the vario...
Sharing code between dpkg scripts
1,363,800,322,000
I'm making a very basic Debian repo for a client. Started with a bash script, but decided a Makefile would eliminate duplicated work. I've hammered out a working Makefile, but it works only if I make all. For some reason, a straight make only builds the first deb. make clean does nothing. What am I doing wrong? MFGR:=...
Your question contains its own answer.  By default, make processes only the first entry in the Makefile.  You need to put the "all" entry first.
Makefile for a simple Debian Repo
1,363,800,322,000
I am trying to write a non-interactive system update script. Question: if the following works well: yes | dpkg --configure -a will the following work also very well?: yes | apt-get install --fix-broken
You have -y or --yes or --assume-yes parameters in apt-get. Try something like sudo apt-get install -y <package-name> Details: The manual page of apt-get (You can also refer to manual page with man apt-get command) mentions: -y, --yes, --assume-yes Automatic yes to prompts. Assume "yes" as answer to all prompts and ...
yes | apt-get install --fix-broken
1,363,800,322,000
I asked this question. While I got the answer (and am beating myself why didn't I try to pipe the output via cat or cat -n as shared by Stephen). Is there a way to make an alias or something so that whenever I run $ dpkg -L $PACKAGENAME I get the listing with line numbers, is that possible?
The alias part: alias dpkgnum='function __dpkgnum { dpkg -L $1 | nl;};__dpkgnum' As noted on comments, including just the function in .bashrc or .bash_aliases file, without alias will also work. function dpkgnum { dpkg -L $1 | nl;} #call it by terminal $: dpkgnum pkgname In this case the function will not be visi...
How to tack to dpkg -L output with line numbers?
1,363,800,322,000
I'm currently trying to get some info about the installed pakages und systems that use dpkg. So I tried to use dpkg-query. Most placeholders work fine and I get what I need, however I noticed that the placeholders Filename, MD5sum and Size are always empty. Simple command to see the issue: dpkg-query -W -f '"location"...
As mentioned in the manpage, these fields are “internal, front-end related”. In fact they’re only used in dselect. This means you can’t rely on them in dpkg-query, by default. They correspond to values stored in the “available” database, /var/lib/dpkg/available; dpkg-query by default only considers /var/lib/dpkg/statu...
dpkg-query placeholders "Filename", "MD5sum" and "Size" are always empty
1,363,800,322,000
I just installed the latest Debian version (8.4) on a virtual machine, and everything went fine. I then installed nginx server from the Debian repos and I got version 1.6.2, while the latest version available is 1.10, so I'd like to update it. The way I tried to do it is maybe wrong but it's all I've found so far. I f...
The basic error is this (emphasis mine): dpkg: error processing archive /var/cache/apt/archives/nginx_1.10.0-1~jessie_i386.deb (--unpack): trying to overwrite '/etc/default/nginx', which is also in package nginx-common 1.6.2-5+deb8u1 This means that the new package you are installing is trying to overwrite a file pr...
Updating Nginx server to 1.10 on Debian 8.4
1,363,800,322,000
According to man dpkg I can use DPKG_HOOK_ACTION to get the current dpkg action being run in my dpkg hook script --pre-invoke=command --post-invoke=command Set an invoke hook command to be run via “sh -c” before or after the dpkg run for the unpack, configure, install, triggers-only, remove and purge dpkg ac...
This only applies to commands specified by the --pre-invoke and --post-invoke options, not when the commands are set in the configuration. This can be demonstrated by putting your echo command into a script: # cat > /tmp/pre-invoke.sh <<'EOF' #!/bin/sh echo This is testhook. Current action is $DPKG_HOOK_ACTION; exit 0...
Dpkg env variable DPKG_HOOK_ACTION is not set in hook script
1,363,800,322,000
In Kubuntu 17.10 I had SafeQ client installed for printing management. I needed to install two deb packages, libcrafter_0.0.2_all.deb and ysoft-client_4.0-87_all.deb from here. However, now in Kubuntu 18.04 I can't install those two packages. For libcrafter_0.0.2_all.deb if I do sudo dpkg -i libcrafter_0.0.2_all.deb ...
Unfortunately the libcrafter package wasn’t built correctly: its version is given as “0.0.2-”, which isn’t an acceptable version number in Debian (as specified in the relevant section of Debian policy). Older versions of dpkg accepted such version numbers, but that was fixed in version 1.18.19 (and I’m surprised you w...
Can't install a package with 'revision number is empty' message
1,363,800,322,000
I'm trying to install openssh server on a router and need a MIPS compiled binary. I've downloaded the one from here but encounter an error upon extraction: $ sudo dpkg --unpack openssh-server_6.0p1-4+deb7u2_mips.deb dpkg: error processing openssh-server_6.0p1-4+deb7u2_mips.deb (--unpack): package architecture (mips)...
I've found the answer: dpkg -x openssh-server_6.0p1-4+deb7u2_mips.deb openssh_mips_outdir
Unpacking a .deb file containing a MIPS binary
1,363,800,322,000
I have a .deb file and its SHA1 checksum information. How do I check the .deb file's authenticity using this checksum before installing? There's many entries on Google for "how to verify checksums for installed packages" which is mind-boggingly useless yet none for checking BEFORE installing. Bonus points if you can e...
To check whether your package matches the SHA1 sum you have, run sha1sum /path/to/package.deb and compare the output. If you have the sum in a file of the form sum package.deb you can run sha1sum -c shafile to check the sum directly. To determine the authenticity of the package, you’ll need to determine the authent...
SHA1 verification of external deb package before install
1,363,800,322,000
I am building a script to automatically deploy a .net core worker service app as systemd service unit/daemon. I wanted to double check: using solely dpkg, there is no other way to upgrade/update a package other than removing it first and then installing - is this correct ? I read that dpkg -i will upgrade the package ...
dpkg -i will upgrade a package if it’s already installed, no need to remove it first. The package is checked using the metadata it contains (e.g. the package name as shown by dpkg -l after installation), not the file name.
Upgrading/Updating package using dpkg only
1,363,800,322,000
Package version 1.14.2-2+deb10u1 is installed and 1.14.2-2+deb10u1 is the latest version in the repository at time of writing. dpkg -l | grep nginx-extras ii nginx-extras 1.14.2-2+deb10u1 amd64 nginx web/proxy server (extended version) apt update apt dist-up...
This happens because your installed package doesn’t match the packages available from the repositories, even though they have the same versions. (As A.B figured out, this appears to be based on the installed size of the package: if the installed package’s version is identical to that available from the repositories, b...
Why APT wants to upgrade already up to date package?
1,363,800,322,000
I am packaging my first debian project, and I have things 100% worked out with gnu-make (anything is possible here, for me, and so my difficulties right now are exclusively in navigating the dpkg/debuild system). I have, right now, just some dummy compilations in place with the following rules file and compatibility:...
If you want to ship symlinks in your package, I would recommend using dh_link. The easiest way to do that is to list the symlinks you want in debian/links (or debian/package.links if your source package builds multiple binary packages): opt/package/bin/foo usr/bin/foo opt/package/bin/bar usr/bin/bar Debian packages a...
Dpkg Debuild dh_helper: How to symlink binaries installed in /opt/package to /usr/local/bin?
1,363,800,322,000
I recently ran into the following situation: I could not boot my computer normally. (I was shown a blinking cursor after the boot-loader and Ubunutu load screen but before the login page while never reaching the login page.) I was able to enter recovery mode. If I fully continued the boot, I could get to a terminal...
This feature is provided by the friendly recovery menu, and in particular its dpkg plugin (which adds a menu entry titled “Repair broken packages”, translated appropriately in whatever language the user configured the system to use). This plugin uses two different approaches to repair broken packages: if dist-upgrade...
What command is run when the dpkg option is selected in recovery mode?
1,363,800,322,000
For some reason I'm getting a weird error when trying to install libpng12-0 from a .deb file. Command: dpkg -i libpng12-0_1.2.50-2+deb8u3_amd64.deb; apt-get install -f Error: Setting up apache2 (2.4.25-3+deb9u2) ... info: Executing deferred 'a2enconf apache2-doc' for package apache2-doc ERROR: Conf apache2-doc does ...
Purge and reinstall package, maybe the installation was corrupt. apt-get purge apache2-doc apt-get install apache2-doc dpkg -i libpng12-0_1.2.50-2+deb8u3_amd64.deb; apt-get install -f
ERROR: Conf apache2-doc does not exist! When installing libpng12-0
1,435,234,766,000
This question explains how to find out if a given Debian package has been installed, but it does not take into account "synonyms" when installing via apt-get. For instance, if I try apt-get install libncurses-dev, apt-get replies: Note, selecting 'libncurses5-dev' instead of 'libncurses-dev' And then it installs that...
If you want to write a script to check to see if package libncurses-dev or its alias has been installed, consider the following program flow: Check if the package has been installed with dpkg using the exact name, libncurses-dev in this case. If the above does not evaluate to true, then search apt for the package you...
apt - checking if a similar package has been installed
1,435,234,766,000
I followed an online article to remove my Apache from my system. I removed Apache through these commands sudo apt-get purge apache2 apache2-utils sudo rm -rf /etc/apache2-bin sudo apt-get autoremove Then in the article they mentioned to remove the files and directories of the results of whereis apache2. After runnin...
To recover /usr/share/apache2/default-site/index.html you need to re-install apache2-data. Given your current situation, try sudo apt-get purge apache2-data sudo apt-get install apache2 Presumably your system ended up in that state because apt-get autoremove didn't uninstall apache2-data, but your rm -rf removed the ...
Error while installing Apache; error is "E: Sub-process /usr/bin/dpkg returned an error code (1)"
1,435,234,766,000
I am trying to remove fglrx-driver as part of an upgrade from wheezy to jessie. Running apt-get dist-upgrade failed with the following message: fglrx-driver ... dpkg: error processing fglrx-driver (--remove): subprocess installed post-removal script returned error exit status 20 Errors were encountered while process...
Deleted /etc/X11/xorg.conf, restarted in recovery mode and then it worked.
How do I remove a driver when apt-get remove fails?
1,435,234,766,000
I sometimes download .deb packages from the internet and install them with dpkg -i package.deb If the packages have unmet dependencies. How can I install the dependencies automatically (similar to apt-get install package, and mark these dependencies as installed automatically instead of manually.
The usual way to handle this is to just do #dpkg -i packagename and then resolve the dependencies after the event by doing #apt-get -f install If the dependencies cannot be satisfied, apt will normally remove the package for you. Of course, if it doesn't you can do so yourself. This procedure should not mark the pac...
Install downloaded packages with dependencies
1,435,234,766,000
I am logged in as a user on an CentOS version 6.9 HPC. When I try the ls command, I get: /usr/local/bin/ls: line 96: dpkg: command not found Abort, this script is only intended for Ubuntu-like distros When I open the corresponding ls file, line 96 has the line: # (internal) The architecture of the local system arch=...
From the question text, it is evident that the ls command is picked up from the /usr/local/bin directory, which means that this directory is found earlier in the PATH variable's value than e.g. /usr/bin and /bin. Changing the ordering of the variable's value in your shell's startup files, possibly by prepend /bin and ...
CentOS ls uses dpkg
1,435,234,766,000
I'm trying to get a list of packages installed which come from my company's private apt repository. This works: #!/bin/bash fqdn=$1 for pkg in $(dpkg-query --show | awk '{print $1;}'); do if apt-cache showpkg $pkg | grep -q $fqdn; then echo $pkg fi done But running it on a system with ~3466 (dpkg -l | wc -l)...
Don’t loop over the packages: dpkg -l | awk '/^ii/ { print $2 }' | xargs apt-cache showpkg | awk "/^Package:/ { package = \$2 } /$1/ { print package }" | uniq This takes a couple of seconds on my system, with over 6,000 installed packages, and doesn’t involve using /var/lib/apt directly. There are a few limitations, ...
apt: Query installed packages from a specific source
1,435,234,766,000
I have found that using sudo apt install ./<package_name_here>.deb fails with E: Failed to fetch file:<path_to_package>/<package_name_here>.deb File not found - <path_to_package>/<package_name_here>.deb (13: Permission denied) when a containing directory of ./<package_name_here>.deb has permissions set to 700. Howev...
Since version 1.1, apt uses an unprivileged user (_apt) to download packages. This includes local package retrieval, unless (in theory) the package isn’t world-readable; there have been bugs with this in the past (see #805069), this could be a variant... You can disable this by setting APT::Sandbox::User to root: apt ...
Why are directory permissions preventing "sudo apt install" using a file?
1,435,234,766,000
I am looking to automate some package installations via bash script; they will be installed to a pre-existing chroot'd filesystem. Some of the packages however involve interactive user input (i.e. ddclient asks to select a dynamic DNS service provider), which I haven't been able to automate as easily. debconf preseed...
Short of using a “proper” deployment and configuration management tool such as Ansible or Salt, debconf preseeding can be perfectly sufficient for pre-configuring Debian packages. It’s not at all limited to full blown installations; it can be applied to any number of packages. The simplest way to get started with it i...
Automating the installation of individual debian 8 packages with interactive prompts
1,435,234,766,000
I have a fresh install of Raspbian on a raspberry pi 3. It boots fine, and I am able to perform any function that I can think of with one exception: any attempt to install or remove a package results in the error "Files list file for package 'qdbus' is missing final newline". Indeed the file at /var/lib/dpkg/info/qdbu...
I have encountered same problem. And I solved this by downgrading raspbian jessie. http://downloads.raspberrypi.org/raspbian/images/raspbian-2017-06-23/ Remove your current version probably raspbian-2017-07-05/ and downgrade to raspbian-2017-06-23/. It will require a lot more time to update and upgrade packages but wo...
Files list file for package 'qdbus' is missing final newline (Raspbian)
1,435,234,766,000
I want to install openssh-server on my server, but it shows me : apt-get install openssh-server Reading package lists... Done Building dependency tree Reading state information... Done openssh-server is already the newest version. You might want to run 'apt-get -f install' to correct these: The following packag...
You may want to try purging the installation and cleaning up apt a bit. Try: sudo apt-get remove openssh-server openssh-client --purge && sudo apt-get autoremove && sudo apt-get autoclean && sudo apt-get update If you don't have any reason not to upgrade packages then also try: sudo apt-get dist-upgrade You can then t...
How to install openssh-server on my server?
1,435,234,766,000
I want to script a test for a debian package being installed. Searching using dpkg-query, will return an error if no packages match. But if I want to detect that specifically, and abort on any other errors (e.g. resource exhaustion), I don't know how to do that.
dpkg-query is quite simple, you can quickly skim the manpage and find it has no option to implement this directly. So dpkg-query -W -f '${Package} ${State}\n' | grep "^my-package .* installed" The problem then reduces to catching error codes in a pipeline. Apparently strict error handling in Unix shell gets awkward...
Script a test for installed debian package - error handling?
1,435,234,766,000
[Reposted from askubuntu.com] I can't install any software. I think this dates from an unexpected power loss a few days ago. When I try sudo apt-get install gparted I see Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed ...
It is a well-known problem, probably a dpkg or some installscript bug. /var/lib/dpkg/triggers/File contain a list of files and triggers (in the installscript) to use with. This file should be a simple text file, without any duplicated entries. Edit it with a text editor, and check. If there are duplicates, fix them (m...
dpkg: error: duplicate file trigger interest for filename `/usr/lib/gio/modules' and package `libglib2.0-0'
1,435,234,766,000
I've deleted a file in /etc provided by package packageA. Is there a way that I can reinstall only that file, provided I know where it is and which package provides it? I'm running Ubuntu 12.04 and 14.04 on my servers.
First, you can find out which package provides the file: dpkg -S /path/to/file Then you can download the current version of the package. apt-get download package-name If for some reason you need the version of the package that you'd initially installed, you'll have to look it up in the APT logs in /var/log/apt/ or /...
Get package version of file
1,435,234,766,000
I would like to install .deb file via dpkg in Arch Linux. This .deb file needs many dependencies. I don't want to install dependencies one by one manually. How do I force dpkg to install all dependencies?
Unfortunately there's no way to have dpkg automatically install dependencies - it just doesn't support that. There are other tools on Debian/Ubuntu systems to do that (eg, apt-get, aptitude, gdebi) - are any of those available for Arch? If so, you'd be better off using one of those. Alternatively, if you have access t...
How to force `dpkg` to install dependencies [closed]
1,435,234,766,000
I'm building an embedded system based on debian 7, and I'd like to make the most out of busybox that comes with debian. The problem is default busybox build in debian seems quite minimal, for example it does not even include passwd. On the other hand I don't want to build busybox from busybox.net sources for stability...
If you need a .deb customized on the fly mkdir /tmp/bb cd /tmp/bb apt-get source busybox sudo apt-get build-dep busybox cd busybox-1.20.0/ fakeroot debian/rules build make -C debian/build/deb/ menuconfig # enable passwd fakeroot debian/rules binary but probably the best would be to add a custom package inside debian/...
How to custom build debian's busybox?
1,435,234,766,000
I'm doing unattended / non-interactive package installations via DEBIAN_FRONTEND=noninteractive apt-get install -y my_package This works as attended in most cases, but still gives me an interactive prompt if there is config file conflict, e.g. something like this: Configuration file '/etc/foo' ==> Modified (by you o...
I haven’t checked this in your scenario, but dpkg should abort if it needs to ask for information and can’t read from its standard input; so DEBIAN_FRONTEND=noninteractive apt-get install -y my_package < /dev/null should abort with an error if there’s a configuration file conflict. If that doesn’t work, you can alway...
Force non-interactive `apt-get install` to fail on config file conflict
1,435,234,766,000
I'm currently building a large project that contains sources written in few languages such as C,C++ & Python. I recently managed to (painfuly) handle autotools to make a proper install. Next step is to create .deb because our project is meant to run on debian stretch. I tried several ways to do this but i can't get it...
Downloading things from the internet is something a Debian package build is not supposed to be doing. If you use some 'build in clean chroot' helper, it may not even be able to do so. However, plain dpkg-buildpackage should be able to do so. If your autotools build system does the right thing, then nothing should be n...
Problems packing a .deb from autotools. (checkinstall, debhelper, ...)
1,435,234,766,000
When I'm trying to use apt-get install or upgrade I get that message! I tried this command sudo dpkg -C and got this results: The following packages are missing the list control file in the database, they need to be reinstalled: liba52-0.7.4 library for decoding ATSC A/52 streams dpkg: error: unable to check ...
You've experienced (at least) a bad block on your disk. Unfortunately, it hit an XFS data structure, so you've lost some filesystem metadata. I hope you have backups. Check smartctl Hopefully you have smartctl installed (it needs to run as root, e.g., via sudo). If installed, it should give output like this: ID# ATTRI...
How fix E: Sub-process /usr/bin/dpkg returned an error code (2)?
1,435,234,766,000
Sometimes it seems useful to shift package's directories around between tmpfs / flash memory or ssd / hard disk. To manage flash lifetime, disk spin-up, or just free space. If you replace a directory used by a package with a symlink, will the package manager not become confused at times? E.g. consider debsums... Wou...
dpkg is apparently intended to support this. On the other hand, I believe systemd generally does not consider supporting symlinks like this. E.g. I am now seeing a warning on boot, when /var/log is a symlink: systemd-tmpfiles[432]: "/var/log" already exists and is not a directory. This is due to /usr/lib/tmpfiles.d/...
Use symlink to move directory created by .deb package - will anything break?
1,435,234,766,000
I have been running a rolling release distro for a couple of years now and switched from LXDE to GNOME to KDE over the years. As you can imagine over the time a lot of configuration files have been touched and lately the system has just gotten a bunch of small hiccups. GTK themes that have been configured years ago bu...
You should take a look at apt-get install --reinstalland specify --force-confmiss as option - but this only reinstalls missing config files. apt-get --purge before will remove those config files. Explained here: https://askubuntu.com/a/67028/329633 and here: http://www.microkwen.com/2008/09/16/force-apt-get-to-reins...
Restore original configuration for every package in system
1,435,234,766,000
I'm connected via SSH to a PC running Linux kernel 3.11.1: root@alix:~# uname -r 3.11.1 how can I find out which package installed this specific file or kernel version respectively? I tried root@alix:/boot# dpkg -S vmlinuz-3.11.1 dpkg-query: no path found matching pattern *vmlinuz-3.11.1* Other installed kernel ver...
You can list every installed package with dpkg -l and filter through the results with grep for the kernel packages dpkg -l | grep 'linux-image' dpkg -l | grep 'linux-image' | grep '3.11' To find the kernel headers package for your running kernel: apt-cache search linux-headers-`uname -r`
Debian: get package name for installed file
1,435,234,766,000
I have to remove all packages installed on a specific day. My solution is to look up the file /var/log/dpkg.log, find out the entry with the right date, extract the names of the packages and remove them. Can I be sure sure that, in this way, I will find all desired packages? Is there another way to do it, in a more se...
/var/log/apt/history.log is usually better to use for multiple reasons for this, one is that it logs whether a package was installed automatically to satisfy dependencies or not. Say upgrades are installed on the same day and some of them have new dependencies. If you try to remove those, apt will recommend removing t...
debian: remove all packages installed on a specific day
1,435,234,766,000
For various reasons, I have a package on my Debian system which cannot configure itself properly. I know why and I don't want to correct the problem right now. However, I want to avoid apt trying to configure it each time I install an unrelated package (for at least 20 seconds). To do so, I would like to flag this pa...
The easiest thing to do is let it configure it, but alter the configuration script to do nothing. When dpkg "configures" a package, what is really doing is executing the post installation script for the package. To force the configuration to succeed, you can alter the post installation script to make it a no-op script...
Flag a package as being configured on Debian even if it's not
1,435,234,766,000
I've been trying to figure out package management in debian a little better. I figured out that you can list all the packages on your system by using the "apt-cache pkgnames" command: root@t500:/etc# apt-cache pkgnames | less aspell-ca libglobus-rls-client5 rkhunter libmpich-shmem1.0gf meep libspring-webmvc-portlet-2....
It's the same name, apt is just a frontend to dpkg. The issue here is that the commands don't do what you thing they do. As explained in man apt-cache: pkgnames [prefix] This command prints the name of each package APT knows. The optional argument is a prefix match to filter the name list. The ...
Naming conventions / translation between dpkg and apt packages?
1,435,234,766,000
When ever I updated packages, (they update) I receive the following message about TeXLive: dpkg: warning: parsing file '/var/lib/dpkg/status' near line 2888 package 'texlive-local': missing maintainer This doesn't mess up the packages downloading or upgrading. I would like to have this stop though. How can I do thi...
The package texlive-local is malformed. The Maintainer field in packages is mandatory, even though it is not used for any technical reason — it's more of a social requirement to give some tracability to all packages. The lack of this field does not cause any problem, but it's something that shouldn't happen, so dpkg i...
Ubuntu 12.04: updating package message
1,435,234,766,000
Suppose I have a debian package housing as follows: project_pkg/ .git project_0.0-1/ debian/ install ... project (git submodule with tagged commit) With the following install file: // .../debian/install #!/usr/bin/env bash find $(pwd)/project/path/to/binaries -type f -executable -printf...
dh_install takes paths relative to the current directory, which is generally the top-level directory of the package. In your case that’s project_0.0-1, so your find invocations should output project/path/to/.... Yes, that would work too. I know I recommended dh_install, but the first rule of debhelper remains that it...
Dpkg dh_install: copy files from the build directory rather than the debian/tmp dir?
1,435,234,766,000
Could dpkg, the Debian package manager, gain a noticeable performance improvement by using one of the AIO fsync() operations, instead of sync_file_range() + fsync()? The [proposed] fsync2() API is essentially identical to the existing AIO_FSYNC/AIO_FDSYNC API, except it's synchronous and that is what applications wan...
The question suggests this won't help on ext4 or XFS. I also tested with installing one much larger package (linux-image-4.9.0-9-amd64). It still seemed to take the same time, regardless of --force-unsafe-io. ext2 On ext2, --force-unsafe-io reduced the time to install linux-image from 50 seconds to 13 seconds. The ke...
Could AIO fsync improve dpkg performance?
1,435,234,766,000
The problem: Unable to install virtual box. I tried to install it using the following command: sudo apt install virtualbox Here is the outcome sudo: /etc/sudoers.d/README is world writable Reading package lists... Done Building dependency tree Reading state information... Done virtualbox is already the newest ...
You recive this error : VirtualBox: Error -610 in supR3HardenedMainInitRuntime! VirtualBox: dlopen("/usr/lib/virtualbox/VBoxRT.so",) failed: <NULL> VirtualBox: Tip! It may help to reinstall VirtualBox. because the permission of the root partition is changed recursively to 777. Virtualbox set some restrictions for the...
Virtualbox unable to install
1,418,657,498,000
I'm trying to list installed packages with custom format, dpkg-query -f '${Package}###${Version}\n' -W '*' But it also print those are removed. Is there any way to filter them out? I'm trying to avoid doing a grep -v '###$'
If you drop the package name pattern, dpkg-query will only list installed or configured packages: dpkg-query -f '${Package}###${Version}\n' -W This gives the same result as your putative grep.
dpkg-query show installed package only
1,418,657,498,000
I'm running Ubuntu 19.04. I recently needed to install a browser other than chromium or Firefox in order to play a flash video. I've now ended up with a much more complicated problem. Every time I try to do something with dpkg, I get an error code like: dpkg: error: dpkg frontend lock is locked by another process To...
When starting Ubuntu the autoupdate service will be executed automatically, that's why you received an error, the best practice is to let the auto-update complete this task. If you need to interrupt this task you can do: sudo pkill apt sudo pkill dpkg sudo dpkg --configure -a sudo apt update
What's wrong with my dpkg?
1,418,657,498,000
When I search for a list of packages, I usually use dpkg -l|grep string|cut -d" " -f3|xargs libdouble-conversion3:amd64 libestr0:amd64 libeval-closure-perl libio-stringy-perl libunistring2:amd64 liburi-perl libustr-1.0-1:amd64 libwind0-heimdal:amd64 libxstring-perl php-mbstring php7.0-mbstring php7.4-mbstring php8.2...
dpkg-query allows formatting the output, when using -W instead of -l. E.g. dpkg-query -f='${binary:Package} ' -W 'pyth*' would list all binary packages starting with pyth and separate them by space, with their architecture when necessary. More details on possible formats in man dpkg-query. It might not necessarily b...
A shorter way to list all packages matching a string
1,418,657,498,000
After updating GNOME to 3.20.2 I had some problems with my touchpad so in that confusion I mistakenly deleted /usr/bin/touch and after that I even became more stupid and deleted /bin/touch. Now after this I can't seem to install any of the programs. Here's the error generated in installing a program.. user1@pqrx:~$ s...
I was very thankful for all the valuable time you guys spent answering my question and combining both the answers I found the best solution. IF you have messed up with the coreutils then the best thing to do is download the coreutils file from the repository. As we all know that .deb files are basically archive, open ...
Deleted /usr/bin/touch and /bin/touch. Can't seem to install anything now, nor create any files?
1,418,657,498,000
Sometimes I find myself installing a package and then trying to run a command using the same name, like with geoip-bin package: $ sudo apt install geoip-bin [...] $ geoip-bin geoip-bin: command not found How may I find all the commands associated with a given package?
dpkg -L -L, --listfiles package-name List files installed to your system from package-name. Two alternatives: Usually works just: dpkg -L byobu | egrep '/bin/|/sbin/' (or even with grep bin if you don't care getting some false positives). Or dpkg -L byobu | xargs which Or with some bash magic: for f in $(dpkg -L geo...
How to find commands associated to a package? [duplicate]