date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,658,759,967,000
We have the nice tool dpkg-reconfigure to re-ask install configuration questions of a single package. For example, by dpkg-reconfigure -plow something I can re-configure the package something, i.e. re-run its installation script. We also have the apt tool to download a package from a repository, along with its recursive dependency structure, and install and configure them, in the correct order. Thus, for example, an apt install something installs "something" to my system, with all of its dependencies, and everything will be downloaded (if needed) and installed, in the correct order, as needed. I want to combine them both. I want to install a package with apt, while all the questions are asked from me. Can I do it something, with a - maybe tricky - apt flag, or configuration change?
You can set the debconf priority by setting the DEBIAN_PRIORITY environment variable: DEBIAN_PRIORITY=low apt install foo
How to set up deb question priority with an apt flag?
1,658,759,967,000
After upgrading to Debian 10.7 I got this error, possibly due to lack of storage space: Error while installing package: installed initramfs-tools package post installation script: subprocess returned error exit status 1 How to ensure that the package is correctly installed? Should it be reinstalled (how)? No packages are shown to remain to be upgraded when running sudo apt-get auto-remove && sudo apt-get clean && sudo apt-get update && sudo apt-get upgrade (except "python3-psycopg2" which is held back because "Depends: python3 (< 3.6) but 3.7.3-1 is to be installed").
When a package post installation script fails, the package remains in “half-configured” state, and any subsequent operation which touches packages should run the post installation script again. You can check initramfs-tools’ state by running dpkg -l initramfs-tools If this shows 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 +++-===============-=============-============-================================================ ii initramfs-tools 0.133+deb10u1 all generic modular initramfs generator (automation) then nothing further needs to be done. If the second column shows F, then the package is half-configured, and configuration can be completed by running sudo dpkg --configure --pending If you’d rather re-install the package instead, run sudo apt-get install --reinstall initramfs-tools
How to ensure that a package is correctly installed/updated after "post-installation script: subprocess returned error exit status 1"
1,658,759,967,000
I have these erros when I'm doing apt upgrade on my debian server: Preparing to unpack .../phpmyadmin_4%3a4.6.6-4+deb9u1_all.deb ... Determining localhost credentials from /etc/mysql/debian.cnf: succeeded. dpkg: warning: subprocess old pre-removal script returned error exit status 10 dpkg: trying script from the new package instead ... Determining localhost credentials from /etc/mysql/debian.cnf: succeeded. dpkg: error processing archive /var/cache/apt/archives/phpmyadmin_4%3a4.6.6-4+deb9u1_all.deb (--unpack): subprocess new pre-removal script returned error exit status 10 dbconfig-common: flushing administrative password dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 10 Preparing to unpack .../libgssdp-1.0-3_1.0.1-1+deb9u1_amd64.deb ... Unpacking libgssdp-1.0-3:amd64 (1.0.1-1+deb9u1) over (1.0.1-1) ... Preparing to unpack .../libgupnp-1.0-4_1.0.1-1+deb9u1_amd64.deb ... Unpacking libgupnp-1.0-4:amd64 (1.0.1-1+deb9u1) over (1.0.1-1) ... Preparing to unpack .../libpq5_9.6.19-0+deb9u1_amd64.deb ... Unpacking libpq5:amd64 (9.6.19-0+deb9u1) over (9.6.17-0+deb9u1) ... Errors were encountered while processing: /var/cache/apt/archives/phpmyadmin_4%3a4.6.6-4+deb9u1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) I tried to remove phpmyadmin but I get these erros: The following packages will be REMOVED: phpmyadmin 0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded. 6 not fully installed or removed. After this operation, 24.8 MB disk space will be freed. Do you want to continue? [Y/n] dpkg: error processing package phpmyadmin (--remove): package is in a very bad inconsistent state; you should reinstall it before attempting a removal Errors were encountered while processing: phpmyadmin E: Sub-process /usr/bin/dpkg returned an error code (1) I also did: apt-get clean apt-get update && apt-get upgrade dpkg --configure -a apt-get -f install But nothing works.
Open the terminal and type: sudo mv /var/lib/dpkg/info/phpmyadmin.* /tmp/ sudo dpkg --remove --force-remove-reinstreq phpmyadmin sudo apt remove phpmyadmin sudo apt autoremove sudo apt autoclean
dpkg: error processing package phpmyadmin
1,658,759,967,000
Before installing, a package’s dependencies and conflicts are stored in the control file (of the .deb). Once the package is installed, where are the list its dependencies and conflicts? I need to remove and then install (not reinstall) substitute, so I figured that the easiest way to do so without having to remove and then install every package would be to temporarily remove the dependency of substitute from every package, and then do what I need (uninstall and reinstall it). I’m hoping that if I do this, substitute will begin working. Everything else I’ve tried (manually removing its files and force installing either version 0.1.9 or 0.1.13 with dpkg, downgrading from 0.1.13 to 0.1.9, etc.) hasn’t worked.
dpkg stores its package information, including dependencies, in /var/lib/dpkg/status. Given what you’ve already tried, I doubt removing and installing a package in the way you describe will work any better...
Where are installed packages’ dependencies stored?
1,658,759,967,000
Context: Want to put a lock on etckeeper/apt hook activity during special backup. Objective is to preserve whole package integrity, e.g., wait until any package installation is complete, and then prevent new installation from starting until special backup is complete. Found shell script under cron which appears to be attempting to a lock on /var/cache/etckeeper/packagelist.pre-install but actually it is not performed atomically and so it is flawed. I presume the cron shell script is part of Ubuntu 16.04 installation, not a part of etckeeper release. Flawed lock code shown below. Searched for etckeeper documentation about use of /var/cache/etckeeper/packagelist.pre-install as lock file. Found no documentation. But did find a piece of script file which writes to /var/cache/etckeeper/packagelist.pre-install without treating it as a lock file. At this time I am presuming that /var/cache/etckeeper/packagelist.pre-install is not intended to serve as a lock file interface for etckeeper. Etckeeper internal script not treating /var/cache/etckeeper/packagelist.pre-install as a lock file shown below. Question 1: Is there (and if so where is) documentation on etckeeper locking mechanism, or a developers portal to issue a requestion for clarification? There are plenty of questions and much discussion on stackexchange sites about the use of /var/lib/apt/lists/lock (we call it apt lock below) and /var/lib/dpkg/lock (we call it dpkg lock below) as locks for apt and dpkg respectively. All of the communications are concerned with stuck locks, how to diagnose them, and how to unstick them. However, I kind find no references to official apt and dpkg documentation specifying those lock files use as a formal interface. Question 2: Is there (and if so where is) documentation on apt lock mechanism and/or dpkg lock mechanism as public interfaces? Flawed lock attempt shell script, probably provided by Ubuntu 16.04: $ sudo cat /etc/cron.daily/etckeeper #!/bin/sh set -e if [ -x /usr/bin/etckeeper ] && [ -e /etc/etckeeper/etckeeper.conf ]; then . /etc/etckeeper/etckeeper.conf if [ "$AVOID_DAILY_AUTOCOMMITS" != "1" ]; then # avoid autocommit if an install run is in progress lockfile=/var/cache/etckeeper/packagelist.pre-install if [ -e "$lockfile" ] && [ -n "$(find "$lockfile" -mtime +1)" ]; then rm -f "$lockfile" # stale fi if [ ! -e "$lockfile" ]; then AVOID_SPECIAL_FILE_WARNING=1 export AVOID_SPECIAL_FILE_WARNING if etckeeper unclean; then etckeeper commit "daily autocommit" >/dev/null fi fi fi fi Etckeeper internal shell scipt writing to packagelist.pre-install and not treating it as a lock - hence I don't think it was intended as a lock interface. $ sudo cat /etc/etckeeper/pre-install.d/10packagelist #!/bin/sh # This list will be later used when committing. mkdir -p /var/cache/etckeeper/ etckeeper list-installed > /var/cache/etckeeper/packagelist.pre-install etckeeper list-installed fmt > /var/cache/etckeeper/packagelist.fmt
The cron job is treating /var/cache/etckeeper/packagelist.pre-install as evidence that an installation is being processed, so it shouldn’t archive anything just yet. That file isn’t supposed to be a lock file, but the cron job is using it as a substitute. However I wouldn’t particularly worry about etckeeper and any lock files it has or hasn’t. If you want a consistent backup of an etckeeper managed tree, use the VCS’s features (but don’t forget any ignored files). The dpkg locks are documented (albeit briefly) as public interfaces in frontend.txt (/usr/share/doc/dpkg-dev/frontend.txt in dpkg-dev).
Where is official documentation about locking mechanisms for etckeeper, apt, and/or dpkg?
1,658,759,967,000
I am looking for which no-longer-installed package depended on rsync. An apt-get autoremove now wants to remove rsync so I'm guessing that it was installed as part of a dependency rather than manually, and I'm curious which package depended on it. Can I search back in logs for something like "X requires Y, so I will install Y as well"? Or does it even store which reverse dependency required it, just like it stores that it was not installed by the user?
apt doesn’t remember which reverse dependency caused it to install rsync, but it does log all its actions in /var/log/apt, so you might find the dependency there: zgrep rsync /var/log/apt/history.log* Look for a line saying that rsync was installed automatically; one of the non-automatic packages there should be the source of the installation. You can also examine rsync’s reverse dependencies, e.g. using aptitude, or apt-rdepends -r, or reverse-depends (in ubuntu-dev-tools), or grep-dctrl. Note that rsync might be a candidate for uninstallation, not because a package depending on it was uninstalled, but because whatever package caused it to be installed no longer depends on it. That is somewhat harder to trace... As pointed out by cas, you can tell apt to keep rsync, regardless of which package depends on it, by marking it as manually installed, using either apt-get install rsync (which won’t actually install rsync if it’s already installed), or apt-mark manual rsync.
How to find which package required another package?
1,658,759,967,000
python3.6 was installed this way. wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz tar -xf Python-3.6.0.tar.xz cd ./Python-3.6.0 sudo ./configure --prefix=/usr/local/python3.6 --with-ensurepip=install --enable-ipv6 sudo make sudo make install sudo ln -s /usr/local/python3.6/bin/python3.6 /usr/bin/python3.6 sudo ln -s /usr/local/python3.6/bin/pip3.6 /usr/bin/pip3.6 python3.6 can't be listed by dpkg after installation. dpkg -l |grep python3.6 or dpkg -l |grep python3* |grep 3.6 Nothing output. Python3.6 can't be listed by dpkg,does it mean that python3.6 can't be managed by dpkg - package manager for Debian? How to make it managed by dpkg?
dpkg only manages packages, it doesn't know about software installed in other ways. There are different approaches you can use. You can use checkinstall to create a package from the results of make install. Alternatively, you can rebuild the Debian python3.6. It's important to realise though that the system Python package is intended for the system's use. To develop with newer versions of Python, you should use virtual environments, without attempting to replace the system's Python packages...
How to make dpkg manage python3.6?
1,658,759,967,000
Why are some packages found by dpkg-query as with unknown desired action and with not-installed status while other packages are not found at all? For example I have never installed package named debian-handbook, but it somehow shows up in output of dpkg-query -l debian-handbook or dpkg-query -s debian-handbook. On the other hand, for example some packages, which I have also never touched, do not show up in output of dpkg -l: root@T60:~# dpkg -l gkermit dpkg-query: no packages found matching gkermit root@T60:~# apt-cache policy gkermit gkermit: Installed: (none) Candidate: 1.0-9 Version table: 1.0-9 0 500 http://http.debian.net/debian/ jessie/main i386 Packages root@T60:~#
I think dpkg -l finds packages that are mentioned as dependencies of packages that are currently installed, and doesn't find other available packages. (Here “installed” includes “conffiles-only” packages, i.e. packages that have been removed but not purged, listed as uc in dpkg -l.) dpkg -l lists packages that are mentioned in the dpkg status file (/var/lib/dpkg/status). There may be other reasons that determine whether a package is listed by dpkg -l, but I think this is the main one.
How are some deb packages found by dpkg-query while they have never been installed?
1,658,759,967,000
I am using Ubuntu 14.04.5 LTS. Kernel is 3.13.0.-92-generic. I have installed latest available updates. I am trying make Linux version of Password Safe to work on my computer. I downloaded .deb file for Debian and installed it with dpkg -i passwordsafe-debian-0.99.9.-BETA.amd64.deb. Installation succeeds but when I try to run the program I get: pwsafe: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version 'CXXABI_1.3.8' not found (required by pwsafe) pwsafe: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version 'GLIBCXX_3.4.20' not found (required by pwsafe) I also tried installing deb-package for Xubuntu. It gave the same errors. I tried researching this problem but could not find anything usefull about the prolematic programs/libraries. What should I do to solve these errors?
The errors mean the version of Password Safe you have (as built for the package you're installing) needs a newer libstdc++.so than the one on your system. Upgrading that library beyond what is supported by your current distribution is not a good idea. There are a few other possibilities. If you don't mind installing an older version of Password Safe, the System Tools & Utilities PPA has a package for your version of Ubuntu: sudo add-apt-repository ppa:upubuntu-com/system sudo apt-get update sudo apt-get install passwordsafe The Debian Password Safe package should rebuild fine in Ubuntu 14.04, once a couple of fixes have been applied: sudo apt-get install devscripts build-essential debhelper libgtest-dev libwxgtk3.0-dev libxerces-c-dev libxt-dev libxtst-dev libykpers-1-dev libyubikey-dev locales-all pkgconf uuid-dev wx3.0-headers dget http://httpredir.debian.org/debian/pool/main/p/passwordsafe/passwordsafe_0.99+dfsg-1.dsc cd passwordsafe-0.99+dfsg sed -i /locales-all/d debian/control sed -i s/LC_ALL=en_US.UTF-8/LC_ALL=C.UTF-8/ debian/rules dpkg-buildpackage -us -uc sudo dpkg -i ../passwordsafe*_0.99+dfsg-1*deb Ubuntu 16.06, which is also an LTS release, includes Password Safe. Thus a third option would be to upgrade to that; but in any case, if you install a package using either of the two options above, when you do eventually upgrade to 16.06 the package will be replaced by the "official" Ubuntu package.
Libstdc++: wrong version after manually installing .deb-package
1,658,759,967,000
I bought a new Raspberry Pi 2 with ARM processor architecture. Tonight I did an update via sudo apt-get update && sudo apt-get upgrade. I noticed, that it did update the dpkg package itself. Now I wanted to install apache2 on the Raspbian system, but the dpkg binaries seem to be broken: ... /usr/bin/dpkg-deb: 1: /usr/bin/dpkg-deb: Syntax error: word unexpected (expecting ")") dpkg: Fehler beim Bearbeiten des Archivs /var/cache/apt/archives/apache2-data_2.4.10-10+deb8u3_all.deb (--unpack): Unterprozess dpkg-deb --control gab den Fehlerwert 2 zurück ... For all none german speakers "Fehler beim Bearbeiten des Archivs" means "An error occurred while processing the archive" and means "Unterprozess dpkg-deb --control gab den Fehlerwert 2 zurück" the "Subprocess dpkg-deb --control returned error code 2" This happens to all packages I'm trying to install. What can I do now?
To restore the binaries without using dpkg, here's the "simple" approach, assuming your Raspberry Pi has binutils installed: retrieve the dpkg package (the .deb file); it's probably still in /var/cache/apt/archives, otherwise you'll need to download it (from the pool; pick whichever version matches what you have installed) extract the data.tar.gz file from the archive, somewhere safe: ar x dpkg_....deb data.tar.gz extract dpkg-deb: tar xf data.tar.gz ./usr/bin/dpkg-deb move dpkg-deb into place: sudo mv usr/bin/dpkg-deb /usr/bin If you don't have binutils installed, you'll need to extract data.tar.gz on another computer (after installing binutils there if necessary).
dpkg binaries broken?
1,658,759,967,000
I am trying to install an app we made in Ubuntu (with Quickly) to Raspberry Pi Raspbian. However, it has a dependency python:any (>= 2.7.1-0ubuntu2) which is unmet in Raspbian although it has Python 2.8 installed. However, the app runs fine throughout Ubuntu 12.04 to 15.04. Is this due to the mention of Ubuntu in version number? Is there any workaround except forcing dpkg to ignore the Python version dependency issue ?(this works although makes the app a broken package) This is the control file's dependency part (It was created by Quickly) Depends: dconf-gsettings-backend | gsettings-backend, python (>= 2.7), python (<< 2.8), python:any (>= 2.7.1-0ubuntu2), gir1.2-glib-2.0, gir1.2-gtk-3.0, gir1.2-webkit-3.0, yelp I don't know why there are three Python entries. Edit: I made a mistake. Pi runs Python 2.7.3 This is the result of dpkg -l python 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 +++-==============-============-============-================================= ii python 2.7.3-4+deb7 all interactive high-level object-ori These are the results of pi@raspberrypi ~ $ dpkg -I up-clock_6.0_all.deb new debian package, version 2.0. size 734750 bytes: control archive=2246 bytes. 619 bytes, 12 lines control 3762 bytes, 49 lines md5sums 158 bytes, 9 lines * postinst #!/bin/sh 253 bytes, 14 lines * prerm #!/bin/sh Package: up-clock Version: 6.0 Architecture: all Maintainer: Archisman Panigrahi <[email protected]> Installed-Size: 1562 Depends: dconf-gsettings-backend | gsettings-backend, python (>= 2.7), python (<< 2.8), python:any (>= 2.7.1-0ubuntu2), gir1.2-glib-2.0, gir1.2-gtk-3.0, gir1.2-webkit-3.0, yelp Section: python Priority: extra Description: A beautiful Clock, inspired by Ubuntu Touch homescreen, already on your desktop. Inspired by Ubuntu Touch homescreen, this clock is able to show you the time in a way you never seen before. The "clouds" changes colors and sizes automatically awhile showing you the time. pi@raspberrypi ~ $ apt-cache policy python python: Installed: 2.7.3-4+deb7u1 Candidate: 2.7.3-4+deb7u1 Version table: *** 2.7.3-4+deb7u1 0 500 http://mirrordirector.raspbian.org/raspbian/ wheezy/main armhf Packages 100 /var/lib/dpkg/status
The three dependencies for Python are: python (>= 2.7) python (<< 2.8) python:any (>= 2.7.1-0ubuntu2) The net effect is to require Python from the 2.7 series (e.g. not 2.6, not 3.x) but no older than 2.7.1-0ubuntu2. The first two taken together are a way of saying that you need to have Python 2.7 installed but it is allowed to be Python 2.7.anything. That is, it has to be at least 2.7 (first requirement) but less than 2.8 (second requirement). (Python 2.8 does not exist and will never exist, but it's just a way of specifying the bounds in the version ordering system used by Debian.) The last one probably comes from an additional dependency you have during package builting. You might have a substvar in the source debian/control file (not the one that is in the package, the one that is in the source) that causes it to be autogenerated. It partially overlaps with the first requirement. In one sense it is less strict than the other dependency because of :any which allows the installed python to be from a different architecture. In another sense it is stricter, because it requires Python to be at least 2.7.1-0ubuntu2. There must have been a bug fix in that specific version that makes 2.7.0 or even plain 2.7.1 ineligible to meet the dependency. although it has Python 2.8 installed. No. Python 2.8 does not exist. It must be the case that the version of Python you have installed doesn't meet the requirements. What does dpkg -l python say?
Strange dependency error in installing package
1,658,759,967,000
I'm trying to install things in Linux (Crunchbang Linux - a derivation of Debian), and I'm getting errors which point towards mongodb-20gen. When I try to remove it using :- cometbill@Linuxn00b:~$ sudo apt-get remove mongodb-10gen I get ... Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be REMOVED: mongodb-10gen 0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded. 1 not fully installed or removed. After this operation, 221 MB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 81657 files and directories currently installed.) Removing mongodb-10gen ... arg: remove invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found. dpkg: error processing mongodb-10gen (--remove): subprocess installed pre-removal script returned error exit status 100 invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found. dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 100 Errors were encountered while processing: mongodb-10gen E: Sub-process /usr/bin/dpkg returned an error code (1) I read something on here for similar errors with MongoDB, and it suggested removing mongo-clients, so, I tried:- cometbill@Linuxn00b:~$ sudo apt-get remove mongodb-clients and get:- Reading package lists... Done Building dependency tree Reading state information... Done Package 'mongodb-clients' is not installed, so not removed 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 mongodb-10gen (2.4.6) ... invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found. dpkg: error processing mongodb-10gen (--configure): subprocess installed post-installation script returned error exit status 100 Errors were encountered while processing: mongodb-10gen E: Sub-process /usr/bin/dpkg returned an error code (1) on schaiba's advice, I tried :- cometbill@Linuxn00b:~$ sudo apt-get install -f and got :- Reading package lists... Done Building dependency tree Reading state information... Done 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 mongodb-10gen (2.4.6) ... invoke-rc.d: unknown initscript, /etc/init.d/mongodb not found. dpkg: error processing mongodb-10gen (--configure): subprocess installed post-installation script returned error exit status 100 Errors were encountered while processing: mongodb-10gen E: Sub-process /usr/bin/dpkg returned an error code (1)
This AskUbuntu post solved the problem for me; I edited /var/lib/dpkg/status and removed the section that was causing problems.
MongoDB install errors / E: Sub-process /usr/bin/dpkg returned an error code (1)
1,658,759,967,000
I'm using dpkg (Cydia), and a package keeps saying that it's downloading 26.2 MB, and resuming at 166.0 kB. It is consistently failing to install properly. Is there a way to clear this "saved data" and start the download fresh again?
On Debian-based systems, apt-get downloads *.deb files under /var/cache/apt/archives/ (dpkg does not download anything by itself, it only manages the packages locally). Searching suggests, it's just a bit different on iOS, and the path is /private/var/cache/apt/archives, partucularly, you probably want to remove /private/var/cache/apt/archives/partial/*.deb
Clearing dpkg downloaded data?
1,658,759,967,000
How can I use dkpg -i and it does not update the package if already installed.
Given an arbitrary package file as argument, this script will install it only if the corresponding package is not already installed (in any version): #!/bin/sh if ! dpkg -l "$(dpkg-deb -W --showformat '${Package}:${Architecture}' "$1")" | grep -q '^ii'; then dpkg -i "$1" fi It works by extracting the package name and architecture from the package file, and checking whether a matching package is already installed. If not, it installs it.
Use dpkg -i without updating the already installed package
1,658,759,967,000
I could not find no verbosity, quiet, silent, etc flags for dpkg-buildpackage. For instance, it prints [info] messages I am interested in, but also prints what is going on within all its rules file targets. I would like to not output that. Is building a debian package profile related ?
dpkg-buildpackage doesn’t control the package build’s output, but Policy-compliant packages can provide a “terse” mode, controlled by DEB_BUILD_OPTIONS: DEB_BUILD_OPTIONS=terse dpkg-buildpackage ... This isn’t guaranteed to make much difference; the results will depend on the build itself (debian/rules in the source package). Most Debian packages err on the side of verbosity, because it makes it much easier to fix problems by reading build logs.
Does dpkg-buildpackage offer control over its output?
1,658,759,967,000
I am trying to rebuild Debian package mousepad without D-Bus on Debian 10. First, I try building the package without any change. apt-get source mousepad cd mousepad-0.4.1 dpkg-buildpackage --build=binary --no-sign That works. Now I want to build with D-Bus disabled. I see that Mousepad has the --disable-dbus build option, but where exactly should I put it? The debian/rules file looks like this: #!/usr/bin/make -f export DEB_LDFLAGS_MAINT_APPEND=-Wl,--as-needed -Wl,-O1 -Wl,-z,defs export DEB_BUILD_MAINT_OPTIONS=hardening=+all override_dh_missing: dh_missing --fail-missing override_dh_autoreconf: mkdir -p m4 dh_autoreconf %: dh $@ When I launch Mousepad on Debian 10, I see the following messages in the log. dbus-daemon: [session uid=1000 pid=10430] Activating service name='ca.desrt.dconf' requested by ':1.0' (uid=1000 pid=10425 comm="mousepad ") dbus-daemon: [session uid=1000 pid=10430] Successfully activated service 'ca.desrt.dconf' Therefore, I believe the standard package Mousepad on Debian 10 does use D-Bus and it starts the dbus-launch binary.
The Debian 10 mousepad package is already built without D-Bus support; you can verify this by looking at the build logs for version 0.4.1-2 on amd64 and searching for “D-BUS”: Build Configuration: * D-BUS support: no * Debug Support: minimum * Use keyfile backend: default * Build with GTK+ 3: yes To make this explicit, you need to override the automatic configuration; add this to the end of debian/rules: override_dh_auto_configure: dh_auto_configure -- --disable-dbus Make sure that the second line starts with a tab. The log messages you’ve found come from dconf, not Mousepad itself; to disable those, you can try switching to the keyfile settings backend: override_dh_auto_configure: dh_auto_configure -- --without-dbus --enable-keyfile-settings While you’re at it, add a changelog entry to make sure that your package won’t get “upgraded” to the same dbus-enabled version from the repositories: dch --local +400cat 'Rebuild without dbus.' dch -r ignored (this uses dch from the devscripts package). Now build the package: dpkg-buildpackage -us -uc and install it. This will still result in a binary which depends (indirectly) on libdbus-1.so.3, but that’s because it depends on libgtk-3.so.0, which itself depends on libatk-bridge-2.0.so.0, which depends on libdbus-1.so.3. If you really want to get rid of D-Bus, you’ll have to rebuild at-spi2-atk, and anything else on your system which build-depends on libdbus-1-dev.
Remove all traces of D-Bus when running Mousepad in Debian
1,658,759,967,000
After downloading ubuntu source from kernel.ubuntu.com, I tried to set configuration for arm64. When I do command below, LANG=C fakeroot debian/rules ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- editconfigs and select to change config for arm64, the config menu appears and below is the screen when I searched for STACKPROTECT (by /STACKPROTECT). I wanted to set STACKPROTECTOR_PER_TASK to 'y' but for that I have to set CC_HAVE_STACKPROTECTOR_SYSREG. But this seems to be related to the target processor and I'll have to select the arm64 processor (generation). Where can I set it? I couldn't find it in the General Setup.
Options that contain HAVE_ are generally things that depend on your build environment, not options per se. You can see this one being defined in arch/arm64/Kconfig: config CC_HAVE_STACKPROTECTOR_SYSREG def_bool $(cc-option,-mstack-protector-guard=sysreg -mstack-protector-guard-reg=sp_el0 -mstack-protector-guard-offset=0) So you can test if your compiler supports it, for example my x86_64 gcc obviously doesn't support it but the aarch64 one (which would be used for an arm64 kernel build!) does for me: $ echo "int main() { return 0; }" | gcc -x c - -c -o /dev/null -mstack-protector-guard=sysreg -mstack-protector-guard-reg=sp_el0 -mstack-protector-guard-offset=0 gcc: error: unrecognized argument in option ‘-mstack-protector-guard=sysreg’ gcc: note: valid arguments to ‘-mstack-protector-guard=’ are: global tls $ echo "int main() { return 0; }" | aarch64-linux-gnu-gcc -x c - -c -o /dev/null -mstack-protector-guard=sysreg -mstack-protector-guard-reg=sp_el0 -mstack-protector-guard-offset=0 $ try that command and see why it fails, you might just need a newer gcc? People online complain the sp_el0 is not present in GCC 8, so I believe it was introduced around gcc 9 or 10.
where can I find CC_HAVE_STACKPROTECTOR_SYSREG
1,658,759,967,000
It's possible to add user-defined fields in the debian/control file using the XBS- method, as defined in the Debian Policy Manual, and those will be injected into the binary .deb and source packages. Something like this before calling dpkg-buildpackage will work to inject a new field into both the Source and Binary packages. But some packages don't contain debian/control as they generate it (kernel etc) so this is not always reliable. sed -i "0,/^\s*$/s//XBS-Git-Branch: ${CI_COMMIT_BRANCH}\n/" debian/control dpkg-buildpackage It's also possible to inject the user-defined field into the generated source package using options passed to dpkg-source while building the package: dpkg-buildpackage --source-option=-DGit-Branch=${CI_COMMIT_BRANCH} However, that will only inject the field into the generated source package, not the generated binary packages. Is there a method to reliably inject fields into the binary packages?
It is possible to modify the binary packages control files from the --hook-buildinfo hook that's called immediately after debian/rules build is called, using dpkg-deb to unpack/repack them. #!/bin/bash # # deb_insert_meta.sh # # Inserts CI metadata into all deb files in parent directory # Intended for use with: # `dpkg-buildpackage --hook-buildinfo='fakeroot deb_insert_meta.sh'` # which is the first hook after the binary deb files are generated # but before checksums for .changes are calculated # Should be called with 'fakeroot' so that the repacked binaries # have their content/control ownership/permissions preserved. pushd .. > /dev/null || exit 1 for deb_file in *.deb; do [ -e "$deb_file" ] || continue DEB_TMPDIR=$(mktemp -d) if [ -z "${DEB_TMPDIR}" ]; then echo "Failed to create a temporary work directory" exit 1 fi dpkg-deb -R "${deb_file}" "${DEB_TMPDIR}" if [ -e "${DEB_TMPDIR}/DEBIAN/control" ]; then if [ -n "${CI_PROJECT_PATH}" ]; then echo "Git-Repo: ${CI_PROJECT_PATH}" >> "${DEB_TMPDIR}/DEBIAN/control" fi if [ -n "${CI_COMMIT_SHA}" ]; then echo "Git-Hash: ${CI_COMMIT_SHA}" >> "${DEB_TMPDIR}/DEBIAN/control" fi if [ -n "${CI_COMMIT_BRANCH}" ]; then echo "Git-Branch: ${CI_COMMIT_BRANCH}" >> "${DEB_TMPDIR}/DEBIAN/control" fi dpkg-deb -b "${DEB_TMPDIR}" "${deb_file}" fi rm -rf "${DEB_TMPDIR}" done popd > /dev/null || exit 1 exit 0
How to injecting user-defined fields in Debian binary package control files
1,658,759,967,000
I made a script that compiles a program (box86), packages it into a debian package every week, and uploads it to my apt repo (hosted on github). for the version of each package I use the git tag (0.2.1 for example) and the git commit hash (638b341 for example) and put them like this: tag+sha1 (0.2.1+638b341 for example). note that checkinstall that is used for packaging adds a -1 to the end, so in my example, the version would be 0.2.1+638b341-1. after adding the repo to my apt sources, apt gets the wrong version. I tried several fixes including adding a "epoch", incrementing the -1, and adding a number before and incrementing it in each version (1-version). but none of them worked (or would be practical). I'm pretty sure I have to add something to the version, but I don't know what. any help is appreciated.
All else being equal, apt prefers later versions. Because hashes don’t increase with time, using them in versions can cause the problem you’re seeing. There are two common workarounds: adding a monotonically-increasing number before the hash, or adding the date, again before the hash. Taking the latter approach, for a build done today you’d have 0.2.1+20210320.thehash-1, replacing “thehash” as appropriate. Better yet, you can use git log --date=format:%Y%m%d --pretty=0.0~git%cd.%h to generate the version number; this is supported by uscan and can be used to automatically update to the current head of a git repository.
deb version is "git tag+git commit hash" = apt downloading the wrong version from my apt repo
1,658,759,967,000
While removing a package yesterday, I received warning like this : dpkg warning : directory is not empty so not removed When I checked the listed directory in the warning, I found that the directory is actually empty. That means dpkg successfully removed files inside that directory, but thrown out the warning, and not removed the directory. Why does this occur ? Why dpkg give such warning even if the directory is empty ?
Thank you @Fox for pointing out this. I almost forgot dotfiles. If the directory that is being removed has any files included that dpkg doesn't know about, it gives this warning. Sometimes, that directory may have system generated dotfiles. In those cases, we may receive this warning.
dpkg warning : directory is not empty so not removed
1,658,759,967,000
I've been already made a bootable Linux-based OS using the kernel, busybox only, and testing it in the QEMU emulator is successful. The next step I need is to install dpkg and APT (Debian package manager) on my custom Linux. How can I do that? Just install the Debian Package manager source code and compile and then porting to rfs of my system? I don't know what to do exactly. (installing the Debian package manager is the only way to achieve my goal because my professor instructs like that. So other ways are not useful to me)
Before I continue let me disclaim: If your professor is using apt, then she is using a debian-based system. I recommend using the same distro instead of your own "from-scratch" system. If you and using a from-scratch system because you want a custom kernel, then you can install that kernel a debian-based system. If you do use apt, you'll end up downloading packages from somewhere. Where do you want that to be? Ubuntu's archive? Debian's archive? Elementary's archive? You'll also need to know which version of things to download. Debian stretch has many incompatibilities with Debian buster and Ubuntu bionic. When you use apt to install packages, you'll run into dependency problems if you're not installing all software from the same version of the same distro. Therefore, if you're installing everything from a distro anyways, just start with that distro and replace the kernel if that's something you're trying to do. On a debian-based system, Everything is tracked by dpkg, including dpkg itself and and very low-level dependencies. Most things depend on libc and you probably already have it installed. That will cause a conflict as it was installed without dpkg, dpkg can't know that it exists on your system and can't verify the version of libc you have is compatible with the package you are trying to install. I think the simplest way is to download the dpkg binary package (dpkg_<version>_<arch>.deb) for your architecture and unzip it manually. Certainly get that working before you make any attempt with apt. If you're using a debian-based host, you can apt download dpkg, otherwise, go get the binaries from the archive directly. You'll need to manually perform on dpkg*.deb what dpkg normally does (the only maintainer script for dpkg is postrm so that's not going to be relevant). Download dpkg_<version>_<arch>.deb Extract contents with ar -x *.deb Extract control.tar.xz with tar -xf Inspect the control file and check that all dependencies are installed Extract data.tar.xz to / After that, you should be able to dpkg -i *.deb on any deb package you install assuming you first install its dependencies installed with dpkg. The general advice is: If you want to use dpkg or apt, use a distribution that comes with it. There are too many things that can go wrong if you don't.
How do install the Debian package manager (dpk and apt) in my custom Linux distribution? [closed]
1,658,759,967,000
I am trying to install radare2 package. I have downloaded the .deb file from https://packages.debian.org/jessie/amd64/multiarch-support/download, and install it via apt: $sudo apt install -f ./libradare2-0.9.6_0.9.6-3.1+deb8u1_amd64.deb, but then: libradare2-0.9.6 : Depends: libradare2-common (>= 0.9.6-3.1+deb8u1) but it is not installable E: Unable to correct problems, you have held broken packages. So I did: $sudo apt install --fix-broken but to no avail. So if there are dependencies, the package depends on, but apt cannot install them, what next? Should I have another source in source.list? my is : deb http://deb.debian.org/debian/ buster main non-free contrib deb-src http://deb.debian.org/debian/ buster main non-free contrib deb http://security.debian.org/debian-security buster/updates main contrib non-free deb-src http://security.debian.org/debian-security buster/updates main contrib non-free # buster-updates, previously known as 'volatile' deb http://deb.debian.org/debian/ buster-updates main contrib non-free deb-src http://deb.debian.org/debian/ buster-updates main contrib non-free none of them has that package?
When you look specifically at radare2 packages, you are attemtping to install a single package and NOT its dependencies with the method you're using. This will cause issues because you're trying two things: You are trying to install a package manually that is NOT in your configured repositories for Buster, and You are not going to be able to get the dependencies properly in Buster because the package does not exist in Buster due to a bug that is policy breaking introduced. Which is why it has not been in the repositories since earlier versions due to a grave-severity security issue that has NOT been fixed and is actively being exploited by upstream There has been zero response to inquiries with the maintainer or Upstream developers on this security issue outlined in Debian Security Bug #950372 and as such due to the upstream actively exploiting this bug, all versions of the radare2 packages have been removed from Debian, except for oldoldstable (which you should not be using). If you really need the radare libraries and packages, you should consider downloading the source from upstream and compiling it, because the Debian packages require a newer libc6 than you will have in Debian Buster (in unstable). At the time of this post, the version of the radare2 source package and its built binaries is 4.3.1+dfsg-1 (4.3.1 upstream). The Debian Package Tracker page for the radare2 source package that builds these binary packages you are trying to install will list current version numbers as well as the currently built binary versions in Unstable. However, this requires a newer version of the C libraries than Buster has, so you're better off installing this manually and manually compiling it from upstream source. Under no circumstances should you use the older 0.9.6 variants of the package as they have gaping security holes (36 of them!) and you may be making your system vulnerable to attack if you use the older library versions as the upstream software developers actively have 'exploit bounties' out there egging people on to actively find and exploit the older software versions! (And to that end it has been decided by the Debian team and others that it is no longer suitable for stable Debian releases anymore, all's detailed in the earlier linked bugs)
apt - how to resolve not installable dependencies?
1,658,759,967,000
I want to have packages installed manually via dpkg -i not being updated. I figured the most elegant way to do this would to pin them to a high priority. The manpage of apt_preferences says Assign [...] priority 990 to the instances that are not installed and belong to the target release. so I guess it should be higher than that. Also: For example, the following record causes APT to assign a high priority to all package instances available from the local site. Package: * Pin: origin "" Pin-Priority: 999 But even with priority 1100 it doesn't work. How can I prevent such packages (edit) from being updated by apt-get dist-upgrade?
The tool you are looking for to complete your task is apt-mark. Use the following command to mark a manually installed [Package] to prevent apt from updating it. apt-mark hold [Package] The command marks the package as held. A held package cannot be installed, upgraded, removed, or purged. You can "unhold" a package with apt-mark unhold [Package] if you need to remove it. Please check out the apt-mark manpage for more information on these tools.
How to prioritize packages installed from files in APT?
1,658,759,967,000
I am creating my own Debian package to install Apache Derby and as part of the install I wish to run a configuration script to set-up some default users. Therefore during the installation I start up the Apache Derby network server and then I test for it's presence by using the 'ping' command of NetworkServerControl class. To allow a short time for the server to start I anticipate the 'ping' command to fail a couple of times so I loop through about 10 times pausing a second between each ping: let retry_count=0 echo "Testing for the Derby network server..." $(which java) -Dderby.system.home=/srv/apache/derby -cp /usr/lib/apache/derby/derbynet.jar org.apache.derby.drda.NetworkServerControl ping -h localhost -p 1527 > /dev/null until [[ $? -eq 0 ]]; do echo "Network server not available." let retry_count+=1 if [[ ${retry_count} -ge 10 ]]; then echo "Network server was not available within ${retry_count} seconds. Terminating install." >&2 exit 1 fi sleep 1 echo "Testing for the Derby network server..." $(which java) -Dderby.system.home=/srv/apache/derby -cp /usr/lib/apache/derby/derbynet.jar org.apache.derby.drda.NetworkServerControl ping -h localhost -p 1527 > /dev/null done However what I have found is that the first ping fails (returning 1) and causes the whole install process to fail: In test_server_up function Sun Sep 15 12:30:27 BST 2019 : Could not connect to Derby Network Server on host localhost, port 1527: Connection refused (Connection refused) dpkg: error processing package derby-deb (--install): installed derby-deb package post-installation script subprocess returned error exit status 1 I have tried assigning the result of the ping command to a variable but I get the same error. Is there anyway to capture the result of a sub-process and prevent it from terminating the installation?
I presume this is in, or called from, your post-inst script. The debian packaging convention is to run shell post-inst etc scripts with set -e, which exits with an error on any uncaptured non-zero exit code. You can "capture" the exit status with, e.g., || or &&, or if/elif, while, or until. See man bash for details (search for -e.*Exit). e.g. ping_count=0 until ping hostname || [ "$ping_count" -gt 5 ]; do sleep 1 # or whatever ping_count+=1 # non-posix. won't work with dash. done Try set +e before the ping (or any other commands that might return an error code that you know you don't care about) and then return to set -e afterwards. NOTE: I very strongly recommend against just getting rid of set -e entirely. If any other program in the post-inst returns with an error code, you (and whoever is installing the package) do want to know about it, and you do want dpkg to know that the install failed.
How to prevent a failed subprocess during Debian package install terminating the installation immediately
1,658,759,967,000
I have a problem installing Pandas under Python 3.7.3 on a MOXA linux computer running Debian 9. It has a Armv7 Cortex-A8 600-1000 MHz processor. I tried: sudo apt update sudo apt ugrpade sudo apt install python3-pandas sudo apt-get install python3-pandas The last two commands have the following error: python3-pandas : Depends: python3-pandas-lib (>= 0.19.2-5.1) but it is not installable) And: sudo pip3 install pandas sudo pip3 install pandas -v (to see in running) (takes ages to install, but eventually stops) I installed every needed package (numpy, matplotlib, setuptools, pytz, python-dateutil, etc) but I still get errors. Also it says: you have held broken packages. When I googled that, the command to list of actual held packages: dpkg --get-selections | grep hold It returns nothing, so there are no held packages? Any ideas? UPDATE: Output of uname -a: Linux AAGCloudWatcher 4.4.0-cip #1 Wed Mar 27 13:53:48 CST 2019 armv7l GNU/Linux
According to this page, python3-pandas-lib is built for arm and arm64 and available in the official stretch repositories. According to your recent update, your system identifies as armv7l which would need the armhf repository branch from Debian. It does not appear that python-pandas is available for armhf in Debian stretch, but is built for jessie and buster. The pip install should attempt to build it for your machine, but there may be some incompatibility that prevents this version from working properly with armv7l which could be why it is not included in Debian stretch.
Installing pandas under python 3.7.3 in debian 9
1,658,759,967,000
I am trying to install Emacs25 package on Ubuntu 16.04 alongside Emacs 24 and Emacs-snapshot (currently Emacs 27.0.50). I ran the following commands sudo add-apt-repository ppa:kelleyk/emacs sudo apt-get update After that I ran sudo apt install emacs25 during which I get this user@user-desktop:$ sudo apt install emacs25 Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: emacs25-common The following NEW packages will be installed: emacs25 emacs25-common 0 upgraded, 2 newly installed, 0 to remove and 132 not upgraded. Need to get 0 B/21.0 MB of archives. After this operation, 90.8 MB of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 298195 files and directories currently installed.) Preparing to unpack .../emacs25-common_92792-c3ff671-emacs-25.2~ubuntu16.04.1_all.deb ... Unpacking emacs25-common (92792-c3ff671-emacs-25.2~ubuntu16.04.1) ... dpkg: error processing archive /var/cache/apt/archives/emacs25-common_92792-c3ff671-emacs-25.2~ubuntu16.04.1_all.deb (--unpack): trying to overwrite '/usr/share/emacs/site-lisp/subdirs.el', which is also in package emacs-snapshot-common 20190326:96618-9a6cba2~ubuntu16.04.1 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Selecting previously unselected package emacs25. Preparing to unpack .../emacs25_92792-c3ff671-emacs-25.2~ubuntu16.04.1_amd64.deb ... Unpacking emacs25 (92792-c3ff671-emacs-25.2~ubuntu16.04.1) ... Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ... Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ... Processing triggers for mime-support (3.59ubuntu1) ... Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for install-info (6.1.0.dfsg.1-5) ... Errors were encountered while processing: /var/cache/apt/archives/emacs25-common_92792-c3ff671-emacs-25.2~ubuntu16.04.1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) How I could troubleshoot this?
You can troubleshoot this using the following error message in the output you’ve quoted: Unpacking emacs25-common (92792-c3ff671-emacs-25.2~ubuntu16.04.1) ... dpkg: error processing archive /var/cache/apt/archives/emacs25-common_92792-c3ff671-emacs-25.2~ubuntu16.04.1_all.deb (--unpack): trying to overwrite '/usr/share/emacs/site-lisp/subdirs.el', which is also in package emacs-snapshot-common 20190326:96618-9a6cba2~ubuntu16.04.1 The installation failed because both emacs-snapshot-common and emacs25-common contain /usr/share/emacs/site-lisp/subdirs.el. There are a number of ways to get past this, but it’s worth considering that the Emacs packages, in spite of the fact that they include a version number in their name, are not designed to be co-installable. (In fact, starting with Debian 10 and Ubuntu 18.10, the packages no longer include the version number in their name.) The cleanest way to fix this it to divert one of the package’s copy of the file; for example, to keep emacs25’s copy: sudo dpkg-divert --package emacs25 --divert /usr/share/emacs/site-lisp/subdirs.el.moved --rename /usr/share/emacs/site-lisp/subdirs.el (the syntax is rather counter-intuitive; see the dpkg-divert manpage for details). This will rename any version of subdirs.el provided by another package than emacs25 to subdirs.el.moved.
Error Installing Emacs25 Package on Ubuntu 16.04
1,658,759,967,000
I have created a binary deb package with dpkg-deb command. It is installable and works. > dpkg-deb --build /test dpkg-deb: building package `xxx' in `test.deb'. Now I want to sign the package, but debsigs failed with errors: > debsigs --sign=maint -k XXX /test.deb no entry data.tar.gz in archive Was it a problem with dpkg-deb? EDIT > ar t /test.deb debian-binary control.tar.gz data.tar.xz _gpgmaint
Your version of dpkg-deb produced a .deb package containing an xz-compressed data.tar, but your version of debsigs doesn’t support that, it only supports gzip-compressed data.tar components. To solve this, there are two possible approaches: upgrade debsigs to 0.1.18 or later (which is widely available, albeit not in Ubuntu Precise or Trusty, which is presumably what you’re using); force dpkg-deb to compress using gzip, by adding -Zgzip to the dpkg-deb command.
debsign: no entry data.tar.gz in archive error
1,547,805,805,000
I'm trying to create a *.deb file from debian using cmake with a mingw cross-compiler. CMake's compiler test fails when using dpkg-buildpackage. Building normally is fine: mkdir build && cd build cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -- The C compiler identification is GNU 6.3.0 -- The CXX compiler identification is GNU 6.3.0 -- Check for working C compiler: /etc/alternatives/i686-w64-mingw32-gcc -- Check for working C compiler: /etc/alternatives/i686-w64-mingw32-gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /etc/alternatives/i686-w64-mingw32-g++ -- Check for working CXX compiler: /etc/alternatives/i686-w64-mingw32-g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Configuring done -- Generating done However when I build this using dpkg-buildpackage it fails to configure: dpkg-buildpackage -uc -us dpkg-buildpackage: info: source package foo dpkg-buildpackage: info: source version 1.0 dpkg-buildpackage: info: source distribution stretch dpkg-buildpackage: info: source changed by $USER dpkg-buildpackage: info: host architecture amd64 dpkg-source --before-build hw fakeroot debian/rules clean dh clean --buildsystem=cmake --parallel dh_testdir -O--buildsystem=cmake -O--parallel dh_auto_clean -O--buildsystem=cmake -O--parallel dh_clean -O--buildsystem=cmake -O--parallel dpkg-source -b hw dpkg-source: info: using source format '3.0 (native)' dpkg-source: info: building sim-honeywell-ease-control in sim-honeywell-ease-control_1.0.tar.xz dpkg-source: info: building sim-honeywell-ease-control in sim-honeywell-ease-control_1.0.dsc debian/rules build make: 'build' is up to date. fakeroot debian/rules binary dh binary --buildsystem=cmake --parallel dh_testdir -O--buildsystem=cmake -O--parallel dh_update_autotools_config -O--buildsystem=cmake -O--parallel dh_auto_configure -O--buildsystem=cmake -O--parallel cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_SYSCONFDIR=/etc -DCMAKE_INSTALL_LOCALSTATEDIR=/var -- The C compiler identification is GNU 6.3.0 -- The CXX compiler identification is GNU 6.3.0 -- Check for working C compiler: /etc/alternatives/i686-w64-mingw32-gcc -- Check for working C compiler: /etc/alternatives/i686-w64-mingw32-gcc -- broken CMake Error at /usr/share/cmake-3.7/Modules/CMakeTestCCompiler.cmake:51 (message): The C compiler "/etc/alternatives/i686-w64-mingw32-gcc" is not able to compile a simple test program. The interesting part of the full log is a failure during linking: /etc/alternatives/i686-w64-mingw32-gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -Wl,-z,relro -Wl,--whole-archive CMakeFiles/cmTC_fc912.dir/objects.a -Wl,--no-whole-archive -o cmTC_fc912.exe -Wl,--out-implib,libcmTC_fc912.dll.a -Wl,--major-image-version,0,--minor-image-version,0 @CMakeFiles/cmTC_fc912.dir/linklibs.rsp /usr/bin/i686-w64-mingw32-ld: unrecognized option '-z' The mingw linker fails to recognize the -z option. When I diff the CMakeCache.txt, I can see that dpkg-buildpakcage adds some linker flags by default: < CMAKE_EXE_LINKER_FLAGS:STRING=-Wl,-z,relro --- > CMAKE_EXE_LINKER_FLAGS:STRING= How can I prevent dpkg-buildpackage from doing this? FYI: my debian/rules file looks like this: #!/usr/bin/make -f %: dh $@ --buildsystem=cmake --parallel
You need to disable the relro hardening configuration; change your debian/rules to #!/usr/bin/make -f export DEB_BUILD_MAINT_OPTIONS = hardening=-relro %: dh $@ --buildsystem=cmake --parallel See the dpkg-buildflags manpage for details. (As an aside, if you’re using compat level 10 or greater, you don’t need --parallel since it’s enabled by default. In many cases you can drop --buildsystem=cmake too since dh will auto-detect it.)
Remove debuild buildsystem=cmake linker flags
1,547,805,805,000
I try to compile softwares with a 32 bits libc, old enough to be compatible with my customers. So I have installed Debian Squeeze (6) 64 bits this last days (so after deprecation date) in a ProXmox container. I have set the archive repositories to allow me to update / install packages, it works. My sources.list is: deb http://archive.debian.org/debian squeeze main contrib non-free deb http://archive.debian.org/debian squeeze-lts main contrib non-free # Backports deb http://archive.debian.org/debian-archive/debian-backports squeeze-backports main contrib non-free # Security deb http://archive.debian.org/debian-security squeeze/updates main contrib non-free I have to say, there was a lot of outdated GPG Keys, and after update, a few are always outdated, they seem to be unsupported anymore. My current version of dpkg is 1.15.11 the original Squeeze versio where the multiarch functionnality is not present. It apears only in 1.16... Good enough, the backports listed upper contain wheezy packages where dpkg is in version 1.16.9 . http://archive.debian.org/debian-archive/debian-backports/pool/main/d/dpkg/ But I am not able to install this backports. When I run the command apt-get install -t squeeze-backports dpkg It responds: Reading package lists... Done Building dependency tree Reading state information... Done dpkg is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. apt-get policy dpkg returns dpkg: Installed: 1.15.11 Candidate: 1.15.11 Version table: *** 1.15.11 0 500 http://archive.debian.org/debian/ squeeze/main amd64 Packages 100 /var/lib/dpkg/status If I ask, it's because I am pretty sure to have set things right. I guess I am on the frontier where archived versions have there limits.
For a 32-bit (i386) build on a 64-bit (amd64) on Debian 6, you shouldn’t need multi-arch; if you install gcc-multilib or g++-multilib (depending on your goal) and compile with gcc -m32 (or g++ -m32) you should get the result you’re after.
Enable 32 bits compilation on Debian squeeze (6) 64 with backports (after deprecation)
1,547,805,805,000
I used the next script from askububtu to automate the download of all installed packages in a fresh debian 9.3 LXDE installation. From here: #!/bin/bash dpkg --get-selections | while read line do package=`echo $line | awk '{print $1}'` mkdir $package cd $package apt-get -q source $package cd .. done My problem is that I get some errors and it downloads a similar but not the wanted package: sh: 1: dpkg-source: not found W: Download is performed unsandboxed as root as file 'libreoffice_5.2.7-1.dsc' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied) E: Unpack command 'dpkg-source --no-check -x libreoffice_5.2.7-1.dsc' failed. Reading package lists... Picking 'libreoffice' as source package instead of 'libreoffice-calc' You can imagine that it downloads 300MB or so every 3-4 minutes (libreoffice) for many times (for almost every dependency of libreoffice)... Does anyone has a better suggestion than that script to automate the source download of the packages used on my system?
There’s a fundamental problem with the script you’re using: it’s based on binary packages, not source packages. That’s why you’re downloading the LibreOffice source multiple times: there are many binary packages built from the same source package... Another problem is that you don’t have dpkg-source installed, so the source packages can’t be extracted. I would use something like this instead: #!/bin/bash dpkg-query -f '${Source}\n' -W | cut -d\ -f1 | sort -u | while read package do mkdir $package pushd $package apt-get -q source $package popd done If you don’t want to extract the source, add -d to the apt-get line, that will avoid the dpkg-source errors.
Debian script to download source of installed packages fails
1,547,805,805,000
I installed some self-built deb packages (PAM) with sudo dpkg --force-all -i /opt/bzr/build-area/*.deb tree is: /opt/bzr/build-area . ├── libpam0g_1.1.8-3ubuntu1_amd64.deb ├── libpam0g-dev_1.1.8-3ubuntu1_amd64.deb ├── libpam-cracklib_1.1.8-3ubuntu1_amd64.deb ├── libpam-doc_1.1.8-3ubuntu1_all.deb ├── libpam-modules_1.1.8-3ubuntu1_amd64.deb ├── libpam-modules-bin_1.1.8-3ubuntu1_amd64.deb ├── libpam-runtime_1.1.8-3ubuntu1_all.deb ├── pam_1.1.8-3ubuntu1_amd64.build ├── pam_1.1.8-3ubuntu1_amd64.changes ├── pam_1.1.8-3ubuntu1.diff.gz ├── pam_1.1.8-3ubuntu1.dsc └── pam_1.1.8.orig.tar.gz Important: What happens when a new official Ubuntu PAM version is released and I run apt dist-upgrade -y? Will it overwrite my own packages? Optional: Do I need --force-all in dpkg -i? Optional: https://code.launchpad.net/~ubuntu-core-dev/pam/ubuntu looks like a "dev branch" to me? Does a "stable branch" exist? How to get it with bzr? Related to: https://unix.stackexchange.com/a/382363/239596
Yes, they will, if they use a higher version number than your packages, unless you adjust your pin priorities appropriately (or hold the packages, as pointed out by cas). Note that the repositories’ packages are liable to overwrite yours if you use the same version number, so you should really increment your version when you rebuild locally (typically “1.1.8-3ubuntu1.1”). No, and you should avoid it unless absolutely necessary. If you think it’s necessary, there’s probably something wrong with your packages and you should fix that instead. That code repository hasn’t been updated since 2014, so I doubt it’s an active development repository. You can see the various pam branches on Launchpad, and clone them using for example bzr branch lp:ubuntu/vivid/pam. The way I go about dealing with this type of situation is as follows: check out the source code (debcheckout or apt-get source) if it’s in a repository, create a new branch with the patch I’m interested in if it’s not, apply the patch manually in both cases, increment the version with an appropriate changelog entry using dch -n (without committing it, to avoid merge issues) build the package and install it (in my case, via a local package repository) When a new version of the package is released, I repeat the above; in the case of a source repository, I rebase the patch instead of starting from scratch.
What happens to self-built packages when I `apt dist-upgrade`?
1,547,805,805,000
I just tried to upgrade Debian using the instructions in this website. The second time I ran upgrade (after rebooting, the first upgrade and dist-upgrade went well) the process stopped while installing gnome-themes-standard-data_3.22.2-2_all.deb with the error unable to open '/usr/share/themes/Adwaita-dark/gtk-3.0/gtk.css.dpkg-new': No such file or directory. Apparently .../Adwaita-dark/gtk-3.0/ is a symbollic link to ../Adwaita/gtk-3.0/ Relevant output: Fix-broken install: root@a:/home/user# LC_ALL=C 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: fonts-freefont-ttf gstreamer0.10-nice gstreamer0.10-plugins-bad libbasicusageenvironment0 libcdaudio1 libchromaprint0 libdirac-encoder0 libdvbpsi9 libgroupsock1 libgstreamer-plugins-bad0.10-0 liblircclient0 liblivemedia23 libmimic0 libpostproc52 libprotobuf9 libslv2-9 libsoundtouch0 libswscale3 libusageenvironment1 libvncclient0 libwildmidi1 libxcb-composite0 vlc-nox Use 'sudo apt autoremove' to remove them. The following additional packages will be installed: aptitude aptitude-common djvulibre-bin gir1.2-gepub-0.4 gir1.2-lokdocview-0.1 glib-networking glib-networking-common glib-networking-services gnome-documents gnome-system-monitor gnome-themes-standard-data libatkmm-1.6-1v5 libbasicusageenvironment1 libcairo-perl libcairomm-1.0-1v5 libclass-c3-xs-perl libcwidget3v5 libdvbpsi10 libebml4v5 libgd-perl libgepub0 libglib-perl libglibmm-2.4-1v5 libgnome2-canvas-perl libgnome2-perl libgnome2-vfs-perl libgnome2-wnck-perl libgoo-canvas-perl libgroupsock8 libgsf-bin libgtk2-imageview-perl libgtk2-unique-perl libgtkmm-2.4-1v5 libgtkmm-3.0-1v5 libjson-xs-perl liblibreofficekitgtk liblivemedia57 liblocale-gettext-perl libmatroska6v5 libmouse-perl libnet-dbus-perl libopenmpt-modplug1 libpangomm-1.4-1v5 libproxy-tools libproxy1v5 libqt5concurrent5 libqt5dbus5 libqt5network5 libqt5opengl5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5script5 libqt5sql5 libqt5sql5-sqlite libqt5test5 libqt5webkit5 libqt5x11extras5 libqt5xml5 libreoffice-gtk3 libreofficekit-data libsndio6.1 libsoprano4 libtext-iconv-perl libtext-soundex-perl libtypes-serialiser-perl libusageenvironment3 libuuid-perl libvlc-bin libvlccore8 libxapian30 libxml-parser-perl phonon-backend-vlc soprano-daemon vlc vlc-bin vlc-data vlc-l10n vlc-nox vlc-plugin-base vlc-plugin-notify vlc-plugin-qt vlc-plugin-samba vlc-plugin-video-output Suggested packages: apt-xapian-index debtags djvulibre-desktop libfont-freetype-perl libcwidget-dev qt5-qmltooling-plugins sndiod xapian-tools virtuoso-minimal libdvdcss2 Recommended packages: vlc-plugin-skins2 vlc-plugin-video-splitter vlc-plugin-visualization The following packages will be REMOVED: libatkmm-1.6-1 libcairomm-1.0-1 libcwidget3 libebml4 libebook-1.2-14 libebook-contacts-1.2-0 libedata-book-1.2-20 libfarstream-0.1-0 libglibmm-2.4-1c2a libgtkmm-2.4-1c2a libgtkmm-3.0-1 libmatroska6 libpangomm-1.4-1 libphonenumber6 libproxy1 vlc-plugin-pulse The following NEW packages will be installed: gir1.2-gepub-0.4 gir1.2-lokdocview-0.1 libatkmm-1.6-1v5 libbasicusageenvironment1 libcairomm-1.0-1v5 libcwidget3v5 libdvbpsi10 libebml4v5 libgepub0 libglibmm-2.4-1v5 libgroupsock8 libgsf-bin libgtkmm-2.4-1v5 libgtkmm-3.0-1v5 liblibreofficekitgtk liblivemedia57 libmatroska6v5 libopenmpt-modplug1 libpangomm-1.4-1v5 libproxy1v5 libqt5x11extras5 libreoffice-gtk3 libreofficekit-data libsndio6.1 libtypes-serialiser-perl libusageenvironment3 libvlc-bin libxapian30 vlc-bin vlc-l10n vlc-plugin-base vlc-plugin-qt vlc-plugin-video-output The following packages will be upgraded: aptitude aptitude-common djvulibre-bin glib-networking glib-networking-common glib-networking-services gnome-documents gnome-system-monitor gnome-themes-standard-data libcairo-perl libclass-c3-xs-perl libgd-perl libglib-perl libgnome2-canvas-perl libgnome2-perl libgnome2-vfs-perl libgnome2-wnck-perl libgoo-canvas-perl libgtk2-imageview-perl libgtk2-unique-perl libjson-xs-perl liblocale-gettext-perl libmouse-perl libnet-dbus-perl libproxy-tools libqt5concurrent5 libqt5dbus5 libqt5network5 libqt5opengl5 libqt5printsupport5 libqt5qml5 libqt5quick5 libqt5script5 libqt5sql5 libqt5sql5-sqlite libqt5test5 libqt5webkit5 libqt5xml5 libsoprano4 libtext-iconv-perl libtext-soundex-perl libuuid-perl libvlccore8 libxml-parser-perl phonon-backend-vlc soprano-daemon vlc vlc-data vlc-nox vlc-plugin-notify vlc-plugin-samba 51 upgraded, 33 newly installed, 16 to remove and 528 not upgraded. 3 not fully installed or removed. Need to get 0 B/43.2 MB of archives. After this operation, 4922 kB of additional disk space will be used. Do you want to continue? [Y/n] Reading changelogs... Done Extracting templates from packages: 100% (Reading database ... 344160 files and directories currently installed.) Preparing to unpack .../gnome-themes-standard-data_3.22.2-2_all.deb ... Unpacking gnome-themes-standard-data (3.22.2-2) over (3.14.2.2-1) ... dpkg: error processing archive /var/cache/apt/archives/gnome-themes-standard-data_3.22.2-2_all.deb (--unpack): unable to open '/usr/share/themes/Adwaita-dark/gtk-3.0/gtk.css.dpkg-new': No such file or directory Errors were encountered while processing: /var/cache/apt/archives/gnome-themes-standard-data_3.22.2-2_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1) Dpkg force install: root@a:/home/user# LC_ALL=C dpkg -i --force-depends /var/cache/apt/archives/gnome-themes-standard-data_3.22.2-2_all.deb (Reading database ... 344160 files and directories currently installed.) Preparing to unpack .../gnome-themes-standard-data_3.22.2-2_all.deb ... Unpacking gnome-themes-standard-data (3.22.2-2) over (3.14.2.2-1) ... dpkg: error processing archive /var/cache/apt/archives/gnome-themes-standard-data_3.22.2-2_all.deb (--install): unable to open '/usr/share/themes/Adwaita-dark/gtk-3.0/gtk.css.dpkg-new': No such file or directory Errors were encountered while processing: /var/cache/apt/archives/gnome-themes-standard-data_3.22.2-2_all.deb Dpkg configure pending: root@a:/home/user# LC_ALL=C dpkg --configure --pending --abort-after=2000 dpkg: dependency problems prevent configuration of gnome-themes-standard:amd64: gnome-themes-standard:amd64 depends on gnome-themes-standard-data (= 3.22.2-2); however: Version of gnome-themes-standard-data on system is 3.14.2.2-1. dpkg: error processing package gnome-themes-standard:amd64 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of gparted: gparted depends on libatkmm-1.6-1v5 (>= 2.24.0); however: Package libatkmm-1.6-1v5 is not installed. gparted depends on libglibmm-2.4-1v5 (>= 2.50.0); however: Package libglibmm-2.4-1v5 is not installed. gparted depends on libgtkmm-2.4-1v5 (>= 1:2.24.0); however: Package libgtkmm-2.4-1v5 is not installed. gparted depends on libpangomm-1.4-1v5 (>= 2.40.0); however: Package libpangomm-1.4-1v5 is not installed. dpkg: error processing package gparted (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of inkscape: inkscape depends on libatkmm-1.6-1v5 (>= 2.24.0); however: Package libatkmm-1.6-1v5 is not installed. inkscape depends on libcairomm-1.0-1v5 (>= 1.12.0); however: Package libcairomm-1.0-1v5 is not installed. inkscape depends on libglibmm-2.4-1v5 (>= 2.50.0); however: Package libglibmm-2.4-1v5 is not installed. inkscape depends on libgtkmm-2.4-1v5 (>= 1:2.24.0); however: Package libgtkmm-2.4-1v5 is not installed. inkscape depends on libpangomm-1.4-1v5 (>= 2.40.0); however: Package libpangomm-1.4-1v5 is not installed. dpkg: error processing package inkscape (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: gnome-themes-standard:amd64 gparted inkscape Dpkg --configure: root@a:/home/user# LC_ALL=C dpkg --configure -a dpkg: dependency problems prevent configuration of gnome-themes-standard:amd64: gnome-themes-standard:amd64 depends on gnome-themes-standard-data (= 3.22.2-2); however: Version of gnome-themes-standard-data on system is 3.14.2.2-1. dpkg: error processing package gnome-themes-standard:amd64 (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of gparted: gparted depends on libatkmm-1.6-1v5 (>= 2.24.0); however: Package libatkmm-1.6-1v5 is not installed. gparted depends on libglibmm-2.4-1v5 (>= 2.50.0); however: Package libglibmm-2.4-1v5 is not installed. gparted depends on libgtkmm-2.4-1v5 (>= 1:2.24.0); however: Package libgtkmm-2.4-1v5 is not installed. gparted depends on libpangomm-1.4-1v5 (>= 2.40.0); however: Package libpangomm-1.4-1v5 is not installed. dpkg: error processing package gparted (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of inkscape: inkscape depends on libatkmm-1.6-1v5 (>= 2.24.0); however: Package libatkmm-1.6-1v5 is not installed. inkscape depends on libcairomm-1.0-1v5 (>= 1.12.0); however: Package libcairomm-1.0-1v5 is not installed. inkscape depends on libglibmm-2.4-1v5 (>= 2.50.0); however: Package libglibmm-2.4-1v5 is not installed. inkscape depends on libgtkmm-2.4-1v5 (>= 1:2.24.0); however: Package libgtkmm-2.4-1v5 is not installed. inkscape depends on libpangomm-1.4-1v5 (>= 2.40.0); however: Package libpangomm-1.4-1v5 is not installed. dpkg: error processing package inkscape (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: gnome-themes-standard:amd64 gparted inkscape Upgrade: root@a:/home/user# LC_ALL=C apt-get upgrade 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: adwaita-icon-theme : Breaks: gnome-themes-standard-data (< 3.18.0-2~) but 3.14.2.2-1 is installed aptitude : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable djvulibre-bin : Depends: libdjvulibre21 (= 3.5.25.4-4+b1) but 3.5.27.1-7 is installed gnome-documents : Depends: libgnome-desktop-3-10 (>= 3.11.90) but it is not installable gnome-system-monitor : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable gnome-themes-standard : Depends: gnome-themes-standard-data (= 3.22.2-2) but 3.14.2.2-1 is installed gparted : Depends: libatkmm-1.6-1v5 (>= 2.24.0) but it is not installed Depends: libglibmm-2.4-1v5 (>= 2.50.0) but it is not installed Depends: libgtkmm-2.4-1v5 (>= 1:2.24.0) but it is not installed Depends: libpangomm-1.4-1v5 (>= 2.40.0) but it is not installed inkscape : Depends: libatkmm-1.6-1v5 (>= 2.24.0) but it is not installed Depends: libcairomm-1.0-1v5 (>= 1.12.0) but it is not installed Depends: libglibmm-2.4-1v5 (>= 2.50.0) but it is not installed Depends: libgtkmm-2.4-1v5 (>= 1:2.24.0) but it is not installed Depends: libpangomm-1.4-1v5 (>= 2.40.0) but it is not installed Recommends: python-scour but it is not installed libatkmm-1.6-1 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable libcairo-perl : Depends: perlapi-5.20.0 but it is not installable libcairomm-1.0-1 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable libclass-c3-xs-perl : Depends: perlapi-5.20.0 but it is not installable libcwidget3 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable libfarstream-0.1-0 : Depends: gstreamer0.10-plugins-good (>= 0.10.29) but it is not installable libgd-perl : Depends: perlapi-5.20.0 but it is not installable libglib-perl : Depends: perlapi-5.20.0 but it is not installable libglibmm-2.4-1c2a : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable libgnome2-canvas-perl : Depends: perlapi-5.20.0 but it is not installable libgnome2-perl : Depends: perlapi-5.20.0 but it is not installable libgnome2-vfs-perl : Depends: perlapi-5.20.0 but it is not installable libgnome2-wnck-perl : Depends: perlapi-5.20.0 but it is not installable libgoo-canvas-perl : Depends: perlapi-5.20.0 but it is not installable libgtk2-imageview-perl : Depends: perlapi-5.20.0 but it is not installable libgtk2-unique-perl : Depends: perlapi-5.20.0 but it is not installable libgtkmm-2.4-1c2a : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable libgtkmm-3.0-1 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable libjson-xs-perl : Depends: perlapi-5.20.0 but it is not installable liblocale-gettext-perl : PreDepends: perlapi-5.20.0 but it is not installable libmouse-perl : Depends: perlapi-5.20.0 but it is not installable libnet-dbus-perl : Depends: perlapi-5.20.0 but it is not installable libpangomm-1.4-1 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable libphonenumber6 : Depends: libboost-date-time1.55.0 but it is not installable libqt5concurrent5 : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libqt5dbus5 : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libqt5network5 : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libqt5opengl5 : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed Depends: libqt5gui5 (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed Depends: libqt5widgets5 (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libqt5printsupport5 : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed Depends: libqt5gui5 (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed Depends: libqt5widgets5 (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libqt5qml5 : Depends: qtbase-abi-5-3-2 but it is not installable libqt5quick5 : Depends: qtbase-abi-5-3-2 but it is not installable libqt5script5 : Depends: qtbase-abi-5-3-2 but it is not installable libqt5sql5 : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libqt5sql5-sqlite : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libqt5test5 : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libqt5webkit5 : Depends: qtbase-abi-5-3-2 but it is not installable libqt5xml5 : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libsoprano4 : Depends: libclucene-core1 (>= 2.3.3.4) but it is not installable libtext-iconv-perl : Depends: perlapi-5.20.0 but it is not installable libtext-soundex-perl : Depends: perlapi-5.20.0 but it is not installable libuuid-perl : Depends: perlapi-5.20.0 but it is not installable libxml-parser-perl : Depends: perlapi-5.20.0 but it is not installable vlc-nox : Depends: libtag1c2a (>= 1.9.1) but it is not installable E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). Dist-upgrade: root@a:/home/user# LC_ALL=C apt-get dist-upgrade 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: adwaita-icon-theme : Breaks: gnome-themes-standard-data (< 3.18.0-2~) but 3.14.2.2-1 is installed aptitude : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable djvulibre-bin : Depends: libdjvulibre21 (= 3.5.25.4-4+b1) but 3.5.27.1-7 is installed gnome-documents : Depends: libgnome-desktop-3-10 (>= 3.11.90) but it is not installable gnome-system-monitor : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable gnome-themes-standard : Depends: gnome-themes-standard-data (= 3.22.2-2) but 3.14.2.2-1 is installed gparted : Depends: libatkmm-1.6-1v5 (>= 2.24.0) but it is not installed Depends: libglibmm-2.4-1v5 (>= 2.50.0) but it is not installed Depends: libgtkmm-2.4-1v5 (>= 1:2.24.0) but it is not installed Depends: libpangomm-1.4-1v5 (>= 2.40.0) but it is not installed inkscape : Depends: libatkmm-1.6-1v5 (>= 2.24.0) but it is not installed Depends: libcairomm-1.0-1v5 (>= 1.12.0) but it is not installed Depends: libglibmm-2.4-1v5 (>= 2.50.0) but it is not installed Depends: libgtkmm-2.4-1v5 (>= 1:2.24.0) but it is not installed Depends: libpangomm-1.4-1v5 (>= 2.40.0) but it is not installed Recommends: python-scour but it is not installed libatkmm-1.6-1 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable libcairo-perl : Depends: perlapi-5.20.0 but it is not installable libcairomm-1.0-1 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable libclass-c3-xs-perl : Depends: perlapi-5.20.0 but it is not installable libcwidget3 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable libfarstream-0.1-0 : Depends: gstreamer0.10-plugins-good (>= 0.10.29) but it is not installable libgd-perl : Depends: perlapi-5.20.0 but it is not installable libglib-perl : Depends: perlapi-5.20.0 but it is not installable libglibmm-2.4-1c2a : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable libgnome2-canvas-perl : Depends: perlapi-5.20.0 but it is not installable libgnome2-perl : Depends: perlapi-5.20.0 but it is not installable libgnome2-vfs-perl : Depends: perlapi-5.20.0 but it is not installable libgnome2-wnck-perl : Depends: perlapi-5.20.0 but it is not installable libgoo-canvas-perl : Depends: perlapi-5.20.0 but it is not installable libgtk2-imageview-perl : Depends: perlapi-5.20.0 but it is not installable libgtk2-unique-perl : Depends: perlapi-5.20.0 but it is not installable libgtkmm-2.4-1c2a : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable libgtkmm-3.0-1 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable libjson-xs-perl : Depends: perlapi-5.20.0 but it is not installable liblocale-gettext-perl : PreDepends: perlapi-5.20.0 but it is not installable libmouse-perl : Depends: perlapi-5.20.0 but it is not installable libnet-dbus-perl : Depends: perlapi-5.20.0 but it is not installable libpangomm-1.4-1 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable libphonenumber6 : Depends: libboost-date-time1.55.0 but it is not installable libqt5concurrent5 : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libqt5dbus5 : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libqt5network5 : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libqt5opengl5 : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed Depends: libqt5gui5 (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed Depends: libqt5widgets5 (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libqt5printsupport5 : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed Depends: libqt5gui5 (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed Depends: libqt5widgets5 (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libqt5qml5 : Depends: qtbase-abi-5-3-2 but it is not installable libqt5quick5 : Depends: qtbase-abi-5-3-2 but it is not installable libqt5script5 : Depends: qtbase-abi-5-3-2 but it is not installable libqt5sql5 : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libqt5sql5-sqlite : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libqt5test5 : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libqt5webkit5 : Depends: qtbase-abi-5-3-2 but it is not installable libqt5xml5 : Depends: libqt5core5a (= 5.3.2+dfsg-4+deb8u2) but 5.7.1+dfsg-3+b1 is installed libsoprano4 : Depends: libclucene-core1 (>= 2.3.3.4) but it is not installable libtext-iconv-perl : Depends: perlapi-5.20.0 but it is not installable libtext-soundex-perl : Depends: perlapi-5.20.0 but it is not installable libuuid-perl : Depends: perlapi-5.20.0 but it is not installable libxml-parser-perl : Depends: perlapi-5.20.0 but it is not installable vlc-nox : Depends: libtag1c2a (>= 1.9.1) but it is not installable E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). Sources.list: deb http://security.debian.org/ stretch/updates main contrib deb-src http://security.debian.org/ stretch/updates main contrib deb http://ftp.debian.org/debian stretch main contrib non-free deb-src http://ftp.debian.org/debian stretch main contrib non-free
/usr/share/themes/Adwaita-dark/gtk-3.0/ was a symbolic link to /usr/share/themes/Adwaita/gtk-3.0/. After removing the symbolic link with sudo rm /usr/share/themes/Adwaita-dark/gtk-3.0/ the package updater created this folder (not as a link anymore) and the installation process worked out well. Creating the folders/file mkdir /usr/share/themes/Adwaita/, mkdir /usr/share/themes/Adwaita/gtk-3.0 or touch /usr/share/themes/Adwaita/gtk-3.0/gtk.css wasn't enough.
Dependency problems upgrading to stretch: unable to open *.dpkg-new
1,547,805,805,000
I would like to know if packages will still get updated in Ubuntu if I remove the meta package that owned it. for example, I would like to remove the hexchat from Ubuntu mate, but it also gets the ubuntu-mate-meta package removed, do other packaged under ubuntu-mate-meta still get updates?
Any package installed with a distribution's package manager will continue to receive updates (assuming updates are made available), regardless of how it was installed. So in your case, all the packages pulled in by ubuntu-mate-meta will continue to receive updates, even if you remove ubuntu-mate-meta. Note that you'll probably need to mark all those packages as "non-automatically installed", using aptitude (the m key) or apt-mark manual, if you want to avoid them being removed next time you run apt-get auto-remove or something similar. Incidentally, ubuntu-mate-meta wasn't removed because the package manager reckoned it was unused; it was removed because it depends on hexchat, so it can't remain installed if hexchat is removed — if you tell the package manager to remove hexchat, it assumes you really want that and will remove ubuntu-mate-meta (after asking for confirmation).
Do applications update without meta packages?
1,547,805,805,000
As our web hosting technician recovered our Linux/Debian squeeze system, I've lost man exetubable. The symptom is: # ls -l /usr/bin/man lrwxrwxrwx 1 root root 17 Oct 11 2011 /usr/bin/man -> ../lib/man-db/man so /usr/bin/man points to /usr/lib/man-db/man # ls -l /usr/lib/man-db/man lrwxrwxrwx 1 root root 13 Aug 12 2012 /usr/lib/man-db/man -> ../../bin/man So I've no more hard man binary, but two redundant man symlinks pointing one to another. My question is, how can I recover the man binary, and from which deb package?
From the man-db package. Just remove the symlinks, and run: apt-get purge man-db apt-get install man-db
Where can I extract or copy man executable
1,547,805,805,000
I'm trying to make an interactive docker container based on a 3rd party docker image where /usr/share/man has been deleted to save layer space. Every file that belongs in that folder is part of an apt package that otherwise works fine. I would like to restore just those deleted manpages for the packages I currently have installed. The way to solve this problem for an individual package is to reinstall it. I could potentially --reinstall every package on the container with something like, apt-get --reinstall install \ $(dpkg --get-selections | awk '$2=="install"{print $1}') but is there a way to selectively make dpkg recreate a deleted folder without having to resort to such a time- and bandwidth-consuming process every time I rebuild?
You will need to reinstall the affected packages because the local image won't have any content to let to repair. However you can potentially minimise the amount of repair needed. You can determine which packages have files in /usr/share/man with a loop such as for pkg in $(dpkg --get-selections | awk '$2=="install" { print $1}') do f=$(dpkg -L $pkg | grep /usr/share/man) if [ -n "$f" ] then echo $pkg has files in /usr/share/man fi done You can then reinstall those packages. We can potentially even limit further to those that are missing by looking at /var/lib/dpkg/info/$pkg.info for the man files and compare to what is missing and only reinstall those. However, at the end of the day, I think you're going to reinstall a lot of packages. On my Jessie install, 703 packages had files in /usr/share/man. That's better than the 2200 packages installed, but still a lot. A local mirror to avoid network traffic seems indicated.
How to recover a deleted folder full of files managed by dpkg?
1,547,805,805,000
I have a problem with a Debian server that I use for multiple purposes. Yesterday I tried to upgrade my packages with a simple apt-get update / upgrade as usual and found everything to be broken : Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Done The following packages have been kept back: owncloud owncloud-config-apache owncloud-server The following packages will be upgraded: python-apt 1 upgraded, 0 newly installed, 0 to remove and 3 not upgraded. 2 not fully installed or removed. Need to get 0 B/171 kB of archives. After this operation, 47.1 kB disk space will be freed. Do you want to continue? [Y/n] perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LC_CTYPE = "UTF-8", LANG = "en_US.UTF-8" are supported and installed on your system. perl: warning: Falling back to a fallback locale ("en_US.UTF-8"). locale: Cannot set LC_CTYPE to default locale: No such file or directory locale: Cannot set LC_ALL to default locale: No such file or directory (Reading database ... 83301 files and directories currently installed.) Preparing to unpack .../python-apt_0.9.3.12_amd64.deb ... /var/lib/dpkg/info/python-apt.prerm: /usr/bin/pyclean: /usr/bin/python: bad interpreter: No such file or directory dpkg: warning: subprocess old pre-removal script returned error exit status 126 dpkg: trying script from the new package instead ... /var/lib/dpkg/tmp.ci/prerm: /usr/bin/pyclean: /usr/bin/python: bad interpreter: No such file or directory dpkg: error processing archive /var/cache/apt/archives/python-apt_0.9.3.12_amd64.deb (--unpack): subprocess new pre-removal script returned error exit status 126 /var/lib/dpkg/info/python-apt.postinst: /usr/bin/pycompile: /usr/bin/python: bad interpreter: No such file or directory dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 126 Errors were encountered while processing: /var/cache/apt/archives/python-apt_0.9.3.12_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) Since then I've tried applying a bunch of solutions including the recommendations of a dpkg --audit as well as suggested solutions here and on other community help websites for similar issues, to no avail. It also appears that even after fixing the locale issue that perl mentions, it reappears if I quit my ssh session and open a new one. Any ideas how I can fix this ? (besides reinstalling from scratch which I'd rather avoid if possible.) Thanks. EDIT (updated): As per requested by @Gilles, here is the result of ls -l /usr/bin/python; ls -lL /usr/bin/python; dpkg -S /usr/bin/python ls: cannot access /usr/bin/python: No such file or directory ls: cannot access /usr/bin/python: No such file or directory python-minimal: /usr/bin/python I have no recollection of ever changing python settings manually.
/var/lib/dpkg/info/python-apt.postinst: /usr/bin/pycompile: /usr/bin/python: bad interpreter: No such file or directory That error indicates that /usr/bin/python is broken in some ways. Most Python scripts won't be able to run. When the python-apt package is installed, it runs a Python script. This fails, so the installation of the package can't complete. Although APT can proceed with other packages even if one fails, this might require running apt-get -f install a few times and might prevent upgrades that shuffle dependencies around. And anyway a broken Python is going to break a lot of software. $ ls -l /usr/bin/python ls: cannot access /usr/bin/python: No such file or directory $ dpkg -S /usr/bin/python python-minimal: /usr/bin/python /usr/bin/python doesn't exist at all. But the packaging system thinks that it's installed. Reinstall the package that contains /usr/bin/python: sudo apt-get --reinstall install python-minimal sudo apt-get -f install If the absence of /usr/bin/python is the only problem, that should repair your system. But whatever caused /usr/bin/python to disappear might have caused other problems. Try to find out what could have caused /usr/bin/python to disappear. This doesn't normally happen if you use dpkg and apt to manage packages. Make sure that if you install any software without using the package manager, it goes under /opt or /usr/local, never directly under /usr.
Debian Jessie - dpkg / apt intall, update and uninstall broken
1,547,805,805,000
Jessie comes with APR (apache runtime portable) as package libapr1 version 1.5.1-3. However, that is the only version that Jessie has (it is also the newest version). I am trying to build the UIMA C++ SDK, which requires an apr version between 1.3.[0-9] or 1.4.[0-9]. I know that Debian Wheezy has apr 1.4.6 (I downloaded the actual package). My questions are: Do I install packages using dpkg, instead of adding Wheezy in my sources? Or should I just add wheezy in my sources? Either via dpkg, or via apt-get, do I risk breaking "stuff" if I install two different versions of the same library? As I understand, Jessie uses apr-1.5.1 for lots of things, so I don't want to mess up my system.
When you install two different versions with dpkg or apt-get, it will not break the system, unless you use the -f option to force installation. Instead it will create an additional entry in your package database. When you install the source manually, make sure to link the programs to the library. For instance link apr-1.4.6 symbolically to /usr/local/lib/apr. Set the programs that use the old library to use the one you just sym-linked. Make sure that the link can be found by the programs, by putting it in a PATH directory.
I need to install two different versions of a library on a Debian-based distro
1,547,805,805,000
Today I installed Archlinux and I tried to install the following package 'dpkg' from the AUR. I tried 2 methods: pacman -S dpkg and after that failed I downloaded the *.tar.gz and tried: pacman -U dpkg.tar.gz At the first option I got the following error: [root@localhost andreas]# pacman -S dpkg Fehler: Ziel nicht gefunden: dpkg and at the second option I got this error: [root@localhost Downloads]# pacman -U dpkg.tar.gz Lade Pakete... Fehler: Fehlende Paket-Metadaten in dpkg.tar.gz Fehler: 'dpkg.tar.gz': Ungültiges oder beschädigtes Paket The error is in German and means "Invalid or Damaged Package". I don't get why pacman can't find the package because it's here: https://aur.archlinux.org/packages/dpkg I'm fairly new to Archlinux, I have mainly used Debian and its Derivates before.
The file dpkg.tar.gz is the instructions to actually build the package. Do this, in the directory in which dpkg.tar.gz resides: tar xf dpkg.tar.gz cd dpkg makepkg I had to resolve some dependencies with pacman -S some-stuff to get makepkg to finish. I was left with a file dpkg-1.16.15-1-x86_64.pkg.tar.xz. That's the package file. You have to do this to install it: pacman -U dpkg-1.16.15-1-x86_64.pkg.tar.xz
How to install the package 'dpkg' from the AUR
1,547,805,805,000
I'm just playing around with Ubuntu 14.04.1 LTS. I installed emacs, and wanted to double check if it was. ~ 1496 $ dpkg --status emacs dpkg-query: package 'emacs' is not installed and no information is available Use dpkg --info (= dpkg-deb --info) to examine archive files, and dpkg --contents (= dpkg-deb --contents) to list their contents. ~ 1497 $ apt-cache show emacs Package: emacs Priority: optional Section: editors Installed-Size: 25 Maintainer: Ubuntu Developers <[email protected]> Original-Maintainer: Rob Browning <[email protected]> Architecture: all Source: emacs-defaults Version: 45.0ubuntu1 Depends: emacs24 | emacs24-lucid | emacs24-nox Filename: pool/main/e/emacs-defaults/emacs_45.0ubuntu1_all.deb Size: 1624 MD5sum: 2648ac76d7058d4a722ae304e474aa06 SHA1: 6667aaf3b043b44f10271b943dbb9dbb9620dbf2 SHA256: cb9185c543841971a754ebf8c6a35396c865171532b407dce5b5447c41cfa232 Description-en: GNU Emacs editor (metapackage) GNU Emacs is the extensible self-documenting text editor. This is a metapackage that will always depend on the latest recommended Emacs release. Description-md5: 21fb7da111336097a2378959f6d6e6a8 Bugs: https://bugs.launchpad.net/ubuntu/+filebug Origin: Ubuntu Supported: 5y Now it's seemed to be installed, but I'm still confused WHY the first command shows "emacs is not installed ....".
I suspect you have installed the emacs24 package instead of the emacs metapackage. Check with: dpkg --status emacs24 The output of this command might also shed some light: dpkg -l | grep '^ii.*emacs'
dpkg --status package_name
1,547,805,805,000
I am running the Weakerth4n Linux operating system on my old Dell d600 laptop I got at Defcon for $80 USD. I have a question about making certain programs (like Virtual Box); this may be as simple as telling me that my specific distro isn't supported, but it's worth a shot. It could be that my Kbuild configuration is somehow messed up, because when I was trying to install ndiswrapper, I first got a Kbuild error from make and then this: (/usr/src/ndiswrapper-1.59# make) make -C utils make[1]: Entering directory `/usr/src/ndiswrapper-1.59/utils' make[1]: Nothing to be done for `all'. make[1]: Leaving directory `/usr/src/ndiswrapper-1.59/utils' make -C driver make[1]: Entering directory `/usr/src/ndiswrapper-1.59/driver' make -C /usr/src/linux-headers-3.7.10blue-ghost1.9 M=/usr/src/ndiswrapper-1.59/driver make[2]: Entering directory `/usr/src/linux-headers-3.7.10blue-ghost1.9' /usr/src/linux-headers-3.7.10blue-ghost1.9/arch/x86/Makefile_32.cpu:2: *** missing separator. Stop. make[2]: Leaving directory `/usr/src/linux-headers-3.7.10blue-ghost1.9' make[1]: *** [modules] Error 2 make[1]: Leaving directory `/usr/src/ndiswrapper-1.59/driver' make: *** [driver] Error 2 So I downloaded the dependencies for VirtualBox as shown in this guide https://www.virtualbox.org/wiki/Linux%20build%20instructions but instead of getting source I just downloaded the .deb file and executed a dpkg -i ./.deb, and installed VirtualBox that way. Then I... :VirtualBox :WARNING: The vboxdrv kernel module is not loaded. Either there is no module available for the current kernel (3.7.10blue-ghost1.9) or it failed to load. Please recompile the kernel module and install it by sudo /etc/init.d/vboxdrv setup You will not be able to start VMs until this problem is fixed. < error > : So I run /etc/init.d/vboxdrv setup and get this :Stopping VirtualBox kernel modules ...done. Uninstalling old VirtualBox DKMS kernel modules ...done. Trying to register the VirtualBox kernel modules using DKMS Error! Bad return status for module build on kernel: 3.7.10blue-ghost1.9 (i686) Consult the make.log in the build directory /var/lib/dkms/vboxhost/4.3.8/build/ for more information. ...failed! (Failed, trying without DKMS) Recompiling VirtualBox kernel modules ...failed! (Look at /var/log/vbox-install.log to find out what went wrong) < error > : I think it's because my arch is supposed to be i386 not i686, then :vim /var/lib/dkms/vboxhost/4.3.8/build/make.log 1 DKMS make.log for vboxhost-4.3.8 for kernel 3.7.10blue-ghost1.9 (i686) 2 Thu Mar 6 13:10:22 PST 2014 3 make: Entering directory `/usr/src/linux-headers-3.7.10blue-ghost1.9' 4 /usr/src/linux-headers-3.7.10blue-ghost1.9/arch/x86/Makefile_32.cpu:2: *** missing separator. Stop. 5 make: Leaving directory `/usr/src/linux-headers-3.7.10blue-ghost1.9' :vim /var/log/vbox-install.log 1 Uninstalling modules from DKMS 2 removing old DKMS module vboxhost version 4.3.8 3 4 ------------------------------ 5 Deleting module version: 4.3.8 6 completely from the DKMS tree. 7 ------------------------------ 8 Done. 9 Attempting to install using DKMS 10 11 Creating symlink /var/lib/dkms/vboxhost/4.3.8/source -> 12 /usr/src/vboxhost-4.3.8 13 14 DKMS: add Completed. 15 16 Kernel preparation unnecessary for this kernel. Skipping... 17 18 Building module: 19 cleaning build area.... 20 make KERNELRELEASE=3.7.10blue-ghost1.9 -C /lib/modules/3.7.10blue-ghost1.9/build M=/var/lib/dkms/vboxhost/4.3.8/build.... 21 0 22 0 23 Failed to install using DKMS, attempting to install without 24 make KBUILD_VERBOSE=1 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 CONFIG_MODULE_SIG= -C /lib/modules/3.7.10blue-ghost1.9/buil 25 /usr/src/linux-headers-3.7.10blue-ghost1.9/arch/x86/Makefile_32.cpu:2: *** missing separator. Stop. 26 make: *** [vboxdrv] Error 2 :uname -r Linux ghostx 3.7.10blue-ghost1.9 #4 SMP Mon Mar 18 20:52:56 EDT 2013 i686 GNU/Linux :whereis virtualbox dkms virtualbox: /usr/bin/virtualbox /usr/lib/virtualbox /usr/share/virtualbox dkms: /usr/src/nvidia-310.40/dkms.conf /usr/src/ndiswrapper-1.56/dkms.conf /usr/src/vboxhost-4.3.8/dkms.conf /usr/sbin/dkms /etc/dkms /usr/lib/dkms /usr/share/man/man8/dkms.8.gz :dpkg --version Debian `dpkg' package management program version 1.15.8.13 (i386). This is free software; see the GNU General Public License version 2 or later for copying conditions. There is NO warranty. :make --version GNU Make 3.81 Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for i486-pc-linux-gnu :vim /usr/src/linux-headers-3.7.10blue-ghost1.9/arch/x86/Makefile_32.cpu # Put here option for CPU selection and depending optimization choice prompt "Processor family" default M686 if X86_32 default GENERIC_CPU if X86_64 config M386 bool "386" depends on X86_32 && !UML ---help--- This is the processor type of your CPU. This information is used for optimizing purposes. In order to compile a kernel that can run on all x86 CPU types (albeit not optimally fast), you can specify "386" here. The kernel will not necessarily run on earlier architectures than the one you have chosen, e.g. a Pentium optimized kernel will run on a PPro, but not necessarily on a i486. Here are the settings recommended for greatest speed: - "386" for the AMD/Cyrix/Intel 386DX/DXL/SL/SLC/SX, Cyrix/TI 486DLC/DLC2, and UMC 486SX-S. Only "386" kernels will run on a 386 class machine. - "486" for the AMD/Cyrix/IBM/Intel 486DX/DX2/DX4 or SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S. - "586" for generic Pentium CPUs lacking the TSC (time stamp counter) register. - "Pentium-Classic" for the Intel Pentium. - "Pentium-MMX" for the Intel Pentium MMX. - "Pentium-Pro" for the Intel Pentium Pro. - "Pentium-II" for the Intel Pentium II or pre-Coppermine Celeron. - "Pentium-III" for the Intel Pentium III or Coppermine Celeron. - "Pentium-4" for the Intel Pentium 4 or P4-based Celeron. - "K6" for the AMD K6, K6-II and K6-III (aka K6-3D). - "Athlon" for the AMD K7 family (Athlon/Duron/Thunderbird). - "Crusoe" for the Transmeta Crusoe series. - "Efficeon" for the Transmeta Efficeon series. - "Winchip-C6" for original IDT Winchip. - "Winchip-2" for IDT Winchips with 3dNow! capabilities. - "GeodeGX1" for Geode GX1 (Cyrix MediaGX). - "Geode GX/LX" For AMD Geode GX and LX processors. - "CyrixIII/VIA C3" for VIA Cyrix III or VIA C3. - "VIA C3-2" for VIA C3-2 "Nehemiah" (model 9 and above). - "VIA C7" for VIA C7. If you dont know what to do, choose "386". config M486 bool "486" depends on X86_32 ---help--- Select this for a 486 series processor, either Intel or one of the compatible processors from AMD, Cyrix, IBM, or Intel. Includes DX, DX2, and DX4 variants; also SL/SLC/SLC2/SLC3/SX/SX2 and UMC U5D or U5S. config M586 bool "586/K5/5x86/6x86/6x86MX" depends on X86_32 ---help--- Select this for an 586 or 686 series processor such as the AMD K5, the Cyrix 5x86, 6x86 and 6x86MX. This choice does not assume the RDTSC (Read Time Stamp Counter) instruction. config M586TSC bool "Pentium-Classic" depends on X86_32 ---help--- Select this for a Pentium Classic processor with the RDTSC (Read Time Stamp Counter) instruction for benchmarking. config M586MMX bool "Pentium-MMX" depends on X86_32 ---help--- Select this for a Pentium with the MMX graphics/multimedia extended instructions. config M686 bool "Pentium-Pro" depends on X86_32 ---help--- Select this for Intel Pentium Pro chips. This enables the use of Pentium Pro extended instructions, and disables the init-time guard against the f00f bug found in earlier Pentiums. config MPENTIUMII bool "Pentium-II/Celeron(pre-Coppermine)" depends on X86_32 ---help--- Select this for Intel chips based on the Pentium-II and pre-Coppermine Celeron core. This option enables an unaligned copy optimization, compiles the kernel with optimization flags tailored for the chip, and applies any applicable Pentium Pro optimizations. config MPENTIUMIII bool "Pentium-III/Celeron(Coppermine)/Pentium-III Xeon" depends on X86_32 ---help--- Select this for Intel chips based on the Pentium-III and Celeron-Coppermine core. This option enables use of some extended prefetch instructions in addition to the Pentium II extensions. config MPENTIUMM bool "Pentium M" depends on X86_32 ---help--- Select this for Intel Pentium M (not Pentium-4 M) notebook chips. config MPENTIUM4 bool "Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon" depends on X86_32 ---help--- Select this for Intel Pentium 4 chips. This includes the Pentium 4, Pentium D, P4-based Celeron and Xeon, and Pentium-4 M (not Pentium M) chips. This option enables compile flags optimized for the chip, uses the correct cache line size, and applies any applicable optimizations. CPUIDs: F[0-6][1-A] (in /proc/cpuinfo show = cpu family : 15 ) Select this for: Pentiums (Pentium 4, Pentium D, Celeron, Celeron D) corename: -Willamette -Northwood -Mobile Pentium 4 -Mobile Pentium 4 M -Extreme Edition (Gallatin) -Prescott -Prescott 2M -Cedar Mill -Presler -Smithfiled Xeons (Intel Xeon, Xeon MP, Xeon LV, Xeon MV) corename: -Foster -Prestonia -Gallatin -Nocona -Irwindale -Cranford -Potomac -Paxville -Dempsey config MK6 bool "K6/K6-II/K6-III" depends on X86_32 ---help--- Select this for an AMD K6-family processor. Enables use of some extended instructions, and passes appropriate optimization flags to GCC. config MK7 bool "Athlon/Duron/K7" depends on X86_32 ---help--- Select this for an AMD Athlon K7-family processor. Enables use of some extended instructions, and passes appropriate optimization flags to GCC. config MK8 bool "Opteron/Athlon64/Hammer/K8" ---help--- Select this for an AMD Opteron or Athlon64 Hammer-family processor. Enables use of some extended instructions, and passes appropriate optimization flags to GCC. config MCRUSOE bool "Crusoe" depends on X86_32 ---help--- Select this for a Transmeta Crusoe processor. Treats the processor like a 586 with TSC, and sets some GCC optimization flags (like a Pentium Pro with no alignment requirements). config MEFFICEON bool "Efficeon" depends on X86_32 ---help--- Select this for a Transmeta Efficeon processor. config MWINCHIPC6 bool "Winchip-C6" depends on X86_32 ---help--- Select this for an IDT Winchip C6 chip. Linux and GCC treat this chip as a 586TSC with some extended instructions and alignment requirements. config MWINCHIP3D bool "Winchip-2/Winchip-2A/Winchip-3" depends on X86_32 ---help--- Select this for an IDT Winchip-2, 2A or 3. Linux and GCC treat this chip as a 586TSC with some extended instructions and alignment requirements. Also enable out of order memory stores for this CPU, which can increase performance of some operations. config MELAN bool "AMD Elan" depends on X86_32 ---help--- Select this for an AMD Elan processor. Do not use this option for K6/Athlon/Opteron processors! config MGEODEGX1 bool "GeodeGX1" depends on X86_32 ---help--- Select this for a Geode GX1 (Cyrix MediaGX) chip. config MGEODE_LX bool "Geode GX/LX" depends on X86_32 ---help--- Select this for AMD Geode GX and LX processors. config MCYRIXIII bool "CyrixIII/VIA-C3" depends on X86_32 ---help--- Select this for a Cyrix III or C3 chip. Presently Linux and GCC treat this chip as a generic 586. Whilst the CPU is 686 class, it lacks the cmov extension which gcc assumes is present when generating 686 code. Note that Nehemiah (Model 9) and above will not boot with this kernel due to them lacking the 3DNow! instructions used in earlier incarnations of the CPU. config MVIAC3_2 bool "VIA C3-2 (Nehemiah)" depends on X86_32 ---help--- Select this for a VIA C3 "Nehemiah". Selecting this enables usage of SSE and tells gcc to treat the CPU as a 686. Note, this kernel will not boot on older (pre model 9) C3s. config MVIAC7 bool "VIA C7" depends on X86_32 ---help--- Select this for a VIA C7. Selecting this uses the correct cache shift and tells gcc to treat the CPU as a 686. config MPSC bool "Intel P4 / older Netburst based Xeon" depends on X86_64 ---help--- Optimize for Intel Pentium 4, Pentium D and older Nocona/Dempsey Xeon CPUs with Intel 64bit which is compatible with x86-64. Note that the latest Xeons (Xeon 51xx and 53xx) are not based on the Netburst core and shouldnt use this option. You can distinguish them using the cpu family field in /proc/cpuinfo. Family 15 is an older Xeon, Family 6 a newer one. config MCORE2 bool "Core 2/newer Xeon" ---help--- Select this for Intel Core 2 and newer Core 2 Xeons (Xeon 51xx and 53xx) CPUs. You can distinguish newer from older Xeons by the CPU family in /proc/cpuinfo. Newer ones have 6 and older ones 15 (not a typo) config MATOM bool "Intel Atom" ---help--- Select this for the Intel Atom platform. Intel Atom CPUs have an in-order pipelining architecture and thus can benefit from accordingly optimized code. Use a recent GCC with specific Atom support in order to fully benefit from selecting this option. config GENERIC_CPU bool "Generic-x86-64" depends on X86_64 ---help--- Generic x86-64 CPU. Run equally well on all x86-64 CPUs. endchoice config X86_GENERIC bool "Generic x86 support" depends on X86_32 ---help--- Instead of just including optimizations for the selected x86 variant (e.g. PII, Crusoe or Athlon), include some more generic optimizations as well. This will make the kernel perform better on x86 CPUs other than that selected. This is really intended for distributors who need more generic optimizations. # # Define implied options from the CPU selection here config X86_INTERNODE_CACHE_SHIFT int default "12" if X86_VSMP default X86_L1_CACHE_SHIFT config X86_CMPXCHG def_bool y depends on X86_64 || (X86_32 && !M386) config X86_L1_CACHE_SHIFT int default "7" if MPENTIUM4 || MPSC default "6" if MK7 || MK8 || MPENTIUMM || MCORE2 || MATOM || MVIAC7 || X86_GENERIC || GENERIC_CPU default "4" if MELAN || M486 || M386 || MGEODEGX1 default "5" if MWINCHIP3D || MWINCHIPC6 || MCRUSOE || MEFFICEON || MCYRIXIII || MK6 || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || M586 || MVIAC3_2 || MGEODE_LX config X86_XADD def_bool y depends on !M386 config X86_PPRO_FENCE bool "PentiumPro memory ordering errata workaround" depends on M686 || M586MMX || M586TSC || M586 || M486 || M386 || MGEODEGX1 ---help--- Old PentiumPro multiprocessor systems had errata that could cause memory operations to violate the x86 ordering standard in rare cases. Enabling this option will attempt to work around some (but not all) occurrences of this problem, at the cost of much heavier spinlock and memory barrier operations. If unsure, say n here. Even distro kernels should think twice before enabling this: there are few systems, and an unlikely bug. config X86_F00F_BUG def_bool y depends on M586MMX || M586TSC || M586 || M486 || M386 config X86_INVD_BUG def_bool y depends on M486 || M386 config X86_WP_WORKS_OK def_bool y depends on !M386 config X86_INVLPG def_bool y depends on X86_32 && !M386 config X86_BSWAP def_bool y depends on X86_32 && !M386 config X86_POPAD_OK def_bool y depends on X86_32 && !M386 config X86_ALIGNMENT_16 def_bool y depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MELAN || MK6 || M586MMX || M586TSC || M586 || M486 || MVIAC3_2 || MGEODEGX1 config X86_INTEL_USERCOPY def_bool y depends on MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M586MMX || X86_GENERIC || MK8 || MK7 || MEFFICEON || MCORE2 config X86_USE_PPRO_CHECKSUM def_bool y depends on MWINCHIP3D || MWINCHIPC6 || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MK8 || MVIAC3_2 || MVIAC7 || MEFFICEON || MGEODE_LX || MCORE2 || MATOM config X86_USE_3DNOW def_bool y depends on (MCYRIXIII || MK7 || MGEODE_LX) && !UML config X86_OOSTORE def_bool y depends on (MWINCHIP3D || MWINCHIPC6) && MTRR # # P6_NOPs are a relatively minor optimization that require a family >= # 6 processor, except that it is broken on certain VIA chips. # Furthermore, AMD chips prefer a totally different sequence of NOPs # (which work on all CPUs). In addition, it looks like Virtual PC # does not understand them. # # As a result, disallow these if we're not compiling for X86_64 (these # NOPs do work on all x86-64 capable chips); the list of processors in # the right-hand clause are the cores that benefit from this optimization. # config X86_P6_NOP def_bool y depends on X86_64 depends on (MCORE2 || MPENTIUM4 || MPSC) config X86_TSC def_bool y depends on ((MWINCHIP3D || MCRUSOE || MEFFICEON || MCYRIXIII || MK7 || MK6 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || M586MMX || M586TSC || MK8 || MVIAC3_2 || MVIAC7 || MGEODEGX1 || MGEODE_LX || MCORE2 || MATOM) && !X86_NUMAQ) || X86_64 config X86_CMPXCHG64 def_bool y depends on X86_PAE || X86_64 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MATOM # this should be set for all -march=.. options where the compiler # generates cmov. config X86_CMOV def_bool y depends on (MK8 || MK7 || MCORE2 || MPENTIUM4 || MPENTIUMM || MPENTIUMIII || MPENTIUMII || M686 || MVIAC3_2 || MVIAC7 || MCRUSOE || MEFFICEON || X86_64 || MATOM || MGEODE_LX) config X86_MINIMUM_CPU_FAMILY int default "64" if X86_64 default "6" if X86_32 && X86_P6_NOP default "5" if X86_32 && X86_CMPXCHG64 default "4" if X86_32 && (X86_XADD || X86_CMPXCHG || X86_BSWAP || X86_WP_WORKS_OK) default "3" config X86_DEBUGCTLMSR def_bool y depends on !(MK6 || MWINCHIPC6 || MWINCHIP3D || MCYRIXIII || M586MMX || M586TSC || M586 || M486 || M386) && !UML menuconfig PROCESSOR_SELECT bool "Supported processor vendors" if EXPERT ---help--- This lets you choose what x86 vendor support code your kernel will include. config CPU_SUP_INTEL default y bool "Support Intel processors" if PROCESSOR_SELECT ---help--- This enables detection, tunings and quirks for Intel processors You need this enabled if you want your kernel to run on an Intel CPU. Disabling this option on other types of CPUs makes the kernel a tiny bit smaller. Disabling it on an Intel CPU might render the kernel unbootable. If unsure, say N. config CPU_SUP_CYRIX_32 default y bool "Support Cyrix processors" if PROCESSOR_SELECT depends on M386 || M486 || M586 || M586TSC || M586MMX || (EXPERT && !64BIT) ---help--- This enables detection, tunings and quirks for Cyrix processors You need this enabled if you want your kernel to run on a Cyrix CPU. Disabling this option on other types of CPUs makes the kernel a tiny bit smaller. Disabling it on a Cyrix CPU might render the kernel unbootable. If unsure, say N. config CPU_SUP_AMD default y bool "Support AMD processors" if PROCESSOR_SELECT ---help--- This enables detection, tunings and quirks for AMD processors You need this enabled if you want your kernel to run on an AMD CPU. Disabling this option on other types of CPUs makes the kernel a tiny bit smaller. Disabling it on an AMD CPU might render the kernel unbootable. If unsure, say N. config CPU_SUP_CENTAUR default y bool "Support Centaur processors" if PROCESSOR_SELECT ---help--- This enables detection, tunings and quirks for Centaur processors You need this enabled if you want your kernel to run on a Centaur CPU. Disabling this option on other types of CPUs makes the kernel a tiny bit smaller. Disabling it on a Centaur CPU might render the kernel unbootable. If unsure, say N. config CPU_SUP_TRANSMETA_32 default y bool "Support Transmeta processors" if PROCESSOR_SELECT depends on !64BIT ---help--- This enables detection, tunings and quirks for Transmeta processors You need this enabled if you want your kernel to run on a Transmeta CPU. Disabling this option on other types of CPUs makes the kernel a tiny bit smaller. Disabling it on a Transmeta CPU might render the kernel unbootable. If unsure, say N. config CPU_SUP_UMC_32 default y bool "Support UMC processors" if PROCESSOR_SELECT depends on M386 || M486 || (EXPERT && !64BIT) ---help--- This enables detection, tunings and quirks for UMC processors You need this enabled if you want your kernel to run on a UMC CPU. Disabling this option on other types of CPUs makes the kernel a tiny bit smaller. Disabling it on a UMC CPU might render the kernel unbootable. If unsure, say N. apt sources.list 1 deb http://ftp.us.debian.org/debian squeeze main 2 deb-src http://ftp.us.debian.org/debian squeeze main 3 4 deb http://ftp.us.debian.org/debian squeeze-updates main 5 deb-src http://ftp.us.debian.org/debian squeeze-updates main 6 7 deb http://security.debian.org/ squeeze/updates main 8 deb-src http://security.debian.org/ squeeze/updates main 9 10 deb http://repository.spotify.com stable non-free 11 12 #deb http://ftp.us.debian.org/debian squeeze main 13 #deb-src http://ftp.us.debian.org/debian squeeze main 14 15 #deb http://ftp.us.debian.org/debian squeeze-updates main 16 #deb-src http://ftp.us.debian.org/debian squeeze-updates main 17 18 # remastersys: 19 # deb http://www.geekconnection.org/remastersys/repository squeeze/ 20 21 # Squeezy Bullshit: 22 # deb http://ftp.de.debian.org/debian squeeze main non-free 23 24 #deb http://www.debian-multimedia.org squeeze main non-free 25 #deb-src http://www.debian-multimedia.org squeeze main non-free Results: :apt-get install linux-headers-($uname -r) Reading package lists... Done Building dependency tree Reading state information... Done linux-headers-3.7.10blue-ghost1.9 is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. :apt-cache search virtualbox imvirt - detects several virtualizations libimvirt-perl - Perl module for detecting several virtualizations libvirt-bin - the programs for the libvirt library libvirt-dev - development files for the libvirt library libvirt-doc - documentation for the libvirt library libvirt0-dbg - library for interfacing with different virtualization systems libvirt0 - library for interfacing with different virtualization systems python-libvirt - libvirt Python bindings virtualbox-ose-dbg - x86 virtualization solution - debugging symbols virtualbox-ose-dkms - x86 virtualization solution - kernel module sources for dkms virtualbox-ose-fuse - x86 virtualization solution - virtual filesystem virtualbox-ose-guest-dkms - x86 virtualization solution - guest addition module source for dkms virtualbox-ose-guest-source - x86 virtualization solution - guest addition module source virtualbox-ose-guest-utils - x86 virtualization solution - non-X11 guest utilities virtualbox-ose-guest-x11 - x86 virtualization solution - X11 guest utilities virtualbox-ose-qt - x86 virtualization solution - Qt based user interface virtualbox-ose-source - x86 virtualization solution - kernel module source virtualbox-ose - x86 virtualization solution - base binaries xmount - tool to crossmount between multiple input and output harddisk images virtualbox-4.3 - Oracle VM VirtualBox :apt-get install virutalbox Reading package lists... Done Building dependency tree Reading state information... Done virtualbox-4.3 is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Sounds like you have not installed the kernel headers which are needed for compiling imodules. I've never used Weakerth4n but it seems to be a Debian derivative so try sudo apt-get install linux-headers-$(uname -r) Then try sudo /etc/init.d/vboxdrv setup again. Also, you really don't need this, virtualbox is in the Debian repos so you should be able to install it using apt-get just like any other package: sudo apt-get install virtualbox virtualbox-dkms
Linux Debian Squeezy Distro: Weakerth4n, Kconfig && make issues
1,547,805,805,000
I'm having to deal with a Debian server, which initially was Squeeze, I believe, but where administrator enabled several distributions: deb http://mirror.yandex.ru/debian/ stable main contrib non-free deb http://mirror.yandex.ru/debian/ testing main contrib non-free deb http://security.debian.org/ testing/updates main contrib non-free deb http://mirror.yandex.ru/debian/ unstable main contrib non-free deb http://mirror.yandex.ru/debian/ experimental main contrib non-free and specified in /etc/apt/apt.conf: APT::Default-Release "testing";. As a result, when I'm asking aptitude or apt about state of a certain package it bears controversial testimony: me@server: aptitude search emboss i A emboss - european molecular biology open software suite me@server: aptitude show emboss Package: emboss New: yes State: not installed Automatically installed: yes ... apt-cache show emboss shows information on 4 copies of the package of interest ("emboss"), out of which one copy contains line Status: install ok installed, which means that it is installed, I assume. Package: emboss Status: install ok installed Priority: optional Section: science Installed-Size: 4020 Maintainer: Debian Med Packaging Team <[email protected]> Architecture: amd64 Version: 6.3.1-6 Depends: emboss-lib (= 6.3.1-6), libc6 (>= 2.7), libexpat1 (>= 1.95.8), libfontconfig1 (>= 2.8.0), libfreetype6 (>= 2.2.1), libgd2-noxpm (>= 2.0.36~rc1~dfsg) | libgd2-xpm (>= 2.0.36~rc1~dfsg), libhpdf-2.1.0 (>= 2.1.0+dfsg), libjpeg62 (>= 6b1), libmysqlclient16 (>= 5.1.21-1), libpng12-0 (>= 1.2.13-4), libpq5 (>= 8.4~0cvs20090328), libx11-6, libxpm4, zlib1g (>= 1:1.1.4), emboss-data (= 6.3.1-6) Recommends: primer3, dialign Suggests: emboss-doc, emboss-test, embassy, clustalw Description: the european molecular biology open software suite EMBOSS is a free Open Source software analysis package specially developed for the needs of the molecular biology (e.g. EMBnet) user community. The software automatically copes with data in a variety of formats and even allows transparent retrieval of sequence data from the web. Also, as extensive libraries are provided with the package, it is a platform to allow other scientists to develop and release software in true open source spirit. EMBOSS also integrates a range of currently available packages and tools for sequence analysis into a seamless whole. EMBOSS breaks the historical trend towards commercial software packages. Homepage: http://emboss.sourceforge.net My questions are: 1) How do I know, from which distribution (stable, testing, unstable, experimental) currently installed version of package was taken? How do I refer to it in commands (e.g. in dpkg -L)? 2) How aptitude commands (show and search) choose, which version of the package they should report? Why algorithms of show and search differ? P.S. Please, don't reply that creating a mix of distributions is a bad practice. I totally agree, but still have to deal with that machine.
apt-cache policy packagename_here can tell you which version of a package is available in which repository.
Understanding aptitude's behavior on a machine with multiple archives enabled
1,547,805,805,000
When I run apt-get -f install, I get the following abnormal output: Setting up cups (1.5.0-8) ... start: Job failed to start invoke-rc.d: initscript cups, action "start" failed. dpkg: error processing cups (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: cups E: Sub-process /usr/bin/dpkg returned an error code (1) I'm running under Ubuntu Oneiric Ocelot, x64. I'm not sure where to start to debug this. I appreciate any suggestions any of you may have.
Something is wrong with the configuration of CUPS (network printing infrastructure for Linux). If CUPS is not the problem you're trying to fix, you can work around it for now by removing CUPS (apt-get remove cups), and then re-trying the apt-get -f install. If you're interested in diagnosing the CUPS problem, you can try a couple things to figure out what's going on. apt-get is effectively running start cups (older Ubuntu and other distros would be running /etc/init.d/cups start or service cups start). You can run that manually to see if it says anything useful (probably not). Check for recently changed logs (ls -ltra /var/log) and see if any of them provide hints (often daemon programs like CUPS will write any error or warnings to a log file). Also, check the cups configuration file /etc/cups/cupsd.conf and see if anything looks incorrect. Presumably this didn't happen out of the blue, though. What was going wrong that inspired you to run apt-get -f install in the first place?
"invoke-rc.d: initscript cups, action "start" failed." while configure cups
1,547,805,805,000
OS: LMDE 5 (based on Debian 11 Bullseye) To keep the system tidy, I use separate files to overrides the original distribution/developer configuration files wherever possible. This also prevents problems when the developer makes changes to the original config and keeps my settings safe. etc... For Unattended-Upgrades, the original configuration of /etc/apt/apt.conf.d/50unattended-upgrades: Unattended-Upgrade::Origins-Pattern { // "origin=Debian,codename=${distro_codename}-updates"; // "origin=Debian,codename=${distro_codename}-proposed-updates"; "origin=Debian,codename=${distro_codename},label=Debian"; "origin=Debian,codename=${distro_codename},label=Debian-Security"; "origin=Debian,codename=${distro_codename}-security,label=Debian-Security"; I replaced it with the file 51unattended-upgrades: Unattended-Upgrade::Origins-Pattern { "site=myrepo.example.com" // "origin=Debian,codename=${distro_codename}-updates"; // "origin=Debian,codename=${distro_codename}-proposed-updates"; // "origin=Debian,codename=${distro_codename},label=Debian"; // "origin=Debian,codename=${distro_codename},label=Debian-Security"; // "origin=Debian,codename=${distro_codename}-security,label=Debian-Security"; I thought the entire original section would be replaced with my section and UU would only update myrepo.example.com. But it turns out that all 4 repositories are active: "site=myrepo.example.com" "origin=Debian,codename=${distro_codename},label=Debian" "origin=Debian,codename=${distro_codename},label=Debian-Security" "origin=Debian,codename=${distro_codename}-security,label=Debian-Security" How can I disable all other repos and only have myrepo active without changing the original 50unattended-upgrades?
The configuration file /etc/apt/apt.conf.d/50unattended-upgrades isn't directly part of the package unattended-upgrades. Upgrades of this file are managed by its install scripts through helper tools (mostly dpkg-maintscript-helper and ucf --three-way --debconf-ok as seen for example in the postinst file): among other things it checks if the file was altered before replacing it with a new maintainer version (and will usually prompt about this with the default of keeping the altered version). The original reference is safely stored at /usr/share/unattended-upgrades/50unattended-upgrades. Having told all this, options can be: change directly 50unattended-upgrades: Debian will respect the change and prompt for what to do (with an initial default of "keep changed version") if needed. copy it into an other file (51unattended-upgrades) and empty this file (but keep it). As above, Debian will respect the change etc. Or there's a specific APT-related way for APT configurations: Use specific apt.conf(5) syntax to forget a former tree, and then replace it with newer values. This is documented in apt.conf(5) (emphases mine): [...] #clear is used to erase a part of the configuration tree. The specified element and all its descendants are erased. (Note that these lines also need to end with a semicolon.) The #clear command is the only way to delete a list or a complete scope. Reopening a scope (or using the syntax described below with an appended ::) will not override previously written entries. Options can only be overridden by addressing a new value to them - lists and scopes can't be overridden, only cleared. Documentation is a bit scarce. By trial-and-error tests (more easily done on the needrestart package's configuration) it's: #clear Some::Tree; and also "Directives can only be done at the top level", ie: it must be called on a fully qualified scope outside of any scope, rather than within a scope to be applied on a sub-scope. So the 51unattended-upgrades file could start with: #clear Unattended-Upgrade::Origins-Pattern; to reset the list to an empty list before repopulating it with what follows in this file. Then it's possible to not have to change 50unattended-upgrades at all and still use its other default settings if any. Whatever method 1. 2. or 3. in use, the administrator will still have to check what changes appear between two Debian release version (major) upgrades. Eg: security repository URL schema had a change between Debian 10 and Debian 11: this would have had to be adapted manually when (re)defining Unattended-Upgrade::Origins-Pattern after an upgrade from Debian 10 to Debian 11 (doesn't apply for OP's specific case which intends to disallow security upgrades too).
Unattended-Upgrades configuration for custom repo only
1,547,805,805,000
I understand I can use DPkg::Pre-Invoke to run a script/command before apt does it's thing. DPkg::Pre-Invoke { "/tmp/pre-invoke.sh"; }; In my script, I want to get the full apt command that was executed. For example, if I run apt install funky then, inside my script, I want to be able to see the calling command was apt install funky, or install funky. Is this possible?
I found a way to get the information I am after but I don't like it -- it is too hacky. I feel like there is a better way. I am only sharing this in case nobody else can tell me a better way. Essentially I walk up the current processes process tree until I find the one whose command is apt. # we need to work up the process tree to find the apt command that triggered the call to this script # get the initial PPID PARENT_PID=${PPID} # trim leading spacess PARENT_PID="${PARENT_PID## }" # if the command for this PPID is not apt while [ "$(ps -ho comm "${PARENT_PID}")" != "apt" ] ; do # go up one level PARENT_PID=$(ps -ho ppid "${PARENT_PID}") PARENT_PID="${PARENT_PID## }" done APT_CMD="$(ps -ho args "${PARENT_PID}")"
How can I get the current apt command called in a DPkg::Pre-Invoke script?
1,547,805,805,000
When I explored the /var folder, I found the /var/lib/dpkg/info folder, which interested me. I made a package with the name kgdeb, and I looked for a file that had the kgdeb name. I found it, and this file name was kgdeb.list. I looked at this file using Vim, and saw that it contained the output of the dpkg -L kgdeb command. Now, I want to know: Is the dpkg -L command using /var/lib/dpkg/info?
Yes, dpkg -L package uses the list of files stored in /var/lib/dpkg/info/package.list (replace package as appropriate). You can add content to a .list file to verify: cd /var/lib/dpkg/info sudo cp zutils.list{,.bak} echo /some/random/file | sudo tee -a zutils.list dpkg -L zutils sudo mv zutils.list{.bak,} (replacing zutils throughout with a package you have installed). You’ll see /some/random/file listed as belonging to the package, even if the file doesn’t actually exist.
Is the "dpkg -L" command uisng "/var/lib/dpkg/info"?
1,547,805,805,000
Hi guys i recently installed Virtualbox on my Windowsfx 10 laptop. Before when i had Windows 10 on my laptop Virtualbox runned perfect. But since i did a fresh install of Windowsfx 10. And try to run a VM on Virtualbox this is the result i get...... Failed to open a session for the virtual machine Boentoe. The virtual machine 'Boentoe' has terminated unexpectedly during startup with exit code 1 (0x1). Result Code: NS_ERROR_FAILURE (0x80004005) Component: MachineWrap Interface: IMachine {85632c68-b5bb-4316-a900-5eb28d3413df} My os root@Windows-Fabor:/home/mohamedazizi# lsb_release -a No LSB modules are available. Distributor ID: Windowsfx Description: Windowsfx 10 Release: 10 Codename: ulyana This is my sources list root@Windows-Fabor:/home/mohamedazizi# cat /etc/apt/sources.list #deb cdrom:[Windowsfx 10 _Helloa_ - Release amd64 20200823]/ focal contrib 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 http://ppa.launchpad.net/wseverin/ppa/ubuntu focal main deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian buster contrib This error i got everytime when i try to install Virtualbox Extensions pack with sudo apt install virtualbox-ext-pack 0%... Progress state: NS_ERROR_FAILURE VBoxManage: error: Failed to install "/usr/share/virtualbox-ext-pack/Oracle_VM_V irtualBox_Extension_Pack-6.1.16.vbox-extpack" VBoxManage: error: The installer failed with exit code 1: VBoxExtPackHelperApp: error: World writable: '/usr/lib' VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component ExtPac kManagerWrap, interface IExtPackManager VBoxManage: error: Context: "RTEXITCODE handleExtPack(HandlerArg*)" at line 1424 of file VBoxManageMisc.cpp Installation error: License key incorrect or unknown problem during installation . dpkg: error processing package virtualbox-ext-pack (--configure): installed virtualbox-ext-pack package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: virtualbox-ext-pack E: Sub-process /usr/bin/dpkg returned an error code (1) My virtualbox version root@Windows-Fabor:/home/mohamedazizi# VBoxManage -v 6.1.16_Ubuntur140961 My Virtualbox config root@Windows-Fabor:~/.config/VirtualBox# ls -l root@Windows-Fabor:~/.config/VirtualBox# ls -l total 112 -rw------- 1 root root 1184 Feb 1 14:21 compreg.dat -rw------- 1 root root 1493 Feb 1 16:20 selectorwindow.log -rw------- 1 root root 1089 Feb 1 14:42 selectorwindow.log.1 -rw------- 1 root root 1089 Feb 1 14:35 selectorwindow.log.2 -rw------- 1 root root 1562 Feb 1 14:27 selectorwindow.log.3 -rw------- 1 root root 4334 Feb 1 16:41 VBoxSVC.log -rw------- 1 root root 5097 Feb 1 16:21 VBoxSVC.log.1 -rw------- 1 root root 3916 Feb 1 16:14 VBoxSVC.log.2 -rw------- 1 root root 3916 Feb 1 16:13 VBoxSVC.log.3 -rw------- 1 root root 3916 Feb 1 15:43 VBoxSVC.log.4 -rw------- 1 root root 3915 Feb 1 14:42 VBoxSVC.log.5 -rw------- 1 root root 3915 Feb 1 14:38 VBoxSVC.log.6 -rw------- 1 root root 3915 Feb 1 14:28 VBoxSVC.log.7 -rw------- 1 root root 5388 Feb 1 14:28 VBoxSVC.log.8 -rw------- 1 root root 3800 Feb 1 14:21 VBoxSVC.log.9 -rw------- 1 root root 1690 Feb 1 16:20 VirtualBox.nope -rw------- 1 root root 1608 Feb 1 16:20 VirtualBox.xml -rw------- 1 root root 30001 Feb 1 14:21 xpti.dat root@Windows-Fabor:~# ls -ld /usr/lib drwxrwxrwx 147 root root 12288 Aug 25 03:05 /usr/lib I would really appreciate any help.
Linux mint Ulyana is based on Ubuntu Focal Fossa Change the following line: deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian buster contrib to (use eoan codename): deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian eoan contrib Then remove the installed virtualbox and run: sudo apt update sudo apt-get install virtualbox-6.1 sudo apt install virtualbox-ext-pack The main problem is solved from @Freddy comment: The permissions should be drwxr-xr-x, that seems to be the cause for the failed installation. Try sudo chmod go-w /usr/lib and then sudo apt install virtualbox-ext-pack. I hope this is the only directory with wrong permissions.
VIrtualbox: NS_ERROR_FAILURE
1,547,805,805,000
We have a product based on a Raspberry Pi/Raspbian and use Debian packages to roll out upgrades to the software (written in Python). I'm having an issue with getting a new package installing correct, specifically with providing a working downgrade path. I'm a regular user of Debian, but new to the world of package management. Our package has a few files and scripts in /usr/local/bin. However, these files are not part of the DEBIAN folder of the package. They are copied onto the SD card during production of our product. The package I am creating now needs to replace one of these files, so I created a DEBIAN/usr/local/bin folder in the package with the new file in. This works fine for upgrading with my new package, but when downgrading, dpkg deletes the new file and tries to delete the /usr/local/bin folder, because as far as it is concerned it they didn't previously exist. The file is required by the old version of the package and so it fails to correctly install and run. I have tried using the pre\post inst\rm scripts in the new package to make a copy of the file on install and copy it back afterwards on removal, but my understanding is that the ordering of the operations means this will not succeed, as the deletion occurs after the new package has run all of its scripts. Is there a way to prevent deletion of this file during a downgrade? I hope I have made the problem clear.
My solution was pretty much that suggested by @muru in comments: Put the new files in /opt/appname/bin in the package In postinst, backup files in /usr/local/bin and replace with symlinks to /opt/appname/bin. In postrm, remove the symlinks and restore the backups, if they exist.
How to handle files that should exist after a dpkg downgrade but are deleted instead
1,547,805,805,000
I am currently changing my Linux client from Ubuntu 16.04 to Debian 9.6, and I am trying to setup LDAP client authentication to debian machine. While setup, I noticed that the following command does not exist on debian sudo dpkg-reconfigure ldap-auth-config To setup Debian LDAP, I have no clue how to configure.
On Debian you'll probably want to apt install nslcd and configure it with your LDAP details (or dpkg-reconfigure nslcd if already installed), then install/(re)configure libnss-ldapd for including the LDAP data into the name database and finally libpam-ldapd to enable the PAM LDAP module, if you use PAM for authorization. Equivalently, edit /etc/nslcd.conf (then reload nslcd), /etc/nsswitch.conf and /etc/pam.d/common-auth (or some other service file if you don't need generic coverage across all PAM services). See also man pam-auth-update in case the defaults don't fit you. Once the above works, consider apt install unscd for better performance, but don't forget that this cache will have only delayed consistency with your LDAP database.
ldap on debian, and ubuntu
1,547,805,805,000
I was updating my linux mint 18.3 to linux mint 19. The error I get is Cannot set LC_ALL to default locale: No such file or directory. Then I Restarted my System, after that I can't open the terminal. I used Ctrl+Alt+F3 to run command line and fixing the LC_ALL error by using the command sudo dpkg-reconfigure locales and sudo aptitude install locales and it worked. Then I tried to install terminal by using the command apt install gnome-terminal but it gives the error Setting up install-info (6.5.0.dfsg.1-2) ... /usr/sbin/update-info-dir: 5: /etc/environment: Syntax error: Unterminated quoted string dpkg: error processing package install-info (--configure): subprocess installed post-installation script returned error exit status 2 Errors were encountered while processing: install-info E: Sub-process /usr/bin/dpkg returned an error code (1) I tried to resolve that using this https://askubuntu.com/a/920076/842467 but nothing happened.
The thing about error messages is that they tell you what's wrong. Your error message clearly says that there is an unterminated quoted string in /etc/environment. Once you read that, you should investigate that file to see if it looks odd with regards to double quotes. In a comment, you mention that your /etc/environment file has the contents: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games" :/usr/java/jre1.8.0_171/bin" JAVA_HOME="/usr/java/jre1.8.0_171" (or something similar, formatting is difficult in comments). Here, you can clearly see that the :/usr/java/jre1.8.0_171/bin" bit at the end of the first line looks out of place (and a space too many). You, or a script, have edited the file and messed up the PATH. That line now contains an unbalanced double quote. My guess is that the PATH should be set as: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/java/jre1.8.0_171/bin"
Syntax error: Unterminated quoted string
1,547,805,805,000
I'm running the latest Debian (Stretch/9.3.x) and preparing my system to install the latest PHP. I removed all pre-installed PHP packages except php-common. While invoking apt-get remove php-common I get the error as follows Removing php-common (1:49) ... Failed to stop phpsessionclean.timer: Unit phpsessionclean.timer not loaded. dpkg: error processing package php-common (--remove): subprocess installed pre-removal script returned error exit status 5 /usr/bin/deb-systemd-helper: error: unable to read phpsessionclean.timer Failed to get unit file state for phpsessionclean.timer: No such file or directory phpsessionclean.timer is a disabled or a static unit, not starting it. Errors were encountered while processing: php-common E: Sub-process /usr/bin/dpkg returned an error code (1) After some digging I tried dpkg --purge php-common and get this one Removing php-common (1:49) ... Failed to stop phpsessionclean.timer: Unit phpsessionclean.timer not loaded. dpkg: error processing package php-common (--purge): subprocess installed pre-removal script returned error exit status 5 /usr/bin/deb-systemd-helper: error: unable to read phpsessionclean.timer Failed to get unit file state for phpsessionclean.timer: No such file or directory phpsessionclean.timer is a disabled or a static unit, not starting it. Errors were encountered while processing: php-common In fact it's quiet the same. dpkg --verify php-common ??5?????? /lib/systemd/system/phpsessionclean.service ??5?????? /lib/systemd/system/phpsessionclean.timer These files are really missing. But currently I don't know how to solve this. There's no help with apt-get -f purge nor dpkg --remove --force-all.
As mentioned by @GAD3R I edited /var/lib/dpkg/status and removed the whole php-common entry. Thereafter I run dpkg --configure -a The updates / (dist-)upgrades are running well now. Edit (2018-01-09) My purpose on wiping all default php-packages was to install PHP 7.2. While the php-common package is a dependency it was reinstalled but now the phpsessionclean.service works properly as well. Edit (2018-01-09) While digging in my system for other broken packages I found this article https://raphaelhertzog.com/2011/02/21/debian-cleanup-tip-4-find-broken-packages-and-reinstall-them/ and reinstalled all found packages. But there was a package colord with a missing colord.service. So I did the same mentioned here and it worked like a charm.
removing package php-common fails on "phpsessionclean.timer"
1,547,805,805,000
I've copied a dpkg-status file backup from /var/backups to /var/lib/dpkg/status, but I would like to restore the status file to what it was before the copy. Will status-old in /var/lib/dpkg/status contain a copy of the status file before it was overwritten?
Compare the date when you modified /var/lib/dpkg/status, to the modification date of /var/lib/dpkg/status-old, by running the command ls -lt /var/lib/dpkg/ | grep status-old this will show you when /var/lib/dpkg/status-old was modified last. Just wanted to add this really nice answer in context to this question:Why you should not mess with /var/lib/ files.
When is /var/lib/dpkg/status-old created?
1,547,805,805,000
What is the correct preparation procedure before: sudo apt-get dist-upgrade ? My current setting follows: sudo dpkg --configure -a sudo apt-get install --fix-broken sudo apt-get update I wonder if this is the right sequence?
Supposing, the HP engineers have it right, their Pre-depend steps when installing hplip are: Under normal circumstances I don't recommend using --yes or --force-yes, though. Re-writen from the image, without --yes and --force-yes: sudo dpkg --configure -a sudo apt-get install -f sudo apt-get update
Correct preparation procedure before major system upgrade
1,547,805,805,000
I am trying to write a script where I have an if statement that has to check if a specific folder contains a package with specific extensions. If so, it then has to unpack it. if [ installation = "1" ]; then if ls /usr/local/src grep -qF ".tar.gz"; then tar -zxvf $package #it has to unpack the package elif ls /usr/local/src grep -qF ".tar.bz2"; then tar -xvfj $package #it has to unpack the package fi ./configure elif [ installation = "2" ]; then dpkg -i $package #it has to install the deb package fi Can it be written in this way? The $package is not used, but I've written it to show you what I mean. I don't know how to let it know that it has to unpack/install the founded folder with the extension .tar.gz or .tar.bz2 or .deb
something like this? #!/bin/bash cd /usr/local/src if [ installation = "1" ]; then for package in *.tar.gz do tar -zxvf "${package}" done for package in *.tar.bz2 do tar -xvfj "$package" #it has to unpack the package done ./configure elif [ installation = "2" ]; then dpkg -i "$package" #it has to install the deb package fi
Checking an output for specific extentions in if statement
1,547,805,805,000
I am learning about Dockerfile and had not worked with curl before. When running this Dockerfile . The terminal output gives: And then: Googleing around tells me that there was an interactive dialog which could not be handled. The last command I saw in the terminal output was Step 7 : RUN apt-get install curl -y && ... which starts on line 15 to line 39 How am I suppose to deal with this? Thanks edit One of the answers in the link in the comments give a pointer to ubuntu man page, after reading the man page, I am not sure how to incorporate this solution in my case. Any help? thx edit 2 The accepted answer suggests to use ARG DEBIAN_FRONTEND=noninteractive. How do I incorporate this in my Dcokerfile? thx
You have three options: ignore the messages as they seem to be non-fatal. replace every RUN apt-get install ... with RUN DEBIAN_FRONTEND=noninteractive apt-get install ... add ARG DEBIAN_FRONTEND=noninteractive after the FROM ... line at the top. Using option 3 the first few lines of you linked dockerfile should look like this: FROM ubuntu:14.04 ARG DEBIAN_FRONTEND=noninteractive MAINTAINER Stephen Pope, [email protected] read more about ARG: https://docs.docker.com/engine/reference/builder/#/arg source: https://stackoverflow.com/questions/22466255/is-it-possibe-to-answer-dialog-questions-when-installing-under-docker
debconf error messages from apt-get install line in Dockerfile
1,547,805,805,000
I want to set Chromium my default internet browser i.e. Chromium is being launched as the primary internet browser from other applications and that I do not receive the notification about Chromium not being the default internet browser at its startups. I think changing the priority to the highest and set it default internet browser can be the ways to do it. I am not sure what manual/auto are about in update-alternatives of internet browsers. Fig. 1 My view when starting each time Chromium where it asks each time if it can be the default browser (Yes, I want it), but Chrome keeps being the default internet browser despite of the following attempts in update-alternatives Before root@masi:/home/masi# update-alternatives --config gnome-www-browser There are 3 choices for the alternative gnome-www-browser (providing /usr/bin/gnome-www-browser). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/bin/google-chrome-stable 200 auto mode * 1 /usr/bin/chromium 40 manual mode 2 /usr/bin/firefox-esr 70 manual mode 3 /usr/bin/google-chrome-stable 200 manual mode Press enter to keep the current choice[*], or type selection number: ^C I do unsuccessfully where I try to increase Chromium's priority to 250 # http://askubuntu.com/a/620983/25388 root@masi:/home/masi# update-alternatives --install /usr/bin/x-www-browser x-www-browser chromium 250 update-alternatives: error: alternative path is not absolute as it should be: chromium After (= Before) root@masi:/home/masi# update-alternatives --config gnome-www-browser There are 3 choices for the alternative gnome-www-browser (providing /usr/bin/gnome-www-browser). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/bin/google-chrome-stable 200 auto mode * 1 /usr/bin/chromium 40 manual mode 2 /usr/bin/firefox-esr 70 manual mode 3 /usr/bin/google-chrome-stable 200 manual mode Testing Grochmal's proposal I run root@masi:/home/masi# update-alternatives --install /usr/bin/x-www-browser x-www-browser /usr/bin/chromium 250 update-alternatives: using /usr/bin/chromium to provide /usr/bin/x-www-browser (x-www-browser) in auto mode Privous log seems to be ok but not the output when seeing the priority root@masi:/home/masi# update-alternatives --config gnome-www-browser There are 3 choices for the alternative gnome-www-browser (providing /usr/bin/gnome-www-browser). Selection Path Priority Status ------------------------------------------------------------ 0 /usr/bin/google-chrome-stable 200 auto mode * 1 /usr/bin/chromium 40 manual mode 2 /usr/bin/firefox-esr 70 manual mode 3 /usr/bin/google-chrome-stable 200 manual mode Press enter to keep the current choice[*], or type selection number: ^C OS: Debian 8.5 64 bit Hardware: Asus Zenbook UX303UA Linux kernel 4.6
There are several (unrelated) questions in this, depending on definition of default; and each of those has its own solutions. for launching in Desktop Environment, browser which will be started is usually specified in Debian alternatives system as stated in question (and is already set to Chromium!). of course if user has created shortcut to specific app instead of x-www-browser then alternatives won't be used and shortcut need to changed manually according to that DE for opening from certain programs (like MUAs), attachments will be opened according to mailcap(5), see that manual page how to override for example text/html etc. (See also /etc/mime.types for maping local extensions to MIME types) some apps will use xdg-open(1) for determining with what to open files. other apps yet will have its own lists (for example, in Firefox you'll have about:preferences#content URL to configure with what to open some MIME type, in mc you'll have Menu / Command / Edit extension file to determune what happens when you click on .html file etc) For the Chromium not being the default internet browser message, disable broken check in Menu / Settings / Settings / Default browser or see this question
Why failing to increase Chromium's priority and set it default internet browser in Debian?
1,547,805,805,000
I'm trying to install the Redox-OS files via curl -sf https://raw.githubusercontent.com/redox-os/redox/master/bootstrap.sh -o bootstrap.sh && bash -e bootstrap.sh (as referenced in the Book) and I get the Unable to locate package libc6-dev-i386. When installing the libc6-dev-i386 via packages.ubuntu.com and using the GUI package installer, I receive Error: Wrong architecture 'amd64'. Using dpkg and apt-get I also receive Unable to locate package.... I've tried using dpkg --force-all as referenced in a few Stack Overflow articles, but to no avail. I am running LXLE Linux 14.04.4 32-bit. How can I install libc6-dev-i386?
The "wrong architecture 'amd64'" error is because you tried to install a 64-bit ("amd64") package on a 32-bit ("i386") system. The libc6-dev-i386 package is sort of a strange one because it's built only for 64-bit systems, but it actually contains 32-bit software. It's meant to help with compiling 32-bit programs on 64-bit systems. Since you're running a 32-bit system, libc6-dev is the package you need. That contains the necessary headers and libraries for compiling 32-bit programs. (On a 64-bit system, libc6-dev provides files for compiling 64-bit programs, which is why there's also a libc6-dev-i386 package with the 32-bit files.) Your bootstrap.sh script has the name libc6-dev-i386 hard-coded in it, which means the script assumes it's being run on a 64-bit system. The simplest thing to do is probably to just edit the script and change libc6-dev-i386 to libc6-dev, then run it again.
Error: Wrong architecture 'amd64' & Unable to locate package libc6-dev-i386 [Install libc6-dev-i386]
1,453,479,828,000
I need rabbitmq-server installed on Ubuntu. Rabbitmq-server tries to start itself on install, and on many dpkg and apt-get commands thereafter. (Having it run on install is intentional, according to the instructions.) On this box, rabbitmq server can't start, and it takes about a minute to give up. I don't want to fix that. I want to make it not try to start whenever I run, say apt-get install something-not-related-to-rabbitmq When I do that, not only does it take an extraordinarily long time to install the package, but it also exits with 100, even if the package itself installed fine. Here's a snippet of what happens: $ sudo apt-get install fortune Reading package lists... Done -- SNIP -- Unpacking fortunes-min (1:1.99.1-7) ... Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Setting up rabbitmq-server (3.6.0-1) ... * Starting message broker rabbitmq-server * FAILED - check /var/log/rabbitmq/startup_\{log, _err\} [fail] invoke-rc.d: initscript rabbitmq-server, action "start" failed. dpkg: error processing package rabbitmq-server (--configure): subprocess installed post-installation script returned error exit status 1 Setting up librecode0:amd64 (3.6-21) ... Setting up fortune-mod (1:1.99.1-7) ... Setting up fortunes-min (1:1.99.1-7) ... Processing triggers for libc-bin (2.19-0ubuntu6.6) ... Errors were encountered while processing: rabbitmq-server E: Sub-process /usr/bin/dpkg returned an error code (1) $ echo $? 100 I'd rather not uninstall it, as I do eventually plan to get around to using it. But frankly, I think it's a little bit nuts that it hijacks my dpkg, and I would appreciate some help killing that little misfeature with fire.
An easy way to fix this is to make the post-installation start a no-op. The rabbitmq-server.postinst is located in /var/lib/dpkg/info, like all the other postinst scripts, and the jessie version contains the lines: # Automatically added by dh_installinit if [ -x "/etc/init.d/rabbitmq-server" ]; then update-rc.d rabbitmq-server defaults >/dev/null invoke-rc.d rabbitmq-server start || exit $? fi Just comment out that entire section, and nothing will happen. Or you can try just commenting out invoke-rc.d rabbitmq-server start || exit $.
Defeat rabbitmq-server dpkg autostart
1,453,479,828,000
apt-get update && apt-get upgrade You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: libxrender1 : Breaks: libxrender1:i386 (!= 1:0.9.7-1+deb7u1) but 1:0.9.7-1+deb7u1+b1 is installed libxrender1:i386 : Breaks: libxrender1 (!= 1:0.9.7-1+deb7u1+b1) but 1:0.9.7-1+deb7u1 is installed E: Unmet dependencies. Try using -f. apt-get -f install > # apt-get -f 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: libasound2:i386 libasound2-plugins:i386 libasyncns0:i386 libaudio2:i386 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libavcodec53:i386 libavutil51:i386 libcap2:i386 libcups2:i386 libdbus-1-3:i386 libdirac-encoder0:i386 libexpat1:i386 libffi5:i386 libflac8:i386 libfontconfig1:i386 libfreetype6:i386 libgcrypt11:i386 libglib2.0-0:i386 libgnutls26:i386 libgpg-error0:i386 libgsm1:i386 libgssapi-krb5-2:i386 libgstreamer-plugins-base0.10-0:i386 libgstreamer0.10-0:i386 libice6:i386 libjack-jackd2-0:i386 libjpeg62 libjpeg8:i386 libjson0:i386 libk5crypto3:i386 libkeyutils1:i386 libkrb5-3:i386 libkrb5support0:i386 liblcms1:i386 libmng1:i386 libmp3lame0:i386 libogg0:i386 libopenjpeg2:i386 liborc-0.4-0:i386 libp11-kit0:i386 libpcre3:i386 libpng12-0:i386 libpulse0:i386 libqt4-dbus:i386 libqt4-network:i386 libqt4-xml:i386 libqtcore4:i386 libqtdbus4:i386 libqtgui4:i386 libqtwebkit4:i386 libsamplerate0:i386 libschroedinger-1.0-0:i386 libsm6:i386 libsndfile1:i386 libspeex1:i386 libspeexdsp1:i386 libsqlite3-0:i386 libssl1.0.0:i386 libstdc++6:i386 libtasn1-3:i386 libtheora0:i386 libtiff4:i386 libva1:i386 libvorbis0a:i386 libvorbisenc2:i386 libvpx1:i386 libwrap0:i386 libx11-6:i386 libx11-xcb1:i386 libx264-123:i386 libxau6:i386 libxcb1:i386 libxdmcp6:i386 libxext6:i386 libxi6:i386 libxml2:i386 libxrender1:i386 libxss1:i386 libxt6:i386 libxtst6:i386 libxv1:i386 libxvidcore4:i386 Use 'apt-get autoremove' to remove them. The following extra packages will be installed: libxrender1 libxrender1:i386 The following packages will be upgraded: libxrender1 libxrender1:i386 2 upgraded, 0 newly installed, 0 to remove and 133 not upgraded. 1 not fully installed or removed. Need to get 0 B/65.4 kB of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y Reading changelogs... Done dpkg: warning: 'ldconfig' not found in PATH or not executable dpkg: warning: 'start-stop-daemon' not found in PATH or not executable dpkg: error: 2 expected programs not found in PATH or not executable Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin E: Sub-process /usr/bin/dpkg returned an error code (2) edit: If I try: apt-get remove --purge libxrender1:i386 It just gives me the same error as above. Any suggestions how I could solve that problem? Thank you
This is a known bug. See Debian bug report 782505. Briefly, this is a security fix gone wrong. Less briefly, the package libxrender1 for the archs i386 and amd64 have different contents for the shared changelog file /usr/share/doc/libxrender1/changelog.Debian.gz. This is of course not allowed by dpkg. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782505#17 has a suggestion for a temporary workaround that worked for me. A possibly simpler alternative is suggested by https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782505#27, namely apt pinning. This will hopefully be fixed by the security team soon.
Debian dpkg error > libxrender1
1,453,479,828,000
I have installed package_a with version 1.0. How to configure package control script for package_b (e.g version 1.1) to automatically replace package_a? tried (as described in 7.6.2): Package: package_b Version: 1.1 Conflicts: package_a Provides: package_a Replaces: package_a with and without version (<< 1.1, on Replaces and Conflicts) but with no success. Package is in repository and apt-get install package_b works as expected. But package will not detected as an upgrade. P.S. also seen Method 2, but it seems only works on dist-upgrade (not tested).
It's not supposed to work on apt-get upgrade. The reason is that it's not a straight-forward upgrade. In this case, apt has to remove package_a and install package_b for it to do an "upgrade", and apt will only do direct upgrades (new version of an installed package and any additional dependencies installed) when running apt-get upgrade. apt-get dist-upgrade, on the other hand, will allow removals of a package to satisfy dependencies and upgrade packages, which is what you would have to do here. Also, if you specify package_a (<< 1.0), this will not match package_a with a version of 1.0, and apt probably won't install package_b.
Rename Debian package automatically pulled by apt-get upgrade
1,453,479,828,000
I've tried to install oracle-java7-installer package from custom repository onto Ubuntu 12. It was failed during executing some post-installation script. So. I want just to rollback it and proceed with another solutions (to install java 7 jdk). I've tried to make UPDATED with set -x > sudo aptitude remove oracle-java7-installer The following packages will be REMOVED: oracle-java7-installer 0 packages upgraded, 0 newly installed, 1 to remove and 47 not upgraded. Need to get 0 B of archives. After unpacking 82.9 kB will be freed. (Reading database ... 61748 files and directories currently installed.) Removing oracle-java7-installer ... + uname -m + arch=amd64 + dld=x64 + J_INSTALL_DIR=/usr/lib/jvm/java-7-oracle + [ remove = remove ] + [ -d /usr/lib/jvm/java-7-oracle/man/man1 ] + basename /usr/lib/jvm/java-7-oracle/bin/* + name=* + [ ! -f /usr/bin/* -o -L /usr/bin/* ] + update-alternatives --remove bin boot dev etc home initrd.img lib lib64 lost+found media mnt opt proc raid root run sbin selinux srv sys tmp usr var vmlinuz /usr/lib/jvm/java-7-oracle/bin/* update-alternatives: error: unknown argument `dev' dpkg: error processing oracle-java7-installer (--remove): subprocess installed pre-removal script returned error exit status 2 No apport report written because MaxReports is reached already Downloading... --2012-10-24 17:53:33-- http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz Resolving download.oracle.com (download.oracle.com)... 80.239.148.219, 80.239.148.216 Connecting to download.oracle.com (download.oracle.com)|80.239.148.219|:80... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz [following] --2012-10-24 17:53:33-- https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-x64.tar.gz Resolving edelivery.oracle.com (edelivery.oracle.com)... 2.22.42.174 Connecting to edelivery.oracle.com (edelivery.oracle.com)|2.22.42.174|:443... connected. HTTP request sent, awaiting response... 302 Moved Temporarily Location: http://download.oracle.com/errors/download-fail-1505220.html [following] --2012-10-24 17:53:33-- http://download.oracle.com/errors/download-fail-1505220.html Connecting to download.oracle.com (download.oracle.com)|80.239.148.219|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 5307 (5.2K) [text/html] Saving to: `./jdk-7u3-linux-x64.tar.gz' 0K ..... 100% 466M=0s 2012-10-24 17:53:33 (466 MB/s) - `./jdk-7u3-linux-x64.tar.gz' saved [5307/5307] Download done. sha256sum mismatch jdk-7u3-linux-x64.tar.gz Oracle JDK 7 is NOT installed. dpkg: error while cleaning up: subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: oracle-java7-installer E: Sub-process /usr/bin/dpkg returned an error code (1) A package failed to install. Trying to recover: > sudo aptitude search oracle-java7-installer Cd oracle-java7-installer - Sun Java(TM) Development Kit (JDK) 7 What I can do with that? Is it possible to rollback to the previous state without trying to deinstall broken package?? So. I understand from output that scripts inside package are wrong. they failed to download tar.gz from Oracle site and failed to install due to that. Also it does not handle properly remove commande and trying to install it again when I want to remove package. The basic question - is it possible to just rollback that package without running scripts? F.e. like in windows "System restore"? Or I should do this manually? P.S. lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.1 LTS Release: 12.04 Codename: precise P.P.S sh -x /var/lib/dpkg/info/oracle-java7-installer.prerm + set -e + uname -m + arch=amd64 + dld=x64 + J_INSTALL_DIR=/usr/lib/jvm/java-7-oracle + [ = remove ] + [ = deconfigure ] + exit 0
That package appears to be buggy and of poor quality. The way to work around the buggy code in the maintainer scripts is to simply replace them with a noop script that will return true. Replace /var/lib/dpkg/info/oracle-java7-installer.prerm and /var/lib/dpkg/info/oracle-java7-installer.postrm with the following: #!/bin/sh exit 0 You should be able to remove the packages once the buggy maintainer scripts are replaced.
Ubuntu Could not purge package
1,453,479,828,000
I'm trying to understand how the creation of packages (rpm, deb, dpkg) work and what the architecture supports and doesn't. Right now I struggle figuring out what happens when the installation or upgrade of a package fails at different points of the process -ie, error on a scriptlet, not enough disk space (is this checked before starting?)-. From my current understanding, there's no automatic rollback to a previous working version if there was any. So my question would be, how do packages deal with this scenarios? Aren't scriptlets used at all to backup files and restore them post transaction if some error occurred? (I coudln't find examples so far) Thank you.
For Debian (and typically, derivatives), this is described in the Debian Policy chapter on maintainer scripts and the corresponding flowcharts. Errors are handled in combination by dpkg (the tool which handles package extraction etc.) and maintainer scripts. When upgrading a package: the existing package’s pre-removal script is called the new package’s pre-installation script is called the new package’s files are unpacked the existing package’s post-removal script is called the existing package’s files are removed the new package’s post-installation script is called At any point, errors are handled, and various maintainer scripts are invoked with “undo” parameters to revert the changes made in previous steps. Ultimately, the package can end up in one of the following states: fully installed in the new version (when everything goes well) fully installed in the existing version (when something fails but all the changes could be backed out) unpacked, needing configuration failed, needing re-installation For many packages, the default handling is sufficient, and no help from maintainer scripts is required. Other packages are much more complex, e.g. those with databases and schema changes between versions (see the slapd maintainer scripts for example); in some cases they won’t actually handle aborted upgrades themselves, and will instead leave a backup of the existing state and ask the administrator to sort the situation out.
Package installation failure and rollback options
1,453,479,828,000
I am still on Debian Buster, which has old libraries in its repository. I am unable to use newer software, because for example, they require a libc.so.6 library with version GLIBC_2.30, which doesn't exist in the buster main repository. People write that you shouldn't mix and match packages from different repositories, so does that mean I have to install a newer Debian version altogether?
Usually when you use an older version of an operating system, you're limited to older software and libraries that perhaps were current at the time of the OS version's release. In some cases you can install non-conflicting newer versions of some libraries, but by and large support goes the other way -- old libraries are usually provided for newer operating systems rather than the other way around. A newer version is highly recommended. Debian Buster stopped getting security update in June 2022 (though I believe it gets LTS for a while longer).
Do you have to install newer Debian versions to use newer software?
1,453,479,828,000
I'm installing the fcgiwrap package on the nginx Docker image (based on Debian Bullseye), and some files seem to be missing. This is probably something obvious, but I can't find an explanation, here is everything I tried: 1. Building a Docker image with the package FROM nginx:latest RUN apt-get update \ && apt-get -q install -y \ fcgiwrap \ && rm -rf /var/lib/apt/lists/* After running (i.e. docker run -it my-image /bin/bash), if I list /usr/share/doc/fcgiwrap I can only see a copyright file and empty examples folder. 2. Run base image and install directly docker run -it nginx /bin/bash then apt install fcgiwrap, files still missing. 3. Run base image and install with dpkg docker run -it nginx /bin/bash then: apt-get install -d fcgiwrap cd /var/cache/apt/archives, shows: fcgiwrap_1.1.0-12_amd64.deb libfcgi0ldbl_2.4.2-2_amd64.deb partial libfcgi-bin_2.4.2-2_amd64.deb lock spawn-fcgi_1.6.4-2_amd64.deb dpkg --contents fcgiwrap_1.1.0-12_amd64.deb, shows: drwxr-xr-x root/root 0 2018-12-09 15:58 ./ drwxr-xr-x root/root 0 2018-12-09 15:58 ./etc/ drwxr-xr-x root/root 0 2018-12-09 15:58 ./etc/init.d/ -rwxr-xr-x root/root 7231 2016-07-09 22:42 ./etc/init.d/fcgiwrap drwxr-xr-x root/root 0 2018-12-09 15:58 ./lib/ drwxr-xr-x root/root 0 2018-12-09 15:58 ./lib/systemd/ drwxr-xr-x root/root 0 2018-12-09 15:58 ./lib/systemd/system/ -rw-r--r-- root/root 273 2018-12-09 15:58 ./lib/systemd/system/fcgiwrap.service -rw-r--r-- root/root 114 2018-12-09 15:58 ./lib/systemd/system/fcgiwrap.socket drwxr-xr-x root/root 0 2018-12-09 15:58 ./usr/ drwxr-xr-x root/root 0 2018-12-09 15:58 ./usr/sbin/ -rwxr-xr-x root/root 26776 2018-12-09 15:58 ./usr/sbin/fcgiwrap drwxr-xr-x root/root 0 2018-12-09 15:58 ./usr/share/ drwxr-xr-x root/root 0 2018-12-09 15:58 ./usr/share/doc/ drwxr-xr-x root/root 0 2018-12-09 15:58 ./usr/share/doc/fcgiwrap/ -rw-r--r-- root/root 825 2016-07-09 20:50 ./usr/share/doc/fcgiwrap/README.Debian -rw-r--r-- root/root 3018 2018-12-09 15:58 ./usr/share/doc/fcgiwrap/changelog.Debian.gz -rw-r--r-- root/root 1483 2017-08-05 16:19 ./usr/share/doc/fcgiwrap/copyright drwxr-xr-x root/root 0 2018-12-09 15:58 ./usr/share/doc/fcgiwrap/examples/ -rw-r--r-- root/root 501 2016-07-09 22:42 ./usr/share/doc/fcgiwrap/examples/default -rw-r--r-- root/root 229 2016-07-09 20:04 ./usr/share/doc/fcgiwrap/examples/monitrc -rw-r--r-- root/root 648 2016-07-09 20:04 ./usr/share/doc/fcgiwrap/examples/nginx.conf drwxr-xr-x root/root 0 2018-12-09 15:58 ./usr/share/man/ drwxr-xr-x root/root 0 2018-12-09 15:58 ./usr/share/man/man8/ -rw-r--r-- root/root 1785 2018-12-09 15:58 ./usr/share/man/man8/fcgiwrap.8.gz dpkg -i spawn-fcgi_1.6.4-2_amd64.deb dpkg -i libfcgi0ldbl_2.4.2-2_amd64.deb dpkg -i fcgiwrap_1.1.0-12_amd64.deb ls /usr/share/doc/fcgiwrap/ shows: copyright examples cat /usr/share/doc/fcgiwrap/README.Debian shows: cat: /usr/share/doc/fcgiwrap/README.Debian: No such file or directory Any idea what is happening here?
I guess I asked too early, it looks like some Docker images disable installing documentation by default, using rules similar to these: https://askubuntu.com/a/541061, in the file /etc/dpkg/dpkg.cfg.d/docker.
Missing files after installing package on NGINX Docker image
1,453,479,828,000
Using Linux Mint 19 after installing Minecraft I get the error below after every install or update: minecraft-installer package post-installation script subprocess returned error exit status 8 Tried sudo dpkg --configure -D 777 minecraft-installer which seems to show an issue with resources required by the post installer not being accessible. --2019-05-11 13:56:48-- http://s3.amazonaws.com/Minecraft.Download/launcher/Minecraft.jar Resolving s3.amazonaws.com (s3.amazonaws.com)... 52.216.164.157 Connecting to s3.amazonaws.com (s3.amazonaws.com)|52.216.164.157|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 280212 (274K) [application/java-archive] Saving to: ‘/tmp/minecAJyWvp.jar’ /tmp/minecAJyWvp.ja 100%[===================>] 273.64K 457KB/s in 0.6s 2019-05-11 13:56:49 (457 KB/s) - ‘/tmp/minecAJyWvp.jar’ saved [280212/280212] URL transformed to HTTPS due to an HSTS policy --2019-05-11 13:56:49-- https://www.minecraft.net/android-icon-192x192.png Resolving www.minecraft.net (www.minecraft.net)... 2606:2800:233:18f9:1142:8f:20aa:11e2, 152.199.20.92 Connecting to www.minecraft.net (www.minecraft.net)|2606:2800:233:18f9:1142:8f:20aa:11e2|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2019-05-11 13:56:49 ERROR 404: Not Found.
The last line of the output/error message explains the problem. 2019-05-11 13:56:49 ERROR 404: Not Found. The URL is pointing to a resource that does not exist. Looks like a problem in the package/installer, or a file on the web has the wrong name/path. I suggest you contact support for the application itself and ask them. HTTP 404 Error - wikipedia
Mint 19 package install and update error message for minecraft-installer
1,440,255,862,000
Cannot delete or install anything with apt, on both my own user and the root. Whenever I try I get the following error: dpkg: warning: 'dpkg-deb' not found in PATH or not executable dpkg: error: 1 expected program not found in PATH or not executable Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin I checked the $PATH variable (in root as well my own user) and it contains everything it should contain: ranran9991@Ran-Mint ~ $ sudo -i [sudo] password for ranran9991: Ran-Mint ~ # echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/usr/lib/jvm/java-11-oracle/bin:/usr/lib/jvm/java-11-oracle/db/bin Output of grep -i path /etc/sudoers: Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin" Output of sudo find / -mount -name dpkg-deb -exec ls -ld {} + ranran9991@Ran-Mint ~ $ sudo find / -mount -name dpkg-deb -exec ls -ld {} + [sudo] password for ranran9991: lrwxrwxrwx 1 root root 4 Nov 24 2018 /usr/share/bash-completion/completions/dpkg-deb -> dpkg -rwxr-xr-x 1 root root 153952 Oct 4 2018 /var/lib/docker/overlay2/8c4b3545f8b2b1fd424a8054dfa0a631959619f0dc34efe9ca5c5e52f0fe7696/diff/usr/bin/dpkg-deb I am using Cinnamon Mint 18.3. I am unsure what to do and would love some help.
Since you can still run dpkg, at least part of the dpkg package is still present. To restore dpkg-deb, you should try re-installing dpkg: download the appropriate package file (Mint 18.3 is based on Ubuntu 16.04, so look for Xenial on this page to get the appropriate links; the download link I’m giving here assumes you’re using amd64) wget https://launchpad.net/ubuntu/+archive/primary/+files/dpkg_1.18.4ubuntu1.6_amd64.deb install it sudo dpkg -i dpkg_1.18.4ubuntu1.6_amd64.deb If that fails, you’ll need to resort to a more manual approach as suggested in arved’s answer: ar x dpkg_1.18.4ubuntu1.6_amd64.deb data.tar.gz tar xf data.tar.gz ./usr/bin/dpkg-deb sudo install usr/bin/dpkg-deb /usr/bin Then install the package using dpkg to make sure everything’s set up properly.
'dpkg-deb' not found in PATH or not executable
1,440,255,862,000
I am unable to reinstall a package (libturbojpeg0). I have the following error # dpkg --audit 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: libturbojpeg0:amd64 TurboJPEG runtime library - SIMD optimized I cannot remove it # apt-get remove libturbojpeg0 [...] dpkg: error processing package libturbojpeg0:amd64 (--remove): package is in a very bad inconsistent state; you should reinstall it before attempting a removal Errors were encountered while processing: libturbojpeg0:amd64 E: Sub-process /usr/bin/dpkg returned an error code (1) What can I do in order to reinstall this package?
You should ask apt-get to reinstall it: apt-get --reinstall install libturbojpeg0:amd64
The following packages are in a mess due to serious problems during installation
1,440,255,862,000
If package A depends on package B, if I reinstall package B, what would happen to A? Will it be forever removed? Will it be removed, and then reinstalled? Will it simply be ignored by the package manager? I am mostly interested in RPMs (so rpm, dnf and yum tools), but I also need to support deb packages. rpm --replacepkgs and yum reinstall seem promising, but I am not sure. My goal is to reinstall B, without at all affecting A.
if I reinstall package B, what would happen to A? Nothing. Will it be forever removed? Will it be removed, and then reinstalled? Will it simply be ignored by the package manager? No, No, and also no: Since a reinstallation doesn't change anything (not even transitory) about the dependency graph, the package is unaffected. Of course it's not ignored, it's properly handled (by remaining unaffected). yum reinstall Nowadays, yum is just a different way to call dnf (hint: less $(which yum) will show you exactly that; there's no "yum" on your system anymore.)
Does reinstalling package also reinstall dependencies?
1,440,255,862,000
I compiled and packaged QEMU for my Raspberry Pi, but apt thinks that by installing it I'm "downgrading" from 1.3.1 (latest available in the repos) to 5.2.50 (my deb). so now every time I run apt upgrade apt "upgrades" from 5.2.50 (my deb) to 1.3.1 (latest available in the repos). for now I'm using sudo apt-mark hold qemu. what I want is to make the postinst script in the deb to hold the package from updating and the prerm script to uphold it, I know you can't run apt and dpkg commands from those scripts without removing dpkg locks or something like that that I don't want to do. my question: is there a way to hold the package from updating with the postinst script and untold it with the prerm script without removing the dpkg locks?
The appropriate fix is to use the right version number, not to try and hold the package by removing locks in the postinst. The QEMU package you’re replacing has an “epoch”, the number before the colon in the version number, “1:3.1...”. Your version number needs this too, i.e. “1:5.2.50...” apt will then consider your version to be newer than the version in the repositories.
How to hold package from updating with postinst script in DEB
1,440,255,862,000
When I do apt-show-versions samba on my Debian machine, I get something like samba:amd64/buster 2:4.9.5+dfsg-5+deb10u1 uptodate Comparing this to the samba versions, which you can find at the official sources, I would assume, that samba 4.9.5 is installed. But what are the other numbers and letters? My guess is that these indicate Debian specific modifications. But would like to understand how to read them and what they mean. Especially if these change but the "base"-version (here 4.9.5) stays the same.
The full description is given in Debian Policy; in this specific version: 2 (before the :) is the epoch, basically a Debian-specific counter which is used when the main version number “goes back” 4.9.5 is the upstream version, matching Samba 4.9.5 +dfsg is a suffix indicating that the upstream sources were repackaged to remove DFSG-non-free content (parts of the source code which don’t meet the Debian Free Software Guidelines) 5 (after the -) is the revision of the package; this is incremented when changes are made to the packaging, without changing the upstream version +deb10u1 is a suffix indicating that the packaging was updated for Debian 10, i.e. as a stable update after Debian 10 was released, and that this is the first such update. Epochs rarely change, and only in association with an upstream version change. The suffixes change when the packaging changes, without an upstream version change; the first suffix (5 here) changes during the development of the next Debian release, and the second (deb10u1 here) changes for updated to a specific Debian release (for a security update or an important bug fix in a point release).
What does the version string from dpkg/aptitude/apt-show-versions mean? [duplicate]
1,440,255,862,000
Suppose I have a set of scripts and a python environment that supports them and their dependencies. I would like to automate the activation of the python environment so that, for my particular use case, the user's .bashrc/.zshrc gets updated so as to "source" the python environment. What is the correct/debionic way to handle this issue that won't raise red flags or eyebrows when the content is pushed into the home directory .bashrc files?
Global shell settings go in /etc/profile.d but I'd advise against modifying every users environment away from standard. It would seem better to add the needed python packages to the default envronent instead, or to invoke the special envronment only when needed.
Debian Packages: How to handle installs that require the addition of content to a bashrc to become active?
1,440,255,862,000
I just created a debian package with dpkg-deb --build debtest and when installing the package which containing a simple c-app a warning comes up Lintian check results for /home/john/deb/debtest-1.0.deb: E: debtest: wrong-file-owner-uid-or-gid makefile 1000/1000 E: debtest: wrong-file-owner-uid-or-gid usr/ 1000/1000 E: debtest: wrong-file-owner-uid-or-gid usr/local/ 1000/1000 E: debtest: wrong-file-owner-uid-or-gid usr/local/bin/ 1000/1000 E: debtest: wrong-file-owner-uid-or-gid usr/local/bin/hiapp3 1000/1000 is something in the controlfile wrong or missing? Source: debtest Section: unknown Priority: optional Maintainer: john <[email protected]> Version: 1.0 Package: debtest Architecture: amd64 Description: short descr long descr .....
Lintian checks the quality of your Debian package; generally speaking you can ignore its output for a simple package if you're not concerned about distributing the package. It's complaining about the ownership of the files in your package; they should be owned by root, not john (I'm guessing you're the user with uid 1000). Your control file looks fine (for a local package). To fix this, so that the contents of the package are owned by root, run dpkg-deb with fakeroot: fakeroot dpkg-deb --build debtest If you're interested in learning about building Debian packages "the right way", I recommend reading the Debian New Maintainers' Guide.
Creating debianpackage - the package is of bad quality
1,440,255,862,000
This is a (self-contained) follow-up query to this query: Location of Emacs 29 in a Debian 12 system I am on Debian 12. First I installed the Emacs in Debian 12, which defaults to Emacs 28.2. Then I did: sudo apt install emacs/bookworm-backports So now I have two versions of Emacs with the same package name. I was reading man apt, which says: install, reinstall, remove, purge (apt-get(8)) A specific version of a package can be selected for installation by following the package name with an equals (=) and the version of the package to select.  Alternatively the version from a specific release can be selected by following the package name with a forward slash (/) and codename (bullseye, bookworm, sid ...) or suite name (stable, testing, unstable).  This will also select versions from this release for dependencies of this package if needed to satisfy the request. Does appending the package name with =version also work for apt remove? How do I remove the Emacs 28.2 or Emacs 29.1?
So now I have two versions of Emacs with the same package name. As said before: no. You really don't. You upgraded your emacs metapackage from 28 to 29. That's it. As a matter of fact, that should be it, but sadly debian's emacs packaging is slightly broken: the emacs metapackage should depend on any underlying emacs provider (emacs-gtk, emacs-lucid, emacs-nox…) of the same version; sadly, both the backports as well as the normal bookworm package both just say "yeah, emacs-something >= 27.1 is enough". Well, so you can upgrade the emacs metapackage without upgrading the actual emacs binaries. One wonders. So, in order to actually get emacs 29, you need to run apt install emacs-{common,el,bin-common,pgtk}/bookworm-backports (assuming the pgtk build is what you want, my guess is that this is the main reason to upgrade to 29, especially since none of the other backends play well with Wayland on "hi-DPI" (as in: typical modern developer laptop screen qualities next to an external monitor) screens). This will definitely replace the currently installed emacs 28 with emacs 29. At no point can you have two different-version emacsen installed with debian's packaging (phew.)!
I have 2 versions of Emacs installed in Debian. How do I remove one of them?
1,440,255,862,000
In the context of adding capabilities to BaseX,I can see some information about a package: nicholas@mordor:~$ nicholas@mordor:~$ apt show basex Package: basex Version: 9.0.1+ds-1 Priority: optional Section: universe/database Origin: Ubuntu Maintainer: Ubuntu Developers <[email protected]> Original-Maintainer: Alexander Holupirek <[email protected]> Bugs: https://bugs.launchpad.net/ubuntu/+filebug Installed-Size: 4,059 kB Depends: java-wrappers, default-jre | java8-runtime Recommends: libjline2-java Suggests: libtagsoup-java, libxml-commons-resolver1.1-java, libjing-java Homepage: http://basex.org Download-Size: 3,611 kB APT-Manual-Installed: yes APT-Sources: http://ca.archive.ubuntu.com/ubuntu focal/universe amd64 Packages Description: XML database and XPath/XQuery processor BaseX is a very fast and light-weight, yet powerful XML database and XPath/XQuery processor, including support for the latest W3C Full Text and Update Recommendations. It supports large XML instances and offers a highly interactive front-end (basexgui). Apart from two local standalone modes, BaseX offers a client/server architecture. . The package provides following commands: * basex .......... Standalone local XML database. Command line interface. * basexgui ....... Standalone local XML database. Graphical user interface. * basexserver .... BaseX XML Database Server. * basexclient .... BaseX XML Database Client. BaseX XML database and XPath/XQuery processor nicholas@mordor:~$ but how do I find out more, such as where the lib directory is for BaseX? nicholas@mordor:~$ nicholas@mordor:~$ dpkg -L basex /. /usr /usr/bin /usr/bin/basex /usr/bin/basexclient /usr/bin/basexgui /usr/bin/basexserver /usr/share /usr/share/applications /usr/share/applications/basexgui.desktop /usr/share/doc /usr/share/doc/basex /usr/share/doc/basex/changelog.Debian.gz /usr/share/doc/basex/copyright /usr/share/doc/basex/examples /usr/share/doc/basex/examples/input.xml /usr/share/icons /usr/share/icons/hicolor /usr/share/icons/hicolor/128x128 /usr/share/icons/hicolor/128x128/apps /usr/share/icons/hicolor/128x128/apps/basex.png /usr/share/icons/hicolor/16x16 /usr/share/icons/hicolor/16x16/apps /usr/share/icons/hicolor/16x16/apps/basex.png /usr/share/icons/hicolor/192x192 /usr/share/icons/hicolor/192x192/apps /usr/share/icons/hicolor/192x192/apps/basex.png /usr/share/icons/hicolor/22x22 /usr/share/icons/hicolor/22x22/apps /usr/share/icons/hicolor/22x22/apps/basex.png /usr/share/icons/hicolor/24x24 /usr/share/icons/hicolor/24x24/apps /usr/share/icons/hicolor/24x24/apps/basex.png /usr/share/icons/hicolor/256x256 /usr/share/icons/hicolor/256x256/apps /usr/share/icons/hicolor/256x256/apps/basex.png /usr/share/icons/hicolor/32x32 /usr/share/icons/hicolor/32x32/apps /usr/share/icons/hicolor/32x32/apps/basex.png /usr/share/icons/hicolor/36x36 /usr/share/icons/hicolor/36x36/apps /usr/share/icons/hicolor/36x36/apps/basex.png /usr/share/icons/hicolor/48x48 /usr/share/icons/hicolor/48x48/apps /usr/share/icons/hicolor/48x48/apps/basex.png /usr/share/icons/hicolor/64x64 /usr/share/icons/hicolor/64x64/apps /usr/share/icons/hicolor/64x64/apps/basex.png /usr/share/icons/hicolor/72x72 /usr/share/icons/hicolor/72x72/apps /usr/share/icons/hicolor/72x72/apps/basex.png /usr/share/icons/hicolor/96x96 /usr/share/icons/hicolor/96x96/apps /usr/share/icons/hicolor/96x96/apps/basex.png /usr/share/icons/hicolor/scalable /usr/share/icons/hicolor/scalable/apps /usr/share/icons/hicolor/scalable/apps/basex.svg /usr/share/java /usr/share/man /usr/share/man/man1 /usr/share/man/man1/basex.1.gz /usr/share/man/man1/basexclient.1.gz /usr/share/man/man1/basexgui.1.gz /usr/share/man/man1/basexserver.1.gz /usr/share/maven-repo /usr/share/maven-repo/org /usr/share/maven-repo/org/basex /usr/share/maven-repo/org/basex/basex /usr/share/maven-repo/org/basex/basex/9.0.1 /usr/share/maven-repo/org/basex/basex/9.0.1/basex-9.0.1.jar /usr/share/maven-repo/org/basex/basex/9.0.1/basex-9.0.1.pom /usr/share/maven-repo/org/basex/basex/debian /usr/share/maven-repo/org/basex/basex/debian/basex-debian.pom /usr/share/maven-repo/org/basex/basex-parent /usr/share/maven-repo/org/basex/basex-parent/9.0.1 /usr/share/maven-repo/org/basex/basex-parent/9.0.1/basex-parent-9.0.1.pom /usr/share/maven-repo/org/basex/basex-parent/debian /usr/share/maven-repo/org/basex/basex-parent/debian/basex-parent-debian.pom /usr/share/pixmaps /usr/share/pixmaps/basex_16x16.xpm /usr/share/pixmaps/basex_32x32.xpm /usr/share/java/basex.jar /usr/share/maven-repo/org/basex/basex/debian/basex-debian.jar nicholas@mordor:~$ Yet, I'm looking the lib directory to BaseX itself.
The lib directory can be found in the full distributions of BaseX, which can be downloaded from the official homepage. See Startup: Full Distributions for more information.
How and where to find out details on which directories and files a package effects?
1,440,255,862,000
Before I upgrade to Debian Bullseye, apt-file was pretty logical. Now I can't get it to work. What am I doing wrong? Did the behavior change? # apt-file update Hit:1 http://repo.steampowered.com/steam precise InRelease Hit:2 https://updates.signal.org/desktop/apt xenial InRelease Hit:3 http://security.debian.org/debian-security bullseye-security InRelease Hit:4 http://deb.debian.org/debian bullseye InRelease Hit:5 https://packages.riot.im/debian default InRelease Reading package lists... Done Building dependency tree Reading state information... Done 9 packages can be upgraded. Run 'apt list --upgradable' to see them. Prove the file is there... # locate v4l2loopback.ko /usr/lib/modules/5.6.0-1-amd64/updates/dkms/v4l2loopback.ko /var/lib/dkms/v4l2loopback/0.12.5/5.6.0-1-amd64/x86_64/module/v4l2loopback.ko apt-file can't tell me what package provides it: # apt-file search v4l2loopback.ko ... nothing... What package provides v4l2loopback.ko? How can I find it out? Did the behavior of apt-file change? Dpkg also can't find it. # dpkg -S /usr/lib/modules/5.6.0-1-amd64/updates/dkms/v4l2loopback.ko dpkg-query: no path found matching pattern /usr/lib/modules/5.6.0-1-amd64/updates/dkms/v4l2loopback.ko
The mention of dkms in the path is important: dkms is the "Dynamic Kernel Module Support (DKMS)" system. Those kernel modules were built on your system using files provided by some packages; they are not provided directly by those packages and so are not owned by those packages. So, neither apt-file nor dpkg can help; maybe the dkms command can.
apt-file can not find a dkms file
1,440,255,862,000
I understand the the configuration files for unattended-upgrades in which you determine if you want only security upgrades or other upgrades as well, are located in a bit "dynamic" locations that could change between specific debian distros and their versions. Is there a general command structure to control these in a uniformal, Debian agnostic, version agnostic way? Some command I could learn? I'm not sure that the following is what I need: sudo dpkg-reconfigure --priority=low unattended-upgrades I might miss the association between priority and allowed origins, as in: Unattended-Upgrade::Allowed-Origins { "${distro_id}:${distro_codename}"; "${distro_id}:${distro_codename}-security"; // "${distro_id}:${distro_codename}-updates"; // "${distro_id}:${distro_codename}-proposed"; // "${distro_id}:${distro_codename}-backports"; }; Update for Stephen Dear Stephen, if I understood your answer correctly what I should do, due to the hierarchy you describe is to edit /etc/apt/apt.conf and add in the end of that file: Unattended-Upgrade::Allowed-Origins { "${distro_id}:${distro_codename}"; "${distro_id}:${distro_codename}-security"; "${distro_id}:${distro_codename}-updates"; "${distro_id}:${distro_codename}-proposed"; "${distro_id}:${distro_codename}-backports"; }; This would be the most minimal way to make the change of allowing upgrading of all types of software, given there isn't a command for that.
APT configuration files are read in the following order: the file specified by APT_CONFIG if any; files in /etc/apt/apt.conf.d; /etc/apt/apt.conf. Later files override earlier ones, so in practice the best place to put settings is /etc/apt/apt.conf; that will override any setting defined in a file in /etc/apt/apt.conf.d. An alternative which should work well is to use a file named /etc/apt/apt.conf.d/99local, but /etc/apt/apt.conf has worked fine for me for this kind of purpose for many years. You can think of this setup as allowing packages to provide default configuration in files in /etc/apt/apt.conf.d, and /etc/apt/apt.conf containing the local system administrator’s desired configuration. In your case, you should edit /etc/apt/apt.conf and add the following snippet to it: Unattended-Upgrade::Allowed-Origins { "${distro_id}:${distro_codename}"; "${distro_id}:${distro_codename}-security"; "${distro_id}:${distro_codename}-updates"; }; You don’t want -proposed (which contains packages waiting for approval); you might want -backports (which contains packages backported from the current release of Debian), if you use backported packages. -updates contains upgrades which aren’t important for security; so you can enable it to get upgrades as they are made available, or disable it to batch upgrades at point releases. The priority specified in the dpkg-reconfigure command doesn’t have any association with allowed origins, it simply determines which configuration questions are displayed (and should be unnecessary since low is the default for dpkg-reconfigure).
Debian agnostic, version agnostic way to configure update preferences in unattended-upgrades
1,440,255,862,000
I tried to install docker on my raspbian install and accidentally broke apt-get If I run apt-get install or upgrade, I get the following error: E: The package debconf needs to be reinstalled, but I can't find an archive for it. I've tried all the suggested solutions I could find online, some examples: Command: apt-get -f install debconf Result: root@raspberrypi:~# apt-get -f install debconf Reading package lists... Done Building dependency tree Reading state information... Done E: The package debconf needs to be reinstalled, but I can't find an archive for it. Command: dpkg-reconfigure debconf Result: root@raspberrypi:~# dpkg-reconfigure debconf /usr/sbin/dpkg-reconfigure: debconf is broken or not fully installed Command: apt-get install --reinstall debconf Result: root@raspberrypi:~# apt-get install --reinstall debconf Reading package lists... Done Building dependency tree Reading state information... Done E: The package debconf needs to be reinstalled, but I can't find an archive for it. Command: dpkg --remove --force-remove-reinstreq debconf Result: root@raspberrypi:/var/cache/apt/archives# dpkg-reconfigure debconf /usr/sbin/dpkg-reconfigure: debconf is broken or not fully installed root@raspberrypi:/var/cache/apt/archives# sudo dpkg --configure -a Setting up libc6-dbg:armhf (2.19-18+deb8u10) ... dpkg: dependency problems prevent configuration of debconf-i18n: debconf-i18n depends on debconf (= 1.5.56+deb8u1); however: Version of debconf on system is 1.5.56. dpkg: error processing package debconf-i18n (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of debconf-utils: debconf-utils depends on debconf (= 1.5.56+deb8u1); however: Version of debconf on system is 1.5.56. dpkg: error processing package debconf-utils (--configure): dependency problems - leaving unconfigured Setting up python-software-properties (0.92.25debian1) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in <module> from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in <module> from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-software-properties (--configure): subprocess installed post-installation script returned error exit status 1 Setting up perl-modules (5.20.2-3+deb8u8) ... Setting up perl (5.20.2-3+deb8u8) ... Setting up libtirpc1:armhf (0.2.5-1+deb8u1) ... Setting up libc-dev-bin (2.19-18+deb8u10) ... Setting up libperl5.20 (5.20.2-3+deb8u8) ... Setting up libc6-dev:armhf (2.19-18+deb8u10) ... Setting up rpcbind (0.2.1-6+deb8u2) ... insserv: warning: current start runlevel(s) (empty) of script `rpcbind' overrides LSB defaults (S). insserv: warning: current stop runlevel(s) (0 1 6 S) of script `rpcbind' overrides LSB defaults (0 1 6). Processing triggers for libc-bin (2.19-18+deb8u10) ... Errors were encountered while processing: debconf-i18n debconf-utils python-software-properties root@raspberrypi:/var/cache/apt/archives# sudo apt-get install -f Reading package lists... Done Building dependency tree Reading state information... Done E: The package debconf needs to be reinstalled, but I can't find an archive for it. root@raspberrypi:/var/cache/apt/archives# sudo dpkg --configure -a dpkg: dependency problems prevent configuration of debconf-i18n: debconf-i18n depends on debconf (= 1.5.56+deb8u1); however: Version of debconf on system is 1.5.56. dpkg: error processing package debconf-i18n (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of debconf-utils: debconf-utils depends on debconf (= 1.5.56+deb8u1); however: Version of debconf on system is 1.5.56. dpkg: error processing package debconf-utils (--configure): dependency problems - leaving unconfigured Setting up python-software-properties (0.92.25debian1) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in <module> from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in <module> from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-software-properties (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: debconf-i18n debconf-utils python-software-properties root@raspberrypi:/var/cache/apt/archives# apt-get -f install debconf Reading package lists... Done Building dependency tree Reading state information... Done E: The package debconf needs to be reinstalled, but I can't find an archive for it. root@raspberrypi:/var/cache/apt/archives# cd root@raspberrypi:~# apt-get -f install debconf Reading package lists... Done Building dependency tree Reading state information... Done E: The package debconf needs to be reinstalled, but I can't find an archive for it. root@raspberrypi:~# dpkg-reconfigure debconf /usr/sbin/dpkg-reconfigure: debconf is broken or not fully installed root@raspberrypi:~# apt-get install --reinstall debconf Reading package lists... Done Building dependency tree Reading state information... Done E: The package debconf needs to be reinstalled, but I can't find an archive for it. root@raspberrypi:~# dpkg --remove --force-remove-reinstreq debconf dpkg: dependency problems prevent removal of debconf: tasksel depends on debconf (>= 0.5) | debconf-2.0; however: Package debconf is to be removed. Package debconf-2.0 is not installed. Package debconf which provides debconf-2.0 is to be removed. tasksel depends on debconf (>= 1.5.34) | cdebconf (>= 0.106); however: Package debconf is to be removed. Package cdebconf is not installed. tasksel depends on debconf (>= 0.5) | debconf-2.0; however: Package debconf is to be removed. Package debconf-2.0 is not installed. Package debconf which provides debconf-2.0 is to be removed. tasksel depends on debconf (>= 1.5.34) | cdebconf (>= 0.106); however: Package debconf is to be removed. Package cdebconf is not installed. locales depends on debconf (>= 0.5) | debconf-2.0; however: Package debconf is to be removed. Package debconf-2.0 is not installed. Package debconf which provides debconf-2.0 is to be removed. ca-certificates depends on debconf (>= 0.5) | debconf-2.0; however: Package debcon dpkg: error processing package debconf (--remove): dependency problems - not removing Errors were encountered while processing: debconf Command: dpkg --configure -a Result: root@raspberrypi:~# dpkg --configure -a dpkg: dependency problems prevent configuration of debconf-i18n: debconf-i18n depends on debconf (= 1.5.56+deb8u1); however: Version of debconf on system is 1.5.56. dpkg: error processing package debconf-i18n (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of debconf-utils: debconf-utils depends on debconf (= 1.5.56+deb8u1); however: Version of debconf on system is 1.5.56. dpkg: error processing package debconf-utils (--configure): dependency problems - leaving unconfigured Setting up python-software-properties (0.92.25debian1) ... Traceback (most recent call last): File "/usr/bin/pycompile", line 35, in <module> from debpython.version import SUPPORTED, debsorted, vrepr, \ File "/usr/share/python/debpython/version.py", line 24, in <module> from ConfigParser import SafeConfigParser ImportError: No module named 'ConfigParser' dpkg: error processing package python-software-properties (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: debconf-i18n debconf-utils python-software-properties Command: dpkg -C Result: 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: debconf Debian configuration management system 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: debconf-i18n full internationalization support for debconf debconf-utils debconf utilities The following packages are only half configured, probably due to problems configuring them the first time. The configuration should be retried using dpkg --configure <package> or the configure menu option in dselect: python-software-properties manage the repositories that you install software f Command: apt-cache policy Result: root@raspberrypi:~# apt-cache policy Package files: 100 /var/lib/dpkg/status release a=now 500 http://archive.raspberrypi.org/debian/ jessie/ui armhf Packages release o=Raspberry Pi Foundation,a=stable,n=jessie,l=Raspberry Pi Foundation,c=ui origin archive.raspberrypi.org 500 http://archive.raspberrypi.org/debian/ jessie/main armhf Packages release o=Raspberry Pi Foundation,a=stable,n=jessie,l=Raspberry Pi Foundation,c=main origin archive.raspberrypi.org Pinned packages: Command: apt-get -f install Result: root@raspberrypi:~# apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done E: The package debconf needs to be reinstalled, but I can't find an archive for it. Command: cat /etc/*-release Result: root@raspberrypi:~# cat /etc/*-release PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)" NAME="Raspbian GNU/Linux" VERSION_ID="8" VERSION="8 (jessie)" ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs" Command: apt-cache policy debconf debconf-i18n debconf-utils Result: root@raspberrypi:~# apt-cache policy debconf debconf-i18n debconf-utils debconf: Installed: 1.5.56 Candidate: 1.5.56 Version table: *** 1.5.56 0 100 /var/lib/dpkg/status debconf-i18n: Installed: 1.5.56+deb8u1 Candidate: 1.5.56+deb8u1 Version table: *** 1.5.56+deb8u1 0 100 /var/lib/dpkg/status debconf-utils: Installed: 1.5.56+deb8u1 Candidate: 1.5.56+deb8u1 Version table: *** 1.5.56+deb8u1 0 100 /var/lib/dpkg/status Command: cat /etc/apt/sources.list Result: root@raspberrypi:~# cat /etc/apt/sources.list # Uncomment line below then 'apt-get update' to enable 'apt-get source' #deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi Command: ls -Al /etc/apt/sources.list.d/ Result: root@raspberrypi:~# ls -Al /etc/apt/sources.list.d/ total 4 -rw-r--r-- 1 root root 193 Apr 10 09:58 raspi.list Command: cat /etc/apt/sources.list.d/raspi.list Result: root@raspberrypi:~# cat /etc/apt/sources.list.d/raspi.list deb http://archive.raspberrypi.org/debian/ jessie main ui # Uncomment line below then 'apt-get update' to enable 'apt-get source' #deb-src http://archive.raspberrypi.org/debian/ jessie main ui Anyone have any clue what to try next? Would love not to have to reinstall the OS.
You're missing your main Raspbian archive, which should be in your sources.list: anthony@Kilby:~ $ cat /etc/apt/sources.list deb http://mirrordirector.raspbian.org/raspbian/ jessie main contrib non-free rpi # Uncomment line below then 'apt-get update' to enable 'apt-get source' deb-src http://archive.raspbian.org/raspbian/ jessie main contrib non-free rpi Without that, there is nowhere to download debconf 1.5.56+deb8u1 from. It's likely that adding the source back, then apt-get update, then apt-get install -f will be sufficient to fix it. If not, you'll need to manually download http://mirrordirector.raspbian.org/raspbian/pool/main/d/debconf/debconf_1.5.56+deb8u1_all.deb and install it with dpkg -i debconf_1.5.56+deb8u1_all.deb. Ways of manually downloading that include wget/curl or apt-get download debconf=1.5.56+deb8u1. The latter is easiest if it works.
debconf is broken, can't install anything anymore
1,440,255,862,000
I have two identical directories in /usr/lib/jvm on my Debian machine. /usr/lib/jvm/java-1.8.0-openjdk-i386 /usr/lib/jvm/java-8-openjdk-i386 And I want to get rid of what is not needed. $ dpkg -S /usr/lib/jvm/java-8-openjdk-i386/bin/javac openjdk-8-jdk-headless:i386 $ dpkg -S /usr/lib/jvm/java-1.8.0-openjdk-i386/bin/javac dpkg-query: no path found matching pattern /usr/lib/jvm/java-1.8.0-openjdk-i386/bin/javac $ dpkg -l | grep openjdk openjdk-8-jdk openjdk-8-jdk-headless openjdk-8-jre openjdk-8-jre-headless
If you run ls -l /usr/lib/jvm you’ll see that java-1.8.0-openjdk-i386 is a symlink to java-8-openjdk-i386, so there’s nothing to get rid of. In such cases dpkg -S only finds the symlinks, it doesn’t dereference them: dpkg -S /usr/lib/jvm/java-*-openjdk-i386 should indicate that both “directories” come from openjdk-8-jdk-headless.
Find the package that installed /usr/lib/jvm/java-1.8.0-openjdk
1,440,255,862,000
I am trying to use the dpkg -b to build a package . The package directory structure looks like : ubuntu@ip-10-241-62-56:~/USB_RnD_DEB/BACKUP/usblinux1.1$ tree . ├── DEBIAN │ └── control └── usr ├── bin │ └── usblinux-runner.sh └── share └── usblinux |-->installer.sh |--> LOTS AND LOTS OF FILES The usblinux-runner.sh consists of a small shell script which holds : #!/bin/bash echo "Installing the USB REDIRECTOR as Client !" echo "-----------------------------------------" sudo apt-get update sudo apt-get install build-essential sudo /usr/share/usblinux/./installer.sh install-client Now this gets packed into the ubuntu@ip-10-241-62-56:~/USB_RnD_DEB/BACKUP$ sudo dpkg -b usblinux1.1/ dpkg-deb: building package `usblinux' in `usblinux1.1.deb'. ubuntu@ip-10-241-62-56:~/USB_RnD_DEB/BACKUP$ ls usblinux1.1 usblinux1.1.deb Now this works absolutely fine and when I install the package it just unpacks it and puts the usblinux-runner.sh in /usr/bin & usblinux in /usr/bin/share It DOESN'T INSTALL or RUN the the usblinux-runner.sh file . I simply UNPACKS and doesn't RUN the shell script also i don't see any OUTPUT on console : sudo dpkg -i usblinux1.1.deb Selecting previously unselected package usblinux. (Reading database ... 82106 files and directories currently installed.) Preparing to unpack usblinux1.1.deb ... Unpacking usblinux (1.1) ... Setting up usblinux (1.1) ... Can someone help me on finding whats wrong?
That's normal, installing a package doesn't run any of its binaries by default (otherwise imagine what fun we'd have installing e2fsprogs and the like!). If you want the usblinux-runner.sh script to run automatically after the package is installed, you need to add a postinst script, which will run usblinux-runner.sh. There is one caveat: you can't install other packages from a maintainer script, so you'd need to remove the apt-get lines. But that's fine, because the correct way of declaring a dependency (your package depends on build-essential) is to declare it in the Depends: entry of the control file. Given all that, you might as well just have your postinst script run /usr/share/usblinux/installer.sh install-client You don't need sudo here, the maintainer scripts run as root anyway.
dpkg only UNPACKS and Doesn't INSTALL, why?
1,440,255,862,000
$ sudo dpkg --configure -a Setting up sandboxgamemaker (2.7.1+dfsg-2) ... Cleaned old data --2013-11-01 18:28:33-- http://sandboxgamemaker.com/sandbox/PlatinumArtsSandbox 2.7.1Multiplatfrom.zip Resolving sandboxgamemaker.com (sandboxgamemaker.com)... 173.236.241.215 Connecting to sandboxgamemaker.com (sandboxgamemaker.com)|173.236.241.215|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: http://www.sandboxgamemaker.com/sandbox/PlatinumArtsSandbox2.7.1Multip latfrom.zip [following] --2013-11-01 18:28:34-- http://www.sandboxgamemaker.com/sandbox/PlatinumArtsSan dbox2.7.1Multiplatform.zip Resolving www.sandboxgamemaker.com (www.sandboxgamemaker.com)... 173.236.241.215 Reusing existing connection to sandboxgamemaker.com:80. HTTP request sent, awaiting response... 206 Partial Content Length: 445937900 (425M), 283579684 (270M) remaining [application/zip] Saving to: `PlatinumArtsSandbox2.7.1Multiplatform.zip' 36% [+++++++++++++++++++++++++++++++++++ ] 16,31,95,440 66.7K/s eta 70m 55s This command has been running for 1 hour and it is still not repaired. I use Debian 7.
As far as I can tell, it's running correctly. Once a deb package get installed, a post installation script get executed. In this case, it tries to download something from the internet. So you need to wait until it finishes, and see if anything else goes wrong. Otherwise it's just fine.
dpkg --configure -a not working
1,440,255,862,000
I'm making a script to build a git package in Debian format (.deb). This package requires the following debian packages: cmake, libturbojpeg0-dev, libjpeg62-turbo-dev, libglx-dev, opencl-headers, libgl-dev, libegl-dev, libx11-dev, libxtst-dev, libglu1-mesa-dev, libxcb-keysyms1-dev, libxcb-glx0-dev and libx11-xcb-dev So I am using this: for file in cmake libturbojpeg0-dev libjpeg62-turbo-dev libglx-dev opencl-headers libgl-dev libegl-dev libx11-dev libxtst-dev libglu1-mesa-dev libxcb-keysyms1-dev libxcb-glx0-dev libx11-xcb-dev; do apt -y install $file;done my question is, how to check if package is already installed and then install if is not installed? Something like this dpkg -l packagename if is installed go to next, if not use apt -y install. Thanks
Instead of writing your own script to do this, you should list the build dependencies in the package’s control file and use mk-build-deps (or any package-resolving build tool, e.g. pbuilder, sbuild etc.). See Automatically install unmet build dependencies as detected by dpkg-checkbuilddeps for details. If you don’t want to do that, describe the desired state and let apt take care of things: sudo apt-get install --no-install-recommends cmake libturbojpeg0-dev libjpeg62-turbo-dev libglx-dev opencl-headers libgl-dev libegl-dev libx11-dev libxtst-dev libglu1-mesa-dev libxcb-keysyms1-dev libxcb-glx0-dev libx11-xcb-dev apt won’t re-install packages which are already installed, but it will upgrade any that have a newer candidate version in the repositories configured on the system (this can be disabled with the --no-upgrade option). If you really want to write your own script, you could run dpkg -l for each package, and filter on ^ii — packages which don’t match need to be installed: for package in …; do if ! dpkg -l "$package" | grep -q ^ii; then sudo apt-get install --no-install-recommends "$package" fi done (--no-install-recommends skips installing weak dependencies, which is what you want for build dependencies.)
Help for script which install on Debian a package, only if is not installed
1,440,255,862,000
EDIT solution: The problem was that I thought the package installs the driver but it was not the case (more about it in the accepted answer). When installing Nvidia driver I suggest going with .run file from archive here - if you need specific version, which was my case so I could not just autoinstall. The .deb package was not working for me. EDIT2: I tried to install Cuda just now and failed. I've read there might be issues when using ".run" file, so I don't know if that is the way to go anymore. I have Debian 10 (Buster) and I'm trying to install Nvidia driver 460.91. I downloaded it and tried to install as root by executing: apt install ./<name>.deb What I get is: https://i.sstatic.net/BA0vd.png and the driver is not installed. Why the Nvidia driver is not installed when it is claiming that the package is? Also the first run was extremely fast so it could not possibly install the driver. I tried among other things running sudo dpkg -i <name>.deb sudo apt install -f but got same result. For some reason it seems that the package is installed however the driver is not.
It’s not installing the package because the package is already installed: nvidia-driver-local-repo-debian10-460.91.03 is already the newest version (1.0-1). This package ships all the packages needed, but doesn’t install them; to do that, you need to run sudo apt update sudo apt install nvidia-driver
"apt install <name>.deb" not correctly installing Nvidia driver in the deb package
1,440,255,862,000
I have downloaded a .deb file but when I install it, it complains that a bunch of packages are not installed. I am using a very bare bones focal Docker image. dpkg: dependency problems prevent configuration of wkhtmltox: wkhtmltox depends on fontconfig; however: Package fontconfig is not installed. wkhtmltox depends on libfreetype6; however: Package libfreetype6 is not installed. wkhtmltox depends on libjpeg-turbo8; however: Package libjpeg-turbo8 is not installed. wkhtmltox depends on libpng16-16; however: Package libpng16-16 is not installed. wkhtmltox depends on libx11-6; however: Package libx11-6 is not installed. wkhtmltox depends on libxcb1; however: Package libxcb1 is not installed. wkhtmltox depends on libxext6; however: Package libxext6 is not installed. wkhtmltox depends on libxrender1; however: Package libxrender1 is not installed. wkhtmltox depends on xfonts-75dpi; however: Package xfonts-75dpi is not installed. wkhtmltox depends on xfonts-base; however: Package xfonts-base is not installed. I'm used to software development package managers that normally just go ahead and install dependencies. How can I make dpkg work like that? Thanks.
You can’t make dpkg do this; the appropriate tool is apt. Instead of dpkg -i /path/to/package.deb use apt install /path/to/package.deb
Run dpkg so that it installs dependent packages
1,440,255,862,000
Web search found links of dpkg failing when using apt. This What is the difference between apt-get and dpkg? accepted answer says: apt-get makes use of dpkg to do the actual package installations. I encountered a situation when dpkg -i /path/*.deb produced errors when installing bless, I've tried to reproduce: booting from liveUSB (Linux Mint 20.2) and got similar errors, however when I booted liveUSB and used apt install bless, the installation went cleanly. I've checked list of debs downloaded by apt - the list contained same files (at least by names and I obtained debs for dpkg recently by apt install -d also) as ones I've tried to install via dpkg. Why apt installs fine whereas directly using dpkg failed? I've installed via apt install -d then dpkg -i /path/*.deb several packages and only bless failed. Below are outputs for both ways: DPKG fails: mint@mint:~$ sudo dpkg -i /home/mint/Downloads/*.deb Selecting previously unselected package binfmt-support. (Reading database ... 282124 files and directories currently installed.) Preparing to unpack .../binfmt-support_2.2.0-2_amd64.deb ... Unpacking binfmt-support (2.2.0-2) ... Selecting previously unselected package bless. Preparing to unpack .../bless_0.6.0-7_all.deb ... Unpacking bless (0.6.0-7) ... Selecting previously unselected package ca-certificates-mono. dpkg: regarding .../ca-certificates-mono_6.8.0.105+dfsg-2_all.deb containing ca-certificates-mono, pre-dependency problem: ca-certificates-mono pre-depends on mono-runtime-common (>= 5.20) mono-runtime-common is not installed. dpkg: error processing archive /home/mint/Downloads/ca-certificates-mono_6.8.0.105+dfsg-2_all.deb (--install): pre-dependency problem - not installing ca-certificates-mono Selecting previously unselected package cli-common. Preparing to unpack .../cli-common_0.10_all.deb ... Unpacking cli-common (0.10) ... Selecting previously unselected package libgdiplus. Preparing to unpack .../libgdiplus_6.0.4+dfsg-2_amd64.deb ... Unpacking libgdiplus (6.0.4+dfsg-2) ... Selecting previously unselected package libglade2-0:amd64. Preparing to unpack .../libglade2-0_1%3a2.6.4-2ubuntu2_amd64.deb ... Unpacking libglade2-0:amd64 (1:2.6.4-2ubuntu2) ... Selecting previously unselected package libglade2.0-cil. Preparing to unpack .../libglade2.0-cil_2.12.40-3_amd64.deb ... Unpacking libglade2.0-cil (2.12.40-3) ... Selecting previously unselected package libglib2.0-cil. Preparing to unpack .../libglib2.0-cil_2.12.40-3_amd64.deb ... Unpacking libglib2.0-cil (2.12.40-3) ... Selecting previously unselected package libgtk2.0-cil. Preparing to unpack .../libgtk2.0-cil_2.12.40-3_amd64.deb ... Unpacking libgtk2.0-cil (2.12.40-3) ... Selecting previously unselected package libmono-btls-interface4.0-cil. Preparing to unpack .../libmono-btls-interface4.0-cil_6.8.0.105+dfsg-2_amd64.deb ... Unpacking libmono-btls-interface4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-cairo4.0-cil. Preparing to unpack .../libmono-cairo4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-cairo4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-corlib4.5-cil. Preparing to unpack .../libmono-corlib4.5-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-corlib4.5-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-i18n-west4.0-cil. Preparing to unpack .../libmono-i18n-west4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-i18n-west4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-i18n4.0-cil. Preparing to unpack .../libmono-i18n4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-i18n4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-posix4.0-cil. Preparing to unpack .../libmono-posix4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-posix4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-security4.0-cil. Preparing to unpack .../libmono-security4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-security4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-system-configuration4.0-cil. Preparing to unpack .../libmono-system-configuration4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-system-configuration4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-system-core4.0-cil. Preparing to unpack .../libmono-system-core4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-system-core4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-system-drawing4.0-cil. Preparing to unpack .../libmono-system-drawing4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-system-drawing4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-system-numerics4.0-cil. Preparing to unpack .../libmono-system-numerics4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-system-numerics4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-system-security4.0-cil. Preparing to unpack .../libmono-system-security4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-system-security4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-system-xml4.0-cil. Preparing to unpack .../libmono-system-xml4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-system-xml4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-system4.0-cil. Preparing to unpack .../libmono-system4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-system4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package mono-4.0-gac. Preparing to unpack .../mono-4.0-gac_6.8.0.105+dfsg-2_all.deb ... Unpacking mono-4.0-gac (6.8.0.105+dfsg-2) ... Selecting previously unselected package mono-gac. Preparing to unpack .../mono-gac_6.8.0.105+dfsg-2_all.deb ... Unpacking mono-gac (6.8.0.105+dfsg-2) ... Selecting previously unselected package mono-runtime-common. Preparing to unpack .../mono-runtime-common_6.8.0.105+dfsg-2_amd64.deb ... Unpacking mono-runtime-common (6.8.0.105+dfsg-2) ... Selecting previously unselected package mono-runtime-sgen. Preparing to unpack .../mono-runtime-sgen_6.8.0.105+dfsg-2_amd64.deb ... Unpacking mono-runtime-sgen (6.8.0.105+dfsg-2) ... Selecting previously unselected package mono-runtime. Preparing to unpack .../mono-runtime_6.8.0.105+dfsg-2_amd64.deb ... Unpacking mono-runtime (6.8.0.105+dfsg-2) ... Setting up binfmt-support (2.2.0-2) ... update-binfmts: warning: /usr/share/binfmts/cli: no executable /usr/bin/cli found, but continuing anyway as you request Created symlink /etc/systemd/system/multi-user.target.wants/binfmt-support.service → /lib/systemd/system/binfmt-support.service. Setting up cli-common (0.10) ... Setting up libgdiplus (6.0.4+dfsg-2) ... Setting up libglade2-0:amd64 (1:2.6.4-2ubuntu2) ... Setting up libmono-btls-interface4.0-cil (6.8.0.105+dfsg-2) ... Setting up libmono-system-numerics4.0-cil (6.8.0.105+dfsg-2) ... Setting up mono-runtime-sgen (6.8.0.105+dfsg-2) ... Setting up mono-runtime (6.8.0.105+dfsg-2) ... update-alternatives: using /usr/bin/mono to provide /usr/bin/cli (cli) in auto mode Setting up libmono-corlib4.5-cil (6.8.0.105+dfsg-2) ... Setting up libmono-i18n4.0-cil (6.8.0.105+dfsg-2) ... Setting up libmono-security4.0-cil (6.8.0.105+dfsg-2) ... Setting up libmono-system4.0-cil (6.8.0.105+dfsg-2) ... Setting up libglib2.0-cil (2.12.40-3) ... Unhandled Exception: System.TypeInitializationException: The type initializer for 'Sys' threw an exception. ---> System.DllNotFoundException: System.Native assembly:<unknown assembly> type:<unknown type> member:(null) at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag() at Interop+Sys..cctor () [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 --- End of inner exception stack trace --- at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x0000f] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 at System.IO.File.Exists (System.String path) [0x00058] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 at Mono.Tools.Driver.LoadConfig (System.Boolean quiet) [0x00031] in <c1f3f44c980c4c748aff61945c8f618f>:0 at Mono.Tools.Driver.Main (System.String[] args) [0x00347] in <c1f3f44c980c4c748aff61945c8f618f>:0 [ERROR] FATAL UNHANDLED EXCEPTION: System.TypeInitializationException: The type initializer for 'Sys' threw an exception. ---> System.DllNotFoundException: System.Native assembly:<unknown assembly> type:<unknown type> member:(null) at (wrapper managed-to-native) Interop+Sys.LChflagsCanSetHiddenFlag() at Interop+Sys..cctor () [0x00000] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 --- End of inner exception stack trace --- at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath, System.Int32 fileType, Interop+ErrorInfo& errorInfo) [0x0000f] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 at System.IO.FileSystem.FileExists (System.ReadOnlySpan`1[T] fullPath) [0x00006] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 at System.IO.File.Exists (System.String path) [0x00058] in <12b418a7818c4ca0893feeaaf67f1e7f>:0 at Mono.Tools.Driver.LoadConfig (System.Boolean quiet) [0x00031] in <c1f3f44c980c4c748aff61945c8f618f>:0 at Mono.Tools.Driver.Main (System.String[] args) [0x00347] in <c1f3f44c980c4c748aff61945c8f618f>:0 E: installing Assembly /usr/share/cli-common/policies.d/libglib2.0-cil/policy.2.8.glib-sharp.dll failed E: Installation of policy.2.8.glib-sharp with /usr/share/cli-common/runtimes.d/mono failed dpkg: error processing package libglib2.0-cil (--install): installed libglib2.0-cil package post-installation script subprocess returned error exit status 1 dpkg: dependency problems prevent configuration of libgtk2.0-cil: libgtk2.0-cil depends on libglib2.0-cil (= 2.12.40-3); however: Package libglib2.0-cil is not configured yet. dpkg: error processing package libgtk2.0-cil (--install): dependency problems - leaving unconfigured Setting up libmono-cairo4.0-cil (6.8.0.105+dfsg-2) ... Setting up libmono-i18n-west4.0-cil (6.8.0.105+dfsg-2) ... Setting up libmono-posix4.0-cil (6.8.0.105+dfsg-2) ... Setting up libmono-system-core4.0-cil (6.8.0.105+dfsg-2) ... Setting up libmono-system-drawing4.0-cil (6.8.0.105+dfsg-2) ... Setting up libmono-system-xml4.0-cil (6.8.0.105+dfsg-2) ... dpkg: dependency problems prevent configuration of bless: bless depends on libglib2.0-cil (>= 2.12.40); however: Package libglib2.0-cil is not configured yet. bless depends on libgtk2.0-cil (>= 2.12.40); however: Package libgtk2.0-cil is not configured yet. dpkg: error processing package bless (--install): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of libglade2.0-cil: libglade2.0-cil depends on libglib2.0-cil (>= 2.12.40); however: Package libglib2.0-cil is not configured yet. libglade2.0-cil depends on libgtk2.0-cil (>= 2.12.40); however: Package libgtk2.0-cil is not configured yet. dpkg: error processing package libglade2.0-cil (--install): dependency problems - leaving unconfigured Setting up libmono-system-security4.0-cil (6.8.0.105+dfsg-2) ... Setting up mono-4.0-gac (6.8.0.105+dfsg-2) ... Setting up mono-gac (6.8.0.105+dfsg-2) ... update-alternatives: using /usr/bin/gacutil to provide /usr/bin/cli-gacutil (global-assembly-cache-tool) in auto mode Setting up mono-runtime-common (6.8.0.105+dfsg-2) ... Setting up libmono-system-configuration4.0-cil (6.8.0.105+dfsg-2) ... Processing triggers for systemd (245.4-4ubuntu3.6) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... Processing triggers for desktop-file-utils (0.24+linuxmint1) ... Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for libc-bin (2.31-0ubuntu9.2) ... Processing triggers for sgml-base (1.29.1) ... Errors were encountered while processing: /home/mint/Downloads/ca-certificates-mono_6.8.0.105+dfsg-2_all.deb libglib2.0-cil libgtk2.0-cil bless libglade2.0-cil Via APT install OK (already downloaded with -d option) mint@mint:~/Downloads$ sudo apt install bless Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: binfmt-support ca-certificates-mono cli-common libgdiplus libglade2-0 libglade2.0-cil libglib2.0-cil libgtk2.0-cil libmono-btls-interface4.0-cil libmono-cairo4.0-cil libmono-corlib4.5-cil libmono-i18n-west4.0-cil libmono-i18n4.0-cil libmono-posix4.0-cil libmono-security4.0-cil libmono-system-configuration4.0-cil libmono-system-core4.0-cil libmono-system-drawing4.0-cil libmono-system-numerics4.0-cil libmono-system-security4.0-cil libmono-system-xml4.0-cil libmono-system4.0-cil mono-4.0-gac mono-gac mono-runtime mono-runtime-common mono-runtime-sgen Suggested packages: monodoc-gtk2.0-manual libmono-i18n4.0-all libgamin0 The following NEW packages will be installed: binfmt-support bless ca-certificates-mono cli-common libgdiplus libglade2-0 libglade2.0-cil libglib2.0-cil libgtk2.0-cil libmono-btls-interface4.0-cil libmono-cairo4.0-cil libmono-corlib4.5-cil libmono-i18n-west4.0-cil libmono-i18n4.0-cil libmono-posix4.0-cil libmono-security4.0-cil libmono-system-configuration4.0-cil libmono-system-core4.0-cil libmono-system-drawing4.0-cil libmono-system-numerics4.0-cil libmono-system-security4.0-cil libmono-system-xml4.0-cil libmono-system4.0-cil mono-4.0-gac mono-gac mono-runtime mono-runtime-common mono-runtime-sgen 0 upgraded, 28 newly installed, 0 to remove and 71 not upgraded. Need to get 0 B/8195 kB of archives. After this operation, 29.9 MB of additional disk space will be used. Do you want to continue? [Y/n] y Selecting previously unselected package mono-runtime-sgen. (Reading database ... 282124 files and directories currently installed.) Preparing to unpack .../00-mono-runtime-sgen_6.8.0.105+dfsg-2_amd64.deb ... Unpacking mono-runtime-sgen (6.8.0.105+dfsg-2) ... Selecting previously unselected package mono-runtime. Preparing to unpack .../01-mono-runtime_6.8.0.105+dfsg-2_amd64.deb ... Unpacking mono-runtime (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-corlib4.5-cil. Preparing to unpack .../02-libmono-corlib4.5-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-corlib4.5-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-system-core4.0-cil. Preparing to unpack .../03-libmono-system-core4.0-cil_6.8.0.105+dfsg-2_all.deb . .. Unpacking libmono-system-core4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-system-numerics4.0-cil. Preparing to unpack .../04-libmono-system-numerics4.0-cil_6.8.0.105+dfsg-2_all.d eb ... Unpacking libmono-system-numerics4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-system-xml4.0-cil. Preparing to unpack .../05-libmono-system-xml4.0-cil_6.8.0.105+dfsg-2_all.deb .. . Unpacking libmono-system-xml4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-system-security4.0-cil. Preparing to unpack .../06-libmono-system-security4.0-cil_6.8.0.105+dfsg-2_all.d eb ... Unpacking libmono-system-security4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-system-configuration4.0-cil. Preparing to unpack .../07-libmono-system-configuration4.0-cil_6.8.0.105+dfsg-2_ all.deb ... Unpacking libmono-system-configuration4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-system4.0-cil. Preparing to unpack .../08-libmono-system4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-system4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-security4.0-cil. Preparing to unpack .../09-libmono-security4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-security4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package mono-4.0-gac. Preparing to unpack .../10-mono-4.0-gac_6.8.0.105+dfsg-2_all.deb ... Unpacking mono-4.0-gac (6.8.0.105+dfsg-2) ... Selecting previously unselected package mono-gac. Preparing to unpack .../11-mono-gac_6.8.0.105+dfsg-2_all.deb ... Unpacking mono-gac (6.8.0.105+dfsg-2) ... Selecting previously unselected package mono-runtime-common. Preparing to unpack .../12-mono-runtime-common_6.8.0.105+dfsg-2_amd64.deb ... Unpacking mono-runtime-common (6.8.0.105+dfsg-2) ... Setting up libmono-security4.0-cil (6.8.0.105+dfsg-2) ... Setting up mono-runtime-sgen (6.8.0.105+dfsg-2) ... Setting up mono-runtime (6.8.0.105+dfsg-2) ... update-alternatives: using /usr/bin/mono to provide /usr/bin/cli (cli) in auto m ode Setting up libmono-corlib4.5-cil (6.8.0.105+dfsg-2) ... Setting up libmono-system-numerics4.0-cil (6.8.0.105+dfsg-2) ... Setting up libmono-system-configuration4.0-cil (6.8.0.105+dfsg-2) ... Setting up libmono-system-xml4.0-cil (6.8.0.105+dfsg-2) ... Setting up libmono-system-core4.0-cil (6.8.0.105+dfsg-2) ... Setting up libmono-system4.0-cil (6.8.0.105+dfsg-2) ... Setting up libmono-system-security4.0-cil (6.8.0.105+dfsg-2) ... Setting up mono-4.0-gac (6.8.0.105+dfsg-2) ... Setting up mono-gac (6.8.0.105+dfsg-2) ... update-alternatives: using /usr/bin/gacutil to provide /usr/bin/cli-gacutil (global-assembly-cache-tool) in auto mode Setting up mono-runtime-common (6.8.0.105+dfsg-2) ... Selecting previously unselected package ca-certificates-mono. (Reading database ... 282258 files and directories currently installed.) Preparing to unpack .../00-ca-certificates-mono_6.8.0.105+dfsg-2_all.deb ... Unpacking ca-certificates-mono (6.8.0.105+dfsg-2) ... Selecting previously unselected package binfmt-support. Preparing to unpack .../01-binfmt-support_2.2.0-2_amd64.deb ... Unpacking binfmt-support (2.2.0-2) ... Selecting previously unselected package cli-common. Preparing to unpack .../02-cli-common_0.10_all.deb ... Unpacking cli-common (0.10) ... Selecting previously unselected package libglade2-0:amd64. Preparing to unpack .../03-libglade2-0_1%3a2.6.4-2ubuntu2_amd64.deb ... Unpacking libglade2-0:amd64 (1:2.6.4-2ubuntu2) ... Selecting previously unselected package libglib2.0-cil. Preparing to unpack .../04-libglib2.0-cil_2.12.40-3_amd64.deb ... Unpacking libglib2.0-cil (2.12.40-3) ... Selecting previously unselected package libmono-cairo4.0-cil. Preparing to unpack .../05-libmono-cairo4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-cairo4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libgdiplus. Preparing to unpack .../06-libgdiplus_6.0.4+dfsg-2_amd64.deb ... Unpacking libgdiplus (6.0.4+dfsg-2) ... Selecting previously unselected package libmono-system-drawing4.0-cil. Preparing to unpack .../07-libmono-system-drawing4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-system-drawing4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libgtk2.0-cil. Preparing to unpack .../08-libgtk2.0-cil_2.12.40-3_amd64.deb ... Unpacking libgtk2.0-cil (2.12.40-3) ... Selecting previously unselected package libglade2.0-cil. Preparing to unpack .../09-libglade2.0-cil_2.12.40-3_amd64.deb ... Unpacking libglade2.0-cil (2.12.40-3) ... Selecting previously unselected package libmono-posix4.0-cil. Preparing to unpack .../10-libmono-posix4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-posix4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package bless. Preparing to unpack .../11-bless_0.6.0-7_all.deb ... Unpacking bless (0.6.0-7) ... Selecting previously unselected package libmono-btls-interface4.0-cil. Preparing to unpack .../12-libmono-btls-interface4.0-cil_6.8.0.105+dfsg-2_amd64.deb ... Unpacking libmono-btls-interface4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-i18n4.0-cil. Preparing to unpack .../13-libmono-i18n4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-i18n4.0-cil (6.8.0.105+dfsg-2) ... Selecting previously unselected package libmono-i18n-west4.0-cil. Preparing to unpack .../14-libmono-i18n-west4.0-cil_6.8.0.105+dfsg-2_all.deb ... Unpacking libmono-i18n-west4.0-cil (6.8.0.105+dfsg-2) ... Setting up libmono-btls-interface4.0-cil (6.8.0.105+dfsg-2) ... Setting up libglade2-0:amd64 (1:2.6.4-2ubuntu2) ... Setting up ca-certificates-mono (6.8.0.105+dfsg-2) ... Setting up libmono-i18n4.0-cil (6.8.0.105+dfsg-2) ... Setting up libgdiplus (6.0.4+dfsg-2) ... Setting up libmono-posix4.0-cil (6.8.0.105+dfsg-2) ... Setting up cli-common (0.10) ... Setting up libmono-i18n-west4.0-cil (6.8.0.105+dfsg-2) ... Setting up binfmt-support (2.2.0-2) ... Created symlink /etc/systemd/system/multi-user.target.wants/binfmt-support.service → /lib/systemd/system/binfmt-support.service. Setting up libmono-system-drawing4.0-cil (6.8.0.105+dfsg-2) ... Setting up libmono-cairo4.0-cil (6.8.0.105+dfsg-2) ... Setting up libglib2.0-cil (2.12.40-3) ... * Installing 1 assembly from libglib2.0-cil into Mono Setting up libgtk2.0-cil (2.12.40-3) ... * Installing 5 assemblies from libgtk2.0-cil into Mono Processing triggers for sgml-base (1.29.1) ... Setting up libglade2.0-cil (2.12.40-3) ... * Installing 1 assembly from libglade2.0-cil into Mono Processing triggers for desktop-file-utils (0.24+linuxmint1) ... Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... Processing triggers for libc-bin (2.31-0ubuntu9.2) ... Processing triggers for systemd (245.4-4ubuntu3.6) ... Processing triggers for man-db (2.9.1-1) ... Processing triggers for ca-certificates (20210119~20.04.1) ... Updating certificates in /etc/ssl/certs... 0 added, 0 removed; done. Running hooks in /etc/ca-certificates/update.d... done. Updating Mono key store Mono Certificate Store Sync - version 6.8.0.105 Populate Mono certificate store from a concatenated list of certificates. Copyright 2002, 2003 Motus Technologies. Copyright 2004-2008 Novell. BSD licensed. Importing into legacy system store: I already trust 0, your new list has 129 Certificate added: CN=ACCVRAIZ1, OU=PKIACCV, O=ACCV, C=ES Certificate added: C=ES, O=FNMT-RCM, OU=AC RAIZ FNMT-RCM Certificate added: C=IT, L=Milan, O=Actalis S.p.A./03358520967, CN=Actalis Authentication Root CA Certificate added: C=US, O=AffirmTrust, CN=AffirmTrust Commercial .... many lines / SE indicated body of the question is too long Certificate added: C=IN, OU=emSign PKI, O=eMudhra Technologies Limited, CN=emSign Root CA - G1 129 new root certificates were added to your trust store. Import process completed. Done done. Setting up bless (0.6.0-7) ...
dpkg -i attempts to process every package file, in the order specified on the command line. You used glob expansion (*), which usually means alphabetical order. But as you can see from these messages, the package dependencies mean they have to be installed in a specific order: ca-certificates-mono pre-depends on mono-runtime-common (>= 5.20) mono-runtime-common is not installed. bless depends on libglib2.0-cil (>= 2.12.40); however: Package libglib2.0-cil is not configured yet. bless depends on libgtk2.0-cil (>= 2.12.40); however: Package libgtk2.0-cil is not configured yet. If you want to install them directly with dpkg, you'll have to examine the dependencies and work out a suitable order for yourself. apt takes care of all that for you.
Apt installs fine whereas directly using dpkg fails
1,440,255,862,000
I have Ubuntu 16.04.7 LTS installed on one the machines. I used to experiment with other kernels (currently it boots with 4.15.0 built manually from the sources), so somehow I damaged the package linux-image-4.15.0-13-generic which came along with the distro. In particular, /lib/modules/4.15.0-13-generic/* is missing as well as some files in /boot directory. So my question is how do I fix this broken package, is it sufficient to remove it first (apt-get remove or apt autoremove --purge and then re-install again)? I'm being extra careful, because I don't want to ruin the system.
Have you already tried simply reinstalling it? $ sudo apt-get --reinstall install linux-image-4.15.0-13-generic That should not damage the system.
package misses files -- how to fix package?
1,440,255,862,000
In arch based system pacman -r/ --root can be used to provide an alternate root to install packages. This sometimes can be a solution to installing package at different location/ partition, dependency conflict etc. So I'm wondering if there exists any similar solution for debian based systems?
Yes, both tools have an equivalent (based on your description): dpkg’s --root option, and apt’s RootDir setting. Both of these change the root directory (temporarily) for everything used by the tools, including configuration, state, package information etc.; they’re intended more for manipulating a mounted system in its entirety, than for installing an individual package in a different location. See the dpkg and apt.conf manpages for details. To change RootDir, use apt’s -o option: apt -o RootDir=/foo ...
apt/ dpkg equivalent to pacman -r
1,440,255,862,000
I downloaded jdk-13.0.2_linux-x64_bin.deb from oracle and installed using dpkg. However, update-alternatives --config java doesnt show java13. How do i get the java -version to java13 now?
Although it's answered, I'll give you another answer in case you need Oracle/Sun Java (some applications may work only with it, not openjdk). Download the generic Linux .tar jdk from Oracle, not .deb specific for Debian. Untar to a path, for example /opt/SunJava. (I kept Sun in the path, I had it like this before it was taken over by oracle). in your profile add these lines: export JAVA_HOME=/opt/SunJava/ export JRE_HOME=/opt/SunJava/jre/ export PATH=$PATH:$JAVA_HOME/bin sudo update-alternatives --install /usr/bin/java java /opt/SunJavaCurrent/bin/java 100 sudo update-alternatives --install /usr/bin/javac javac /opt/SunJavaCurrent/bin/javac 100 update-alternatives --display java update-alternatives --display javac sudo update-alternatives --config java sudo update-alternatives --config javac That way you can have Oracle/Sun JDK available and able to choose between OpenJDK and OracleJDK. You can also use alternatives to have many different versions of java available. Or you can achieve this using softlinks, ln -s.
How to install Java 13 to Kali Linux?
1,440,255,862,000
I want to install a package manager on an embedded system that does not currently have one. I know that the best way to do this is to use bitbake to simply bake a new image which includes a package manager and then flash that image to the board, but unfortunately I don't currently have access to all of the necessary pieces to build a full operating system image, so I need to hack it somehow. The embedded system is running Automotive Grade Linux (Halibut 8.0.0). sa8155:/etc# cat os-release ID="auto" NAME="auto" VERSION="8.0.0 (halibut)" VERSION_ID="8.0.0" PRETTY_NAME="auto 8.0.0 (halibut)" sa8155:/etc# Linux kernel 4.14.146 😈 >adb shell sa8155:~# uname -srm Linux 4.14.146 aarch64 I'm not sure which version of glibc is installed as the system currently has no development tools: sa8155:~# ldd --version -sh: ldd: not found sa8155:~# lsof -p $$ | grep libc | awk ' { print $NF" --version"; } ' | sh -sh: lsof: not found sa8155:~# If I can get the package manager installed, the first thing I will do is install the development tools. Also, I'm not sure about any other dependencies that the debian package manager may have.
Installing dpkg built for something else on a different distribution to manage software built also elsewhere does not sound like a great idea. This is going to be fraught with binary compatibility problems and subtle errors, as this would be the equivalent of using dpkg with --force-all and disregarding any dependency information. Even projects that use dpkg as an overlay on top of a pre-existing binary "distribution" such as Fink on macOS, do build all the overlayed packages on the macOS system they are targeting, and inject phantom dependencies to represent the base system software. Probably what you should do instead is create a foreign arm64 chroot with «debootstrap --arch=arm64 --foreign», tar that up and unpack and finalize the second stage debootstrapping on that device to get an actual and proper Debian chroot in that system, with a functional dependency system.
Where can I get a tarball of the debian package manager for aarch64?
1,440,255,862,000
I need some online service that gives me a list like this command: apt-cache pkgnames | sort Any hints?
Go to packages page at debian.org. Select the branch (stable / testing / sid) you need, go to a next page, in the bottom there will be a link to all packages page. E.g. this is a page with all packages for debian stable.
How do I get a list of all existing Debian packages of all architectures online?
1,440,255,862,000
Whenever I run apt install to install a package it fails. I get this output at the bottom. It seems to go fine until it asks for permission ([y/n]) then is immediately followed by this output, everytime. I do it as root always, I have changed ownership of /etc/environment so everyone can write to it. when I run dpkg --configure install-info (like apt seemingly does, and fails) I get just the same output. Setting up install-info (5.2.0.dfsg.1-6) ... /usr/sbin/update-info-dir: 1: /etc/environment: /root: Permission denied dpkg: error processing package install-info (--configure): subprocess installed post-installation script returned error exit status 126 Errors were encountered while processing: install-info E: Sub-process /usr/bin/dpkg returned an error code (1) edit: my /etc/environment file is empty other than a line where I set my path variable.
There is clearly a syntax error in /etc/environment. Maybe a stray space, it's impossible to tell for sure from the error message alone. Just fix that error. You say you're setting PATH; the PATH=… line shouldn't have any spaces in it. The path separator is a colon :. The syntax of /etc/environment is just VARIABLE=VALUE, you can't use shell quoting there (/etc/environment is normally read by pam_env, not by a shell). Change the permissions back to allow only root to write to this file. Allowing other users to write to it completely breaks any system security and is completely pointless. Each user can put their own similar settings in ~/.pam_environment.
/etc/environment: /root: Permission denied
1,440,255,862,000
All of a sudden, I am unable to install anything successfully with apt with the below error: The following packages will be upgraded: linux-headers-6.5.0-10-generic 1 upgraded, 0 newly installed, 0 to remove and 4 not upgraded. 75 not fully installed or removed. Need to get 0 B/3,737 kB of archives. After this operation, 28.8 MB of additional disk space will be used. (Reading database ... 156176 files and directories currently installed.) Preparing to unpack .../linux-headers-6.5.0-10-generic_6.5.0-10.10_amd64.deb ... Unpacking linux-headers-6.5.0-10-generic (6.5.0-10.10) over (6.5.0-10.10) ... dpkg: error processing archive /var/cache/apt/archives/linux-headers-6.5.0-10-generic_6.5.0-10.10_amd64.deb (--unpack): error creating symbolic link './lib/modules/6.5.0-10-generic/build': Read-only file system dpkg: error while cleaning up: unable to remove newly-extracted version of '/lib/modules/6.5.0-10-generic/build': Read-only file system Errors were encountered while processing: /var/cache/apt/archives/linux-headers-6.5.0-10-generic_6.5.0-10.10_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) If it helps, and possibly could be, the issue is that I have enabled the experimental feature called TPM Encryption in my Ubuntu 23.10 installation. I have submitted a bug with the inbuilt Ubuntu bug submission software. But I am unable to even install PHP packages without running into this error. I have tried the following: sudo apt clean && sudo apt update && sudo apt upgrade sudo dpkg --configure -a && sudo apt-get -f install Does not resolve the issue.
This is now a known bug and has been submitted by another person on launchpad. The link to the bug report is here.
Unable to install any packages Ubuntu 23.10
1,440,255,862,000
I am making a DEB package that relies on avahi-daemon. I need to set its configuration, but I got this error message: trying to overwrite '/etc/avahi/avahi-daemon.conf', which is also in package avahi-daemon 0.8-5+deb11u2 What is the standard procedure to do such configuration? I do not want to use --force-overwrite as explained here.
If you really want to ship a replacement avahi-daemon.conf (potentially losing other changes made by the local system administrator), you need to declare that your package replaces avahi-daemon. This is valid even for partial replacements. Add an entry in debian/control: Replaces: avahi-daemon Another approach which might be better is to make your changes in a postinst maintainer script.
dpkg: overwrite file in another package
1,440,255,862,000
I am toubleshooting a basic .deb package built from the include script below, specifically its operation if it is installed twice via dpkg -i <package-name>. I found that the postrm script is always called. The official maintainer scripts do not show a case for the same package being installed twice. When I install the following script twice, it will execute the postrm (or prerm if I configure the package with one) in between the preisnt and postinst. This flow doesn't seem to make sense to me since why would installing again follow the flow: preinst prerm postrm postinst If anything from rm would be executed I assume it would be the following: prerm postrm preinst postinst The preinst returns an exit code 0 even the second time its executed, so that would not trigger the prerm or postrm. My question is: Is there a way to avoid calling prerm and postrm under these circumstances? Is there a way to determine how prerm or postrm was called from within the script itself? (since it was not called during a normal install). Here Is the script in case it is useful to see: #!/bin/bash # Command line parameters USERNAME="$1" PUBKEY_FILE="$2" TEMP_DIR="$3" OUTPUT_PATH=$4 MAINTAINER_EMAIL="$5" # Verify required args if [ -z "${USERNAME}" ] || [ -z "${PUBKEY_FILE}" ] || [ -z "${TEMP_DIR}" ] || [ -z "${OUTPUT_PATH}" ]; then echo "Usage: $0 USERNAME PUBKEY_FILE TEMP_DIR OUTPUT_PATH" >&2 exit 1 fi # Ensure maintainer email if [ -z "${MAINTAINER_EMAIL}" ] then MAINTAINER_HOSTNAME="$(hostname)" if [ -z "$HOSTNAME" ] then MAINTAINER_HOSTNAME="localhost" fi MAINTAINER_EMAIL="admin@${MAINTAINER_HOSTNAME}" fi # Constants # Package data PACKAGE_NAME="xyz-lsc-target-${USERNAME}" PACKAGE_VERSION="0.5-1" PACKAGE_NAME_VERSION="${PACKAGE_NAME}_${PACKAGE_VERSION}" MAINTAINER="Maintainer Name <${MAINTAINER_EMAIL}>" PACKAGE_DATE=$(date "+%a, %d %b %Y %H:%M:%S %z") # Used for identifying username entry in /etc/passwd USER_COMMENT="XYZ Local Security Checks" USER_COMMENT_GREP="XYZ\\ Local\\ Security\\ Checks" # Paths PACKAGE_BASE_DIR="${TEMP_DIR}/${PACKAGE_NAME_VERSION}" # Data paths DATA_DIR="${PACKAGE_BASE_DIR}" HOME_SUBDIR="home/${USERNAME}" HOME_DATA_DIR="${DATA_DIR}/${HOME_SUBDIR}" SSH_DATA_DIR="${HOME_DATA_DIR}/.ssh" DOC_SUBDIR="usr/share/doc/${PACKAGE_NAME}" DOC_DATA_DIR="${DATA_DIR}/${DOC_SUBDIR}" # Control file path CONTROL_DIR="${PACKAGE_BASE_DIR}/DEBIAN" # # Test dependencies # if [ -z "$(which dpkg)" ] then echo "dpkg not found" >&2 exit 1 fi if [ -z "$(which fakeroot)" ] then echo "fakeroot not found" >&2 exit 1 fi if [ -z "$(which md5sum)" ] then echo "md5sum not found" >&2 exit 1 fi # # Create data files # # Create .ssh directory mkdir -p "${SSH_DATA_DIR}" # Copy public key AUTH_KEYS_FILE="${SSH_DATA_DIR}/authorized_keys" cp "${PUBKEY_FILE}" "${AUTH_KEYS_FILE}" # Create doc directory mkdir -p "${DOC_DATA_DIR}" # Create Changelog cd "${DOC_DATA_DIR}" CHANGELOG_FILE="${DOC_DATA_DIR}/changelog.Debian" { echo "${PACKAGE_NAME} (${PACKAGE_VERSION}) experimental; urgency=low" echo "" echo " * Automatically generated local security check credential package" echo " " echo "" echo " -- ${MAINTAINER} ${PACKAGE_DATE}" } > "${CHANGELOG_FILE}" # Compress Changelog gzip -f --best "${CHANGELOG_FILE}" CHANGELOG_FILE="${CHANGELOG_FILE}.gz" # Create Copyright info COPYRIGHT_FILE="${DOC_DATA_DIR}/copyright" { echo "Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/" echo "" echo "Files: *" echo "Copyright: 2018-2020 Greenbone AG" echo "License: GPL-2+ (/usr/share/common-licenses/GPL-2)" } > "${COPYRIGHT_FILE}" # Create data archive cd "${DATA_DIR}" tar -C "${DATA_DIR}" -z -cf "../data.tar.gz" "${HOME_SUBDIR}" "${DOC_SUBDIR}" # # Create control files # # Create directory mkdir -p "${CONTROL_DIR}" chmod "0755" "${CONTROL_DIR}" # Create "control" file CONTROL_FILE="${CONTROL_DIR}/control" { echo "Package: ${PACKAGE_NAME}" echo "Version: ${PACKAGE_VERSION}" echo "Maintainer: ${MAINTAINER}" echo "Priority: optional" echo "Architecture: all" echo "Description: XYZ local security check preparation" echo " This package prepares a system for XYZ local security checks." echo " A user is created with a specific SSH authorized key." echo " The corresponding private key is located at the respective" echo " XYZ installation." } > "${CONTROL_FILE}" # Create "preinst" file run before installation PREINST_FILE="${CONTROL_DIR}/preinst" touch "${PREINST_FILE}" chmod "0755" "${PREINST_FILE}" { echo "#!/bin/sh" echo "# Delete XYZ Local Security Checks by username and comment" echo "grep \"${USERNAME}.*${USER_COMMENT_GREP}\" /etc/passwd && userdel -fr ${USERNAME}" echo "# XYZ Local Security Checks user and create home directory" echo "useradd -c \"${USER_COMMENT}\" -d /home/${USERNAME} -m -s /bin/bash ${USERNAME}" echo "# Return exit status 0 to prevent instrm from being triggered" echo "# https://www.debian.org/doc/debian-policy/ch-maintainerscripts.html" echo "exit 0" } > "${PREINST_FILE}" # Create "postinst" file run after installation POSTINST_FILE="${CONTROL_DIR}/postinst" touch "${POSTINST_FILE}" chmod "0755" "${POSTINST_FILE}" { echo "#!/bin/sh" echo "# Change file permissions" echo "chown -R ${USERNAME}:${USERNAME} /home/${USERNAME}" echo "chmod 500 /home/${USERNAME}/.ssh" echo "chmod 400 /home/${USERNAME}/.ssh/authorized_keys" echo "exit 0" } > "${POSTINST_FILE}" # Create "postinst" file run after removal or on error POSTRM_FILE="${CONTROL_DIR}/prerm" touch "${POSTRM_FILE}" chmod "0755" "${POSTRM_FILE}" { echo "#!/bin/sh" echo "echo 'prerm file called!!'" echo "# Remove user only if it was created by this package." echo "# The debian package will run the postun script in case of errors" echo "# (e.g. user already existed)." echo "# Delete the user only if /etc/passwd lists content that suggests" echo "# that the user was created by this package." # echo "set -e # abort on errors" echo "grep \"${USERNAME}.*${USER_COMMENT_GREP}\" /etc/passwd && userdel -fr ${USERNAME}" } > "${POSTRM_FILE}" # Calculate md5 checksums MD5SUMS_FILE="${CONTROL_DIR}/md5sums" cd "${DATA_DIR}" { md5sum "${HOME_SUBDIR}/.ssh/authorized_keys" md5sum "${DOC_SUBDIR}/changelog.Debian.gz" md5sum "${DOC_SUBDIR}/copyright" } > "${MD5SUMS_FILE}" # # Build package # # Combine into .deb file cd "${TEMP_DIR}" fakeroot -- dpkg --build "${PACKAGE_NAME_VERSION}" "${OUTPUT_PATH}"
It seems to me that instead of trying to distinguish initial installations, upgrades and repeat installations, you might want to change your postrm so that it only removes the user on purge. That way, the user remains during upgrades etc. and is only removed if you remove the package with apt purge or dpkg --purge (or equivalent). To do this, check postrm’s first argument; if it’s purge, remove the user, otherwise do nothing. You might also want to change your preinst so that it doesn’t remove an existing user and only creates the user if it doesn’t already exist.
Installing .deb package twice calls postrm
1,440,255,862,000
I am creating a package that depends on the ROS package ros-noetic-moveit-core. More specifically, it contains a shared library linking against libmoveit_robot_model.so. libmoveit_robot_model.so is i a symbolic link to libmoveit_robot_model.so.1.1.7, so libmoveit_robot_model.so.1.1.7 ends in the NEEDED section of my shared library. However, when I package it, dpkg-shlibdeps only adds ros-noetic-moveit-core to the shlibs depends, without any version information. When MoveIt! update to a newer version, like it did when updating from 1.1.6, the library libmoveit_robot_model.so.1.1.7 will be replaced by libmoveit_robot_model.so.1.1.8 (for example), and my package will no longer link, while dpkg do not see the conflict. How can I make sure that my package correctly inform of its dependencies? I see two solutions: Find a way to not include the version suffix when linking so my package is compatible with multiple version of MoveIt!, but I do not like this solution (especially since MoveIt! do not provides a symbols file or event a symbolic link with a major version suffix, like libmoveit_robot_model.so.1). Find a way to make dpkg-shlibdeps find the used version of MoveIt! so my package is upgraded alongside MoveIt!. If it is an error from the MoveIt! packager, what can they do, and what can I do while waiting for the packages to be fixed? More information on MoveIt!: I am using this .deb package. There is no .symbols file. The file /var/lib/dpkg/info/ros-noetic-moveit-core.shlibs contains the following: #... libmoveit_robot_model 1.1.7 ros-noetic-moveit-core #...
This is indeed a packaging problem (and arguably, a library definition problem). Before I get to that, here’s what you can do to fix it: you can specify your own shlibs line, either in debian/shlibs.local in your package’s source code, or in /etc/dpkg/shlibs.override. Add a line of the form libmoveit_robot_model 1.1.7 ros-noetic-moveit-core (>= 1.1.7), ros-noetic-moveit-core (<< 1.1.8) to tie your package to 1.1.7 versions of the ros-noetic-moveit-core package. As for ros-noetic-moveit-core itself, it should ship its libraries in a package whose name reflects the package’s soname. If each version of the package isn’t backwards-compatible, then that name should include the full version (so it’s repeated, in the package name as well as its metadata). If versions 1.1.8 is supposed to be a drop-in replacement for 1.1.7, then the soname should stop at 1.1 or even 1. The relevant chapter of Debian Policy, which describes best practices relevant not only for Debian, is the chapter on shared libraries. This footnote gives a command to calculate the appropriate package name for a library.
dpkg-shlibdeps do not give version information
1,440,255,862,000
I have a related question, but was asked to open a new one. I would like to recompile the Debian package wpasupplicant with IPv6 disabled. I know basics of Debian package compilation, ie: apt-get source wpasupplicant dpkg-buildpackage --build=binary --no-sign What do I have to change, to disable IPv6 completely? Also, this particular package seems to want to compile some qt versions of wpasuplicant, because the compialtion dependencies ask for qtbase5-dev . Can I compile only the pure/commandline version of wpasupplicant, without any gui versions? I don't want to install additional unnecessary dependencies. I am using Debian 10.
Here is an example how to compile wpasupplicant posted in linuxfromscratch . To disable IPV6 support you need to remove CONFIG_IPV6=y from wpasupplicant build configuration file (.config). You need to install some dependencies: sudo apt install -t buster-backports checkinstall sudo apt install desktop-file-utils libxml++2.6-dev qt5-default libssl-dev build-essential \ libdbus-1-dev libdbus-glib-1-2 libdbus-glib-1-dev libreadline-dev pkg-config dbus \ libncurses5-dev libnl-genl-3-dev libnl-3-dev libreadline-dev Download the tarball from here cd /tmp wget https://w1.fi/releases/wpa_supplicant-2.9.tar.gz tar xvf wpa_supplicant-2.9.tar.gz cd wpa_supplicant-2.9/wpa_supplicant Edit your wpasupplicant .config file to remove CONFIG_IPV6=y then run: make sudo checkinstall Install the .deb using gdebi or apt.
recompile wpasupplicant Debian package with IPv6 disabled
1,440,255,862,000
I want to check whether or not a package has been installed. I need a precise match. There will find the packages that start with nginx $ dpkg -l | grep -w 'nginx' ii nginx 1.18.0-0ubuntu1 all small, powerful, scalable web/proxy server ii nginx-common 1.18.0-0ubuntu1 all small, powerful, scalable web/proxy server - common files ii nginx-core 1.18.0-0ubuntu1 amd64 nginx web/proxy server (standard version) $ dpkg -l | grep -w 'nginx$' $ dpkg -l | grep -w "nginx" ii nginx 1.18.0-0ubuntu1 all small, powerful, scalable web/proxy server ii nginx-common 1.18.0-0ubuntu1 all small, powerful, scalable web/proxy server - common files ii nginx-core 1.18.0-0ubuntu1 amd64 nginx web/proxy server (standard version) $ dpkg -l | grep -w "\<nginx\>" ii nginx 1.18.0-0ubuntu1 all small, powerful, scalable web/proxy server ii nginx-common 1.18.0-0ubuntu1 all small, powerful, scalable web/proxy server - common files ii nginx-core 1.18.0-0ubuntu1 amd64 nginx web/proxy server (standard version) $ dpkg -l | grep "\<nginx\>" ii nginx 1.18.0-0ubuntu1 all small, powerful, scalable web/proxy server ii nginx-common 1.18.0-0ubuntu1 all small, powerful, scalable web/proxy server - common files ii nginx-core 1.18.0-0ubuntu1 amd64 nginx web/proxy server (standard version) whereas I want nginx only. How to fix it?
As explained in A package exists in dpkg but it can't be installed via apt, use dpkg-query: dpkg-query -W -f '${db:Status-Status}' nginx This will show “installed” if, and only if, the nginx package, and only that package, is fully installed. If dpkg-query doesn’t work for you, specify the package as an argument to dpkg -l: dpkg -l nginx
How to find an installed package, if it exists, by precise name?
1,440,255,862,000
I am drowning, would any one of us be so kind to throw me a lifesaver... in time :) I am adventuring myself in deployment a .NET Core Worker Service app in Linux. Am trying to create a package for that. This article seems to tackle exactly what I want to achieve. Have followed it, but my dpkg-buildpackage -b --no-sign is failing, as far as I can tell in the install statement below: install -D -m 755 bin/Debug/netcoreapp3.1/linux-x64/publish/* /opt/myApp (the install statement is part of my rules file created after running dh_make as instructed in the article) My rules files: #!/usr/bin/make -f # See debhelper(7) (uncomment to enable) # output every command that modifies files on the build system. #export DH_VERBOSE = 1 # see FEATURE AREAS in dpkg-buildflags(1) #export DEB_BUILD_MAINT_OPTIONS = hardening=+all # see ENVIRONMENT in dpkg-buildflags(1) # package maintainers to append CFLAGS #export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic # package maintainers to append LDFLAGS #export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed %: dh $@ --with=systemd override_dh_auto_build: dotnet publish -r linux-x64 --self-contained true -p:PublishTrimmed=true override_dh_auto_install: # install application mkdir -p /home/myUserName/myApp echo 'Log Message 1' install -D -m 755 bin/Debug/netcoreapp3.1/linux-x64/publish/* /home/myUserName/myApp echo 'Log Message 2' rm /home/myUserName/myApp/*.pdb #delete pdb # install debug symbols mkdir -p /home/myUserName/debug/myApp install -D -m 644 bin/Debug/netcoreapp3.1/linux-x64/publish/*.pdb /home/myUserName/debug/myApp dotnet-symbol --symbols bin/Debug/netcoreapp3.1/linux-x64/publish/ -o /home/myUserName/debug/myApp # auto-install disabled override_dh_shlibdeps: # shilbdeps disabled override_dh_strip: # strip disabled # dh_make generated override targets # This is example for Cmake (See https://bugs.debian.org/641051 ) #override_dh_auto_configure: # dh_auto_configure -- # -DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) If I run it separately, adding the verbose flag (-v), I do not see any error messages (tried | grep -i error, nothing). I am a beginner in Linux, I learned that echoing $? gives me the last statement exit code (for that matter, running an ls and echoing $? returns 0, running the install statement above and echoing $? returns 1). Running errno 1 gives EPERM 1 Operation not permitted I thought perhaps the problem is in writing to /opt. Changed the destination folder to something within /home, still get the same results. How do I proceed from here ? How can I know what is going wrong with this install statement ? Somewhere I read that the package must be installed. I run dpkg-deb -I myApp, but it returns error: failed to read archive 'myApp': No such file or directory, which I believe indicates the package is not installed. Please be so kind and save a life !
When building a package, instead of installing files to their final locations, you need to install them to a “marshaling” area. In Debian packages that’s in a directory with the same name as your binary package, inside debian: install -D -m 755 bin/Debug/netcoreapp3.1/linux-x64/publish/* debian/netcoreapp/opt/myApp (assuming your package is netcoreapp), but this doesn’t explain the issues you’re having with install, and probably won’t fix them. Instead of figuring this out manually, you should use dh_install instead of install: dh_install bin/Debug/netcoreapp3.1/linux-x64/publish/* opt/myApp
Why is this install command returning 1?
1,440,255,862,000
I've had this .deb package that I built with, I think, checkinstall, directly from its git source; and it got a version like libmypackage1_0.10.7-1_armhf.deb. Then after a some months, I did a git pull in the same source, and built new version of the .deb, but it again got the libmypackage1_0.10.7-1_armhf.deb name. Now, after some months, I am not sure anymore, which of the debs is installed - the first, or the second build - because the git hash of the commit I've built does not get included in the file name or version. However, I've kept the build outputs from both runs, and I can see a libmypackage1_0.10.7-1_armhf.buildinfo. So, my question is - when I install such a "built" package via dpkg -i ..., does any information from the .buildinfo end up somewhere, so that I can query it with apt, dpkg, or another tool? Basically I want to query, for instance, "what is the build date of the currently installed libmypackage1_0.10.7-1?" - or any other piece of info that would help me discriminate the two builds. If we need to navigate a bit away from the libmypackage example - let's say I want to retrieve the same info about the bash package; I know I can do this, for instance: $ apt-show-versions bash bash:armhf/stretch 4.4-5 uptodate Could I issue some command, which would tell me, for instance, the build date for this package?
buildinfo information isn’t currently kept with deb packages. There are a number of other ways to determine the information you need. deb packages preserve timestamps, so assuming you can trust them (which seems to be the case here), looking at the timestamps of the files installed by the packages will give you a good approximation of their build timestamp: ls -ldtR $(dpkg -L libmypackage) | grep -v ^d | head If you still have the debs, you can check the installed files against their checksums to determine which one is installed: debsums libmypackage1_0.10.7-1_armhf.deb To link a deb file to its build information, you can use the checksums in the corresponding changes file.
Any way to retrieve build info for apt/dpkg installed packages?
1,593,441,682,000
I recently had to use this command as I got some error due to nvidia package diversion, but I don't exactly know how it is working: LC_MESSAGES=C dpkg-divert --list '*nvidia-340*' | sed -nre 's/^diversion of (.*) to .*/\1/p' | xargs -rd'\n' -n1 -- sudo dpkg-divert --remove sudo apt --fix-broken install I read about LC_MESSAGES and sed, and I know how the pipe operator works, but I can't figure out how exactly this command is working with these specific options.
LC_MESSAGES=C dpkg-divert --list '*nvidia-340*' lists all the diversions matching the glob pattern *nvidia-340*, in English so that the output is of the form “diversion of ... to ... by ...”. sed -nre 's/^diversion of (.*) to .*/\1/p' extracts the text between “diversion of” and “to”, i.e. the name of the diverted files. -nre is equivalent to -n -r -e; -n disables automatic pattern space output, so nothing is output unless requested by a p command (see the end of the sed command); -r enables extended regular expressions; and -e introduces the script we want to run. In the regular expression, ^diversion of matches “diversion of ” (including a space) at the start of a line; (.*) matches any number of characters, and creates a match group; to .* matches “ to ” (including leading and trailing spaces) followed by any character. This is used in a s command to replace the complete text with only \1, the contents of the match group (i.e. the text between “diversion of” and “to”). The final p prints the pattern space if the s command matched. xargs -rd'\n' -n1 -- sudo dpkg-divert --remove runs sudo dpkg-divert --remove on every file output by the previous step, removing the corresponding diversion. sudo apt --fix-broken install tries to fix any broken dependencies.
What do these options on dpkg-divert and sed do as it relates to Nvidia package diversion?
1,593,441,682,000
When I open the terminal a line Install package 'dpkg' to provide command 'dpkg'? [N/y] appears. Is there a way to track which program is trying to run this command? I am clueless why this appears in terminal. I am using Fedora 30 and zsh.
This solved my issue. Thanks all of you! The code solving the problem was made into pull request so all I needed to do at the end was to update oh-my-zsh.
Terminal wants to install dpkg
1,593,441,682,000
I ran the command dpkg -l before I removed two updates from Debian 8.11. I then did sudo apt-get remove openssl and sudo apt-get remove --purge wget and rebooted the device. When I did dpkg -l it showed me the exact same version as before I removed it. The only way I could tell it was removed was by running the sudo apt-get remove command again. Of course, when I reinstalled the update it did install.
If you remove a package, dpkg -l will still show it if it still knows about it. To determine the package’s status, you need to look at the first column: this will show ii for installed packages, rc for removed packages which are still configured, un for non-installed packages, and various other values summarised in the first two lines of dpkg -l’s output: Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend So unless dpkg -l showed ii for both removed packages, the behaviour you saw is normal.
dpkg -l still shows new version of file