date int64 1,220B 1,719B | question_description stringlengths 28 29.9k | accepted_answer stringlengths 12 26.4k | question_title stringlengths 14 159 |
|---|---|---|---|
1,592,034,953,000 |
I tried to upgrade from fedora 25 to fedora 26.
I followed the following commands, as explained in the journal
sudo dnf upgrade --refresh
sudo dnf install dnf-plugin-system-upgrade
sudo dnf system-upgrade download --releasever=26 --allowerasing
sudo dnf system-upgrade reboot
When running the last command, the system reboots and then grub pops-up. I boot the last kernel and then the Upgrade screen shows off.
That is the point when it stays there for a few seconds and then the system is rebooted in fedora 25.
Any idea on how to find out what is the issue?
I am not aware whether there are any log files.
The only thing I could do, was to take a video of the procedure!
Any help will be appreciated!
|
From your DNF log, the initial problem is disk space:
Error Summary
-------------
Disk Requirements:
At least 2459MB more space needed on the / filesystem.
and then from today:
Error Summary
-------------
Disk Requirements:
At least 359MB more space needed on the / filesystem.
which is closer. :) Then I think possibly there was a partial upgrade to 25 to 26 somewhere in there which blew up for reasons unknown, and now the issues remaining are dealing with duplicates from that.
| Can't complete upgrade from fedora 25 to fedora 26 |
1,592,034,953,000 |
While upgrading my system from Fedora 35 to Fedora 36,
I first ran
sudo dnf upgrade --refresh
And then,
sudo dnf system-upgrade download --releasever=36
But it is giving rise to this error:
Before you continue ensure that your system is fully upgraded by running "dnf --refresh upgrade". Do you want to continue [y/N]: y
Copr repo for spotify-tui owned by atim 1.7 kB/s | 3.3 kB 00:01
Copr repo for PyCharm owned by phracek 2.5 kB/s | 3.6 kB 00:01
created by dnf config-manager from https://brav 21 kB/s | 3.3 kB 00:00
created by dnf config-manager from https://brav 120 kB/s | 9.2 kB 00:00
Docker CE Stable - x86_64 22 kB/s | 3.5 kB 00:00
determining the fastest mirror (10 hosts).. done.-- B/s | 0 B --:-- ETA
Fedora 36 - x86_64 2.0 kB/s | 5.6 kB 00:02
Fedora 36 openh264 (From Cisco) - x86_64 1.1 kB/s | 989 B 00:00
Fedora Modular 36 - x86_64 7.8 kB/s | 5.5 kB 00:00
Fedora 36 - x86_64 - Updates 7.5 kB/s | 5.5 kB 00:00
Fedora 36 - x86_64 - Updates 1.2 MB/s | 4.0 MB 00:03
Fedora Modular 36 - x86_64 - Updates 4.2 kB/s | 5.4 kB 00:01
packages for the GitHub CLI 9.6 kB/s | 3.0 kB 00:00
google-chrome 4.9 kB/s | 1.3 kB 00:00
google-chrome 6.8 kB/s | 3.6 kB 00:00
MEGAsync 1.1 kB/s | 1.5 kB 00:01
pgadmin4 82 B/s | 146 B 00:01
Errors during downloading metadata for repository 'pgAdmin4':
- Status code: 404 for https://ftp.postgresql.org/pub/pgadmin/pgadmin4/yum/fedora/fedora-36-x86_64/repodata/repomd.xml (IP: 87.238.57.227)
Error: Failed to download metadata for repo 'pgAdmin4': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried
PostgreSQL common RPMs for Fedora 36 - x86_64 115 B/s | 195 B 00:01
PostgreSQL common RPMs for Fedora 36 - x86_64 76 kB/s | 231 kB 00:03
PostgreSQL 14 for Fedora 36 - x86_64 83 B/s | 195 B 00:02
PostgreSQL 14 for Fedora 36 - x86_64 49 kB/s | 177 kB 00:03
PostgreSQL 13 for Fedora 36 - x86_64 99 B/s | 195 B 00:01
PostgreSQL 13 for Fedora 36 - x86_64 46 kB/s | 175 kB 00:03
PostgreSQL 12 for Fedora 36 - x86_64 105 B/s | 195 B 00:01
PostgreSQL 12 for Fedora 36 - x86_64 66 kB/s | 168 kB 00:02
PostgreSQL 11 for Fedora 36 - x86_64 94 B/s | 195 B 00:02
PostgreSQL 11 for Fedora 36 - x86_64 37 kB/s | 165 kB 00:04
PostgreSQL 10 for Fedora 36 - x86_64 93 B/s | 195 B 00:02
PostgreSQL 10 for Fedora 36 - x86_64 37 kB/s | 128 kB 00:03
RPM Fusion for Fedora 36 - Free 1.9 kB/s | 2.2 kB 00:01
RPM Fusion for Fedora 36 - Free - Updates 11 kB/s | 10 kB 00:00
RPM Fusion for Fedora 36 - Free - Updates 41 kB/s | 75 kB 00:01
RPM Fusion for Fedora 36 - Nonfree - NVIDIA Dri 14 kB/s | 9.8 kB 00:00
RPM Fusion for Fedora 36 - Nonfree - Steam 19 kB/s | 9.4 kB 00:00
Sublime Text - x86_64 - Stable 3.0 kB/s | 2.9 kB 00:00
Visual Studio Code 8.6 kB/s | 3.0 kB 00:00
Visual Studio Code 7.3 MB/s | 25 MB 00:03
Ignoring repositories: pgAdmin4
no group 'arm-tools' from environment 'workstation-product-environment'
No match for group package "qgnomeplatform"
No match for group package "reiserfs-utils"
No match for group package "xorg-x11-drv-armsoc"
No match for group package "intel-media-driver"
No match for group package "authselect-compat"
No match for group package "google-noto-sans-syriac-estrangela-fonts"
No match for group package "google-noto-sans-syriac-eastern-fonts"
No match for group package "ubuntu-title-fonts"
No match for group package "khmer-os-fasthad-fonts"
No match for group package "libguestfs-tools"
No match for group package "mpir-devel"
No match for group package "bcm283x-firmware"
No match for group package "kanjistrokeorders-fonts"
No match for group package "polarsys-b612-sans-fonts"
No match for group package "yanone-tagesschrift-fonts"
No match for group package "google-noto-sans-tibetan-fonts"
No match for group package "cvsgraph"
No match for group package "drehatlas-xaporho-fonts"
No match for group package "google-noto-sans-syriac-western-fonts"
No match for group package "libusbx-devel"
No match for group package "culmus-shofar-fonts"
No match for group package "tlomt-junction-fonts"
No match for group package "vollkorn-fonts"
No match for group package "drehatlas-warender-bibliothek-fonts"
Error:
Problem: package VirtualBox-6.1-6.1.30_148432_fedora33-1.x86_64 requires libvpx.so.6()(64bit), but none of the providers can be installed
- libvpx-1.10.0-2.fc35.x86_64 does not belong to a distupgrade repository
- problem with installed package VirtualBox-6.1-6.1.30_148432_fedora33-1.x86_64
(try to add '--skip-broken' to skip uninstallable packages)
Adding --skip-broken doesn't seem to solve the problem. I get the same error. Tried running sudo dnf remove libvpx-1.10.0-2.fc35.x86_64.
But this gives another warning:
Error:
Problem: The operation would result in removing the following protected packages: gnome-shell
(try to add '--skip-broken' to skip uninstallable packages)
How can I upgrade my Fedora distro?
|
Uninstall the package, do the upgrade, then reinstall:
sudo rpm -e VirtualBox-6.1
Upgrade.
Install VirtualBox from here or better yet install their repo to /etc/yum.repos.d/ and then sudo dnf install VirtualBox-6.1.
| Error while upgrading from Fedora 35 to Fedora 36: VirtualBox requires libvpx.so.6()(64bit), but none of the providers can be installed |
1,584,874,164,000 |
I just tried to upgrade my system from Debian Jessie to stretch.
First I changed /etc/apt/sources.list to:
deb http://security.debian.org/ stretch/updates main
deb-src http://security.debian.org/ stretch/updates main
deb http://ftp.debian.org/debian/ stretch main contrib non-free
deb-src http://ftp.debian.org/debian/ stretch main contrib non-free
Then I ran apt-get update && apt-get upgrade && apt-get dist-upgrade. Now I have a big mess with unmet dependencies:
a@b ~ % sudo 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:
aptitude : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
calibre-bin : Depends: libicu57 (>= 57.1-1~) but it is not installed
Recommends: calibre (>= 2.75.1+dfsg-1) but 2.5.0+dfsg-1 is installed
djvulibre-bin : Depends: libdjvulibre21 (= 3.5.25.4-4+b1) but 3.5.27.1-7 is installed
easytag : Depends: libtag1c2a (>= 1.9.1) but it is not installable
evolution : Depends: evolution-data-server (< 3.13) but 3.22.7-1 is installed
evolution-data-server : Depends: libebook-1.2-16 (>= 3.17) but it is not installed
Depends: libebook-contacts-1.2-2 (>= 3.16.2) but it is not installed
Depends: libedataserver-1.2-22 (>= 3.21.92) but it is not installed
Depends: libicu57 (>= 57.1-1~) but it is not installed
Depends: evolution-data-server-common (= 3.22.7-1) but 3.12.9~git20141128.5242b0-2+deb8u3 is installed
gedit : Depends: libgtk-3-0 (>= 3.21.4) but 3.14.5-1+deb8u1 is installed
gir1.2-webkit2-4.0 : Depends: libwebkit2gtk-4.0-37 (>= 2.13.91) but it is not installed
gnome-online-accounts : Depends: libwebkit2gtk-4.0-37 (>= 2.8.1) but it is not installed
gnome-online-miners : Depends: grilo-plugins-0.3 but it is not installed
gnome-system-monitor : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
gparted : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
gstreamer1.0-plugins-bad : Depends: libgtk-3-0 (>= 3.16.2) but 3.14.5-1+deb8u1 is installed
gvfs : Depends: gvfs-daemons (< 1.22.2-1.1~)
Depends: gvfs-libs (= 1.22.2-1) but 1.30.4-1 is installed
Depends: gvfs-common (= 1.22.2-1) but 1.30.4-1 is installed
gvfs-backends : Depends: libglib2.0-0 (>= 2.49.3) but 2.48.0-1~bpo8+1 is installed
Depends: gvfs (= 1.30.4-1) but 1.22.2-1 is installed
gvfs-bin : Depends: libglib2.0-0 (>= 2.49.3) but 2.48.0-1~bpo8+1 is installed
gvfs-daemons : Depends: libglib2.0-0 (>= 2.49.3) but 2.48.0-1~bpo8+1 is installed
gvfs-libs : Depends: libglib2.0-0 (>= 2.49.3) but 2.48.0-1~bpo8+1 is installed
imagescan : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
inkscape : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
libatkmm-1.6-1 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
libavfilter5 : Depends: libopencv-core2.4 but it is not installable
Depends: libopencv-imgproc2.4 but it is not installable
libboost-date-time1.55-dev : Depends: libboost-date-time1.55.0 (= 1.55.0+dfsg-3) but it is not installable
libcairomm-1.0-1 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
libcamel-1.2-59 : Depends: libicu57 (>= 57.1-1~) but it is not installed
libclutter-1.0-0 : Depends: libgtk-3-0 (>= 3.16.2) but 3.14.5-1+deb8u1 is installed
libclutter-gtk-1.0-0 : Depends: libgtk-3-0 (>= 3.21.0) but 3.14.5-1+deb8u1 is installed
libcmis-0.4-4 : Depends: libboost-date-time1.55.0 but it is not installable
libcpan-meta-perl : Depends: perl (>= 5.21.5) but 5.20.2-3+deb8u7 is installed or
libjson-pp-perl (>= 2.27300)
libcwidget3 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
libebackend-1.2-10 : Depends: libedataserver-1.2-22 (>= 3.21.90) but it is not installed
libecal-1.2-19 : Depends: libedataserver-1.2-22 (>= 3.17) but it is not installed
libedata-book-1.2-25 : Depends: libebook-contacts-1.2-2 (>= 3.16.2) but it is not installed
Depends: libedataserver-1.2-22 (>= 3.21.90) but it is not installed
libedata-cal-1.2-28 : Depends: libedataserver-1.2-22 (>= 3.21.90) but it is not installed
libfarstream-0.1-0 : Depends: gstreamer0.10-plugins-good (>= 0.10.29) but it is not installable
libgdal1h : Depends: libdapserver7 but it is not installable
libgirepository-1.0-1 : Depends: libglib2.0-0 (>= 2.50.0) but 2.48.0-1~bpo8+1 is installed
libglibmm-2.4-1c2a : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
libgoa-backend-1.0-1 : Depends: libgtk-3-0 (>= 3.19.12) but 3.14.5-1+deb8u1 is installed
Depends: libwebkit2gtk-4.0-37 (>= 2.8.1) but it is not installed
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
libgtksourceview-3.0-1 : Depends: libgtk-3-0 (>= 3.19.12) but 3.14.5-1+deb8u1 is installed
libical2 : Depends: libicu57 (>= 57.1-1~) but it is not installed
libjavascriptcoregtk-4.0-18 : Depends: libicu57 (>= 57.1-1~) but it is not installed
libnautilus-extension1a : Depends: libglib2.0-0 (>= 2.49.1) but 2.48.0-1~bpo8+1 is installed
libopenmpi-dev : Depends: libopenmpi1.6 (= 1.6.5-9.1+deb8u1) 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
libqt5core5a : Depends: libicu57 (>= 57.1-1~) but it is not installed
libqt5webkit5 : Depends: libicu57 (>= 57.1-1~) but it is not installed
libreoffice-calc : Depends: libicu57 (>= 57.1-1~) but it is not installed
libreoffice-core : Depends: libicu57 (>= 57.1-1~) but it is not installed
libreoffice-draw : Depends: libicu57 (>= 57.1-1~) but it is not installed
libreoffice-evolution : Depends: libebook-1.2-16 but it is not installed
libreoffice-gtk2 : Depends: libicu57 (>= 57.1-1~) but it is not installed
libreoffice-writer : Depends: libicu57 (>= 57.1-1~) but it is not installed
librhythmbox-core10 : Depends: libgtk-3-0 (>= 3.16.2) but 3.14.5-1+deb8u1 is installed
libscotch-5.1 : Depends: libopenmpi1.6 but it is not installable
libsoprano4 : Depends: libclucene-core1 (>= 2.3.3.4) but it is not installable
libtag1v5-vanilla : Depends: libicu57 (>= 57.1-1~) but it is not installed
libtotem0 : Depends: libgnome-desktop-3-12 (>= 3.17.92) but it is not installed
Depends: libgtk-3-0 (>= 3.19.4) but 3.14.5-1+deb8u1 is installed
libvtk5.8 : Depends: libopenmpi1.6 but it is not installable
libvtk6.1 : Depends: libopenmpi1.6 but it is not installable
libxml++2.6-2 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
lightspark-common : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
open-vm-tools-desktop : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
openmpi-bin : Depends: libopenmpi1.6 but it is not installable
paraview : Depends: libopenmpi1.6 but it is not installable
pavucontrol : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
perl-doc : Depends: perl (>= 5.24.1-1) but 5.20.2-3+deb8u7 is installed
python-vtk6 : Depends: libopenmpi1.6 but it is not installable
python3 : Depends: python3-minimal (= 3.4.2-2) but 3.5.3-1 is installed
Depends: libpython3-stdlib (= 3.4.2-2) but 3.5.3-1 is installed
python3-apt : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-brlapi : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-cairo : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-dbus : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-dev : Depends: python3 (= 3.5.3-1) but 3.4.2-2 is installed
python3-gi-cairo : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
Depends: python3-gi (= 3.22.0-2) but 3.14.0-1 is installed
python3-markupsafe : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-pil : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-pyqt5 : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-pyqt5.qtwebkit : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-sip : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-uno : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-yaml : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
rhythmbox : Depends: rhythmbox-data (= 3.1-1) but 3.4.1-2 is installed
rhythmbox-plugins : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
Depends: rhythmbox (= 3.4.1-2+b1) but 3.1-1 is installed
spamassassin : Depends: libmail-dkim-perl but it is not installed
texlive-binaries : Depends: libptexenc1 (< 2014.20140926.35254-6.1~) but 2016.20160513.41080.dfsg-2 is installed
Depends: libkpathsea6 (< 2014.20140926.35254-6.1~) but 2016.20160513.41080.dfsg-2 is installed
totem : Depends: libtotem0 (< 3.15) but 3.22.1-1 is installed
Depends: totem-common (= 3.14.0-2) but 3.22.1-1 is installed
totem-plugins : Depends: libgtk-3-0 (>= 3.19.4) but 3.14.5-1+deb8u1 is installed
Depends: totem (= 3.22.1-1) but 3.14.0-2 is installed
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).
If I run apt --fix-broken install the problem persists:
a@b ~ % sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
aptitude : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
calibre-bin : Depends: libicu57 (>= 57.1-1~) but it is not installed
Recommends: calibre (>= 2.75.1+dfsg-1) but 2.5.0+dfsg-1 is installed
[The same as in the upper error log]
totem : Depends: libtotem0 (< 3.15) but 3.22.1-1 is installed
Depends: totem-common (= 3.14.0-2) but 3.22.1-1 is installed
totem-plugins : Depends: libgtk-3-0 (>= 3.19.4) but 3.14.5-1+deb8u1 is installed
Depends: totem (= 3.22.1-1) but 3.14.0-2 is installed
vlc-nox : Depends: libtag1c2a (>= 1.9.1) but it is not installable
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
The output of apt-get dist-upgrade:
a@b ~ % sudo 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:
aptitude : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
calibre-bin : Depends: libicu57 (>= 57.1-1~) but it is not installed
Recommends: calibre (>= 2.75.1+dfsg-1) but 2.5.0+dfsg-1 is installed
djvulibre-bin : Depends: libdjvulibre21 (= 3.5.25.4-4+b1) but 3.5.27.1-7 is installed
easytag : Depends: libtag1c2a (>= 1.9.1) but it is not installable
evolution : Depends: evolution-data-server (< 3.13) but 3.22.7-1 is installed
evolution-data-server : Depends: libebook-1.2-16 (>= 3.17) but it is not installed
Depends: libebook-contacts-1.2-2 (>= 3.16.2) but it is not installed
Depends: libedataserver-1.2-22 (>= 3.21.92) but it is not installed
Depends: libicu57 (>= 57.1-1~) but it is not installed
Depends: evolution-data-server-common (= 3.22.7-1) but 3.12.9~git20141128.5242b0-2+deb8u3 is installed
gedit : Depends: libgtk-3-0 (>= 3.21.4) but 3.14.5-1+deb8u1 is installed
gir1.2-webkit2-4.0 : Depends: libwebkit2gtk-4.0-37 (>= 2.13.91) but it is not installed
gnome-online-accounts : Depends: libwebkit2gtk-4.0-37 (>= 2.8.1) but it is not installed
gnome-online-miners : Depends: grilo-plugins-0.3 but it is not installed
gnome-system-monitor : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
gparted : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
gstreamer1.0-plugins-bad : Depends: libgtk-3-0 (>= 3.16.2) but 3.14.5-1+deb8u1 is installed
gvfs : Depends: gvfs-daemons (< 1.22.2-1.1~)
Depends: gvfs-libs (= 1.22.2-1) but 1.30.4-1 is installed
Depends: gvfs-common (= 1.22.2-1) but 1.30.4-1 is installed
gvfs-backends : Depends: libglib2.0-0 (>= 2.49.3) but 2.48.0-1~bpo8+1 is installed
Depends: gvfs (= 1.30.4-1) but 1.22.2-1 is installed
gvfs-bin : Depends: libglib2.0-0 (>= 2.49.3) but 2.48.0-1~bpo8+1 is installed
gvfs-daemons : Depends: libglib2.0-0 (>= 2.49.3) but 2.48.0-1~bpo8+1 is installed
gvfs-libs : Depends: libglib2.0-0 (>= 2.49.3) but 2.48.0-1~bpo8+1 is installed
imagescan : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
inkscape : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
libatkmm-1.6-1 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
libavfilter5 : Depends: libopencv-core2.4 but it is not installable
Depends: libopencv-imgproc2.4 but it is not installable
libboost-date-time1.55-dev : Depends: libboost-date-time1.55.0 (= 1.55.0+dfsg-3) but it is not installable
libcairomm-1.0-1 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
libcamel-1.2-59 : Depends: libicu57 (>= 57.1-1~) but it is not installed
libclutter-1.0-0 : Depends: libgtk-3-0 (>= 3.16.2) but 3.14.5-1+deb8u1 is installed
libclutter-gtk-1.0-0 : Depends: libgtk-3-0 (>= 3.21.0) but 3.14.5-1+deb8u1 is installed
libcmis-0.4-4 : Depends: libboost-date-time1.55.0 but it is not installable
libcpan-meta-perl : Depends: perl (>= 5.21.5) but 5.20.2-3+deb8u7 is installed or
libjson-pp-perl (>= 2.27300)
libcwidget3 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
libebackend-1.2-10 : Depends: libedataserver-1.2-22 (>= 3.21.90) but it is not installed
libecal-1.2-19 : Depends: libedataserver-1.2-22 (>= 3.17) but it is not installed
libedata-book-1.2-25 : Depends: libebook-contacts-1.2-2 (>= 3.16.2) but it is not installed
Depends: libedataserver-1.2-22 (>= 3.21.90) but it is not installed
libedata-cal-1.2-28 : Depends: libedataserver-1.2-22 (>= 3.21.90) but it is not installed
libfarstream-0.1-0 : Depends: gstreamer0.10-plugins-good (>= 0.10.29) but it is not installable
libgdal1h : Depends: libdapserver7 but it is not installable
libgirepository-1.0-1 : Depends: libglib2.0-0 (>= 2.50.0) but 2.48.0-1~bpo8+1 is installed
libglibmm-2.4-1c2a : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
libgoa-backend-1.0-1 : Depends: libgtk-3-0 (>= 3.19.12) but 3.14.5-1+deb8u1 is installed
Depends: libwebkit2gtk-4.0-37 (>= 2.8.1) but it is not installed
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
libgtksourceview-3.0-1 : Depends: libgtk-3-0 (>= 3.19.12) but 3.14.5-1+deb8u1 is installed
libical2 : Depends: libicu57 (>= 57.1-1~) but it is not installed
libjavascriptcoregtk-4.0-18 : Depends: libicu57 (>= 57.1-1~) but it is not installed
libnautilus-extension1a : Depends: libglib2.0-0 (>= 2.49.1) but 2.48.0-1~bpo8+1 is installed
libopenmpi-dev : Depends: libopenmpi1.6 (= 1.6.5-9.1+deb8u1) 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
libqt5core5a : Depends: libicu57 (>= 57.1-1~) but it is not installed
libqt5webkit5 : Depends: libicu57 (>= 57.1-1~) but it is not installed
libreoffice-calc : Depends: libicu57 (>= 57.1-1~) but it is not installed
libreoffice-core : Depends: libicu57 (>= 57.1-1~) but it is not installed
libreoffice-draw : Depends: libicu57 (>= 57.1-1~) but it is not installed
libreoffice-evolution : Depends: libebook-1.2-16 but it is not installed
libreoffice-gtk2 : Depends: libicu57 (>= 57.1-1~) but it is not installed
libreoffice-writer : Depends: libicu57 (>= 57.1-1~) but it is not installed
librhythmbox-core10 : Depends: libgtk-3-0 (>= 3.16.2) but 3.14.5-1+deb8u1 is installed
libscotch-5.1 : Depends: libopenmpi1.6 but it is not installable
libsoprano4 : Depends: libclucene-core1 (>= 2.3.3.4) but it is not installable
libtag1v5-vanilla : Depends: libicu57 (>= 57.1-1~) but it is not installed
libtotem0 : Depends: libgnome-desktop-3-12 (>= 3.17.92) but it is not installed
Depends: libgtk-3-0 (>= 3.19.4) but 3.14.5-1+deb8u1 is installed
libvtk5.8 : Depends: libopenmpi1.6 but it is not installable
libvtk6.1 : Depends: libopenmpi1.6 but it is not installable
libxml++2.6-2 : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
lightspark-common : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
open-vm-tools-desktop : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
openmpi-bin : Depends: libopenmpi1.6 but it is not installable
paraview : Depends: libopenmpi1.6 but it is not installable
pavucontrol : Depends: libsigc++-2.0-0c2a (>= 2.2.0) but it is not installable
perl-doc : Depends: perl (>= 5.24.1-1) but 5.20.2-3+deb8u7 is installed
python-vtk6 : Depends: libopenmpi1.6 but it is not installable
python3 : Depends: python3-minimal (= 3.4.2-2) but 3.5.3-1 is installed
Depends: libpython3-stdlib (= 3.4.2-2) but 3.5.3-1 is installed
python3-apt : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-brlapi : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-cairo : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-dbus : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-dev : Depends: python3 (= 3.5.3-1) but 3.4.2-2 is installed
python3-gi-cairo : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
Depends: python3-gi (= 3.22.0-2) but 3.14.0-1 is installed
python3-markupsafe : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-pil : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-pyqt5 : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-pyqt5.qtwebkit : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-sip : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-uno : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
python3-yaml : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
rhythmbox : Depends: rhythmbox-data (= 3.1-1) but 3.4.1-2 is installed
rhythmbox-plugins : Depends: python3 (>= 3.5~) but 3.4.2-2 is installed
Depends: rhythmbox (= 3.4.1-2+b1) but 3.1-1 is installed
spamassassin : Depends: libmail-dkim-perl but it is not installed
texlive-binaries : Depends: libptexenc1 (< 2014.20140926.35254-6.1~) but 2016.20160513.41080.dfsg-2 is installed
Depends: libkpathsea6 (< 2014.20140926.35254-6.1~) but 2016.20160513.41080.dfsg-2 is installed
totem : Depends: libtotem0 (< 3.15) but 3.22.1-1 is installed
Depends: totem-common (= 3.14.0-2) but 3.22.1-1 is installed
totem-plugins : Depends: libgtk-3-0 (>= 3.19.4) but 3.14.5-1+deb8u1 is installed
Depends: totem (= 3.22.1-1) but 3.14.0-2 is installed
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).
What's the way to go to fix it?
|
I traced the problem back to a manual installation of python3.5.
After manually removing it (rm -r /usr/local/python*) as described in this bug, the dist-upgrade worked out well.
| Unmet dependencies upgrading to stretch [closed] |
1,584,874,164,000 |
Upon performing an upgrade from Ubuntu 17 to Ubuntu 18.04 LTS, my PC was in standby mode, thereby interrupting the last 1/4 portion of the upgrade. When trying to boot in Grub loader: "Advanced Options"; "Linux 4.7.2", the machine loads the drive and asks for password. Then the screen just goes blank. If I boot into 4.7.2 recovery mode, I am able to access Ubuntu 18.04 and login.
Grub configuration is at i8042.reset nomodeset. Previously it was set to quiet splash. Neither has solved the boot issue.
What can I do to solve the interrupted upgrade process (to where the upgrade did not successfully complete during running in Ubuntu 17), and to where I can boot into Ubuntu without recovery mode?
System information:
~$ lsb_release -a
LSB Version: core-9.20170808ubuntu1-noarch:printing-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch Distributor ID: Ubuntu Description: Ubuntu 18.04 LTS Release: 18.04 Codename: bionic
~$ uname -a
4.7.2-040702-generic #201608201334 SMP Sat Aug 20 17:37:03 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
Is there anything I can do to where Ubuntu 18.04 can boot normally? Without having to choose Recovery Mode? How can I correct this issue?
|
Try the following steps in this order:
sudo rm /var/lib/dpkg/lock
sudo dpkg --configure -a
# only continue if the above results in zero packages left to configure.
sudo apt-get dist-upgrade
| Ubuntu 18.04 LTS only boots with Recovery Mode with Linux 4.7.2 After Upgrade |
1,584,874,164,000 |
I do a lot of software testing and that requires me to build many different projects from source. I've recently upgraded to Fedora 33 from 31, and essentially, I have a group of issues that involve either not being able to run software that I had previously built due to "missing" dependencies, and/or when I try to build software, I get errors that packages or libraries are missing, mostly after running ./configure or make, when many times, they really aren't and certainly were not knowingly removed by me. Other times, an update to a package (such as Python 3.6 -> 3.9) causes issues with some scripts, etc...
The reason why it has me confused (with exception of that python issue) at times is because, I never actually removed many of the libraries and it just seems that for whatever reason, they don't get recognized anymore, so I have to manually show the build system where they are, or just reinstall the dependencies, and so on...
Is there any general advice for clearing up these types of issues after upgrading a version of Fedora or other Linux distributions? I'd imagine this is somewhat common and while I can certainly troubleshoot every individual issue on a case-by-case basis, I would consider this one collective issue, and as I continue my Linux journey, would like to become more adept at addressing this issue as I upgrade in the future.
|
Compiling any non-trivial piece of software from source can be a complex task, although nowadays there's quite a bit of automation to hide much of the details. But when something goes wrong in the process, you'll need to be able to understand the process to effectively troubleshoot it.
Unfortunately, it seems to me that the knowledge and skills to troubleshoot a failing compilation process are increasingly understood as "something only the actual software developers have", while it's actually also very necessary for testers, and sometimes, highly useful for system administrators too. In fact, the underlying idea of Open Source software assumes that everyone should be able to recompile a software package if they feel like doing it.
When ./configure complains about a missing library, it's often really looking for the -devel package for that library.
./configure is actually a shell script that runs a number of tests to find and verify the prerequisites for compiling a software package. It is generated by the autoconf toolkit, which is used to ease the job of making a source code package compilable on several hardware architectures and unix-like OSs.
Sometimes a library development project or a Linux distribution might make some changes in the way the development headers (*.h files) are laid out under /usr/include/. For example, an old version might have them directly under /usr/include/, and a newer one might have them under /usr/include/library_name/ sub-directory. If a library developer makes a change that is backwards-incompatible at the source level, it might be necessary to include the library version number, so that distributions may support an old version of the library as /usr/include/library_name/ and a new version as /usr/include/library_name2 or something. If such a change is newer than the version of autoconf used to create the ./configure script for a software package, it might not be able to auto-detect the new location.
autoconf is not perfect, and there are also other mechanisms to supplement or replace it. Another common one is pkg-config: each library package that supports it will include in its -devel package (or equivalent) a *.pc file that documents important compiler options, dependencies and other information that is important when building software to use the library in question.
The make step will usually need both the actual library package and its -devel package to be present. When a software package is built using make, often several parts of it are compiled from source code to binary object files in isolation, and then those files are linked together to form the executable(s).
The compilation sub-step might require only the *.h files provided by the -devel package, but the linking sub-step requires that the actual library package is present.
If you need some piece of software compiled for OS major version X to run on OS major version (X+n), you might encounter problems with shared libraries:
a library has undergone a backwards-incompatible change
a library has been packaged differently to work around a name conflict or some other issue
an old library has been completely dropped from the distribution and the functionality is now provided with a different library, or in another way altogether.
To work around problems like this, you might have to find the old libraries the software actually wants, place them into some directory that is not searched for libraries normally, and start the old program using a wrapper script that uses environment variables like LD_LIBRARY_PATH to specify a custom search path for libraries for that application only. See the ld.so(8) man page and particularly its ENVIRONMENT chapter for more details on things you can do to change the way an application looks for shared libraries at run-time.
In this way, I can still run a Linux version of Sid Meier's Alpha Centauri (copyright 1999) on a current Debian 10 system. Not too shabby, I'd say.
| What types of things break regarding building of native software when upgrading versions of Fedora, and what are some solutions? [closed] |
1,584,874,164,000 |
I'm trying to upgrade Debian from stretch to buster but there are two packages with dependencies the package manager cannot solve (see upgrade output):
uget: Somehow the package manager has old dependencies (it searches for libcurl3 instead of libcurl4 as it should) despite having run apt update several times.
virtualbox-ext-pack: I've already read that VirtualBox is not supported on Buster and have commented out stretch-backports on my sources.list file. Despite this, it tries to fix the dependencies.
I've tried removing the packages (see remove output) and some other standard commands to no avail.
What should I do to fix the system?
Relevant outputs
Update
myname# apt update
Hit:1 http://security.debian.org buster/updates InRelease
Hit:2 http://ftp.debian.org/debian buster InRelease
Hit:3 https://repo.skype.com/deb stable InRelease
Hit:4 https://updates.signal.org/desktop/apt xenial InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
579 packages can be upgraded. Run 'apt list --upgradable' to see them.
Upgrade
myname# apt 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:
uget : Depends: libcurl3 (>= 7.16.2) but it is not installable
virtualbox-ext-pack : Depends: virtualbox (>= 5.2.24-dfsg-0~) or
virtualbox-5.2 but it is not installable
Depends: virtualbox (< 5.2.24-dfsg-z) or
virtualbox-5.2 but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
--fix-broken
myname# 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:
alsa-base bluedevil brasero brasero-cdrkit ca-certificates-mono dolphin4 dvdauthor ebtables eclipse-platform-data fonts-hack-ttf fonts-oxygen
gfortran-mingw-w64 gfortran-mingw-w64-i686 gfortran-mingw-w64-x86-64 gir1.2-gepub-0.4 gir1.2-javascriptcoregtk-3.0 gir1.2-tracker-1.0
gir1.2-zeitgeist-2.0 gnat-mingw-w64 gnat-mingw-w64-base gnat-mingw-w64-i686 gnat-mingw-w64-x86-64 gnome-icon-theme-symbolic gnome-tweak-tool
growisofs iputils-arping kde-baseapps-data kde-config-sddm kde-style-oxygen-qt5 kdepasswd kdepim-doc kgamma5 kmenuedit kpart-webkit ktnef kwrited
libasm3-java libattr1:i386 libavcodec57:i386 libavresample3:i386 libavutil55:i386 libblas-common libcamel-1.2-59 libclassworlds-java libcln6
libcoin80v5 libcomerr2:i386 libcommons-beanutils-java libcommons-collections3-java libcommons-dbcp-java libcommons-digester-java
libcommons-httpclient-java libcommons-lang-java libcommons-pool-java libcryptui0a libdata-random-perl libdb-java libdb-je-java libdb5.3-java
libdb5.3-java-jni libdoxia-core-java libeasymock-java libebook-1.2-16 libeclipse-aether-java libedata-cal-1.2-28 libedataserver-1.2-22
libedataserverui-1.2-1 libequinox-osgi-java libextutils-depends-perl libextutils-pkgconfig-perl libfelix-bundlerepository-java
libfelix-gogo-command-java libfelix-gogo-runtime-java libfelix-gogo-shell-java libfelix-osgi-obr-java libfelix-shell-java libfelix-utils-java
libfile-copy-recursive-perl libfile-slurp-tiny-perl libfwupd1 libgcab-1.0-0 libgcr-3-common libgd-perl libgeos-3.4.2 libgepub0 libgit2-24
libgles2-mesa libgltf-0.0-0v5 libgnome-autoar-common libgnome-desktop-3-12 libgom-1.0-common libgoocanvas-common libgoocanvas3
libgtk2-ex-podviewer-perl libgtk2-ex-simple-list-perl libgutenprint2 libgweather-3-6 libhttp-parser2.1 libhttp-server-simple-perl libical2
libicu4j-4.2-java libicu4j-49-java libicu57:i386 libidn11:i386 libiodbc2 libjavascriptcoregtk-3.0-0 libjetty9-java libjgraph-java
libjgrapht0.8-java libjson-pp-perl libjtidy-java libkdecorations2private5v5 libkf5akonadicore-bin libkf5akonadiprivate5 libkf5calendarcore5
libkf5dbusaddons-bin libkf5gapi-data libkf5gpgmepp-pthread5 libkf5iconthemes-bin libkf5incidenceeditor-bin libkf5kdgantt2-5
libkf5mailcommon-plugins libkf5pimcommon-plugins libkf5qgpgme5 libkf5syndication5 libkf5webkit5 libkonqsidebarplugin4a libkxmlrpcclient4
liblivemedia57 liblucene2-java libmaven2-core-java libmcrypt4 libmetadata-extractor-java libmouse-perl libmozjs-24-0 libmysqlclient18
libnet-dropbox-api-perl libnet-oauth-perl libnetty-3.9-java libnfs8 libobjc-6-dev libobjenesis-java liboce-foundation10 liboce-modeling10
liboce-ocaf-lite10 liboce-ocaf10 liboce-visualization10 libopencv-calib3d2.4v5 libopencv-features2d2.4v5 libopencv-flann2.4v5
libopencv-objdetect2.4v5 libopencv-video2.4v5 libopenspecfun1 liborcus-0.11-0 liboxygenstyle5-5 liboxygenstyleconfig5-5 libpackagekitqt5-0
libpath-class-perl libplexus-ant-factory-java libplexus-bsh-factory-java libplexus-classworlds2-java libplexus-cli-java
libplexus-component-metadata-java libplexus-container-default-java libplexus-container-default1.5-java libplexus-containers1.5-java
libplexus-interactivity-api-java libpodofo0.9.4 libproc-simple-perl libproj0 libprotobuf-lite10 libpyside-py3-1.2 libpython3.5-dev
libqcustomplot1.3 libqdox2-java libqgsttools-p1 libqpdf17 libqt5clucene5 libqt5designercomponents5 libqt5multimediaquick-p5 libre2-3 librpm3
librpmbuild3 librpmio3 librpmsign3 libsane-extras libsane-extras:i386 libsane-extras-common libsane-extras-dev libshiboken-py3-1.2v5
libsndio6.1:i386 libsodium18 libsoprano4 libsoqt4-20 libsort-naturally-perl libspeexdsp1:i386 libsuitesparseconfig4 libswresample2:i386
libswt-cairo-gtk-3-jni libswt-glx-gtk-3-jni libswt-gnome-gtk-3-jni libswt-gtk-3-java libswt-gtk-3-jni libswt-webkit-gtk-3-jni libsynctex1
libtomcat8-java libtracker-control-1.0-0 libtracker-miner-1.0-0 libtracker-sparql-1.0-0 libtxc-dxtn-s2tc:i386 libunbound2 libva-drm1:i386
libva-wayland1 libvpx4:i386 libvte-common libvte9 libwagon-ftp-java libwagon-java libwebkitgtk-3.0-0 libwebpmux2:i386 libwww-mechanize-perl
libx11-protocol-other-perl libx264-148:i386 libx265-95:i386 libxbean-java libxfont1 libxmpcore-java octave-info owncloud-files perlmagick
php-xml-parser php5-intl php5-ldap php5-mcrypt php5-mysql php5-pgsql php5-sqlite plasma-discover plasma-discover-common python-antlr python-pam
python-ply python-pyinotify python-qt4-gl python3-tz python3.5 python3.5-dev python3.5-minimal qdoc-qt5 qml-module-org-kde-extensionplugin
qml-module-org-kde-kirigami qpdf qt5-assistant qttools5-dev-tools rename sat4j seahorse-daemon software-properties-kde soprano-daemon tcpd
user-manager virtualbox-guest-utils vlc-plugin-visualization
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
uget
The following packages will be REMOVED:
virtualbox-ext-pack
The following packages will be upgraded:
uget
1 upgraded, 0 newly installed, 1 to remove and 578 not upgraded.
Need to get 0 B/369 kB of archives.
After this operation, 14.3 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Reading changelogs... Done
(Reading database ... 670161 files and directories currently installed.)
Removing virtualbox-ext-pack (5.2.24-2~bpo9+1) ...
/var/lib/dpkg/info/virtualbox-ext-pack.prerm: 4: /var/lib/dpkg/info/virtualbox-ext-pack.prerm: vboxmanage: not found
dpkg: error processing package virtualbox-ext-pack (--remove):
installed virtualbox-ext-pack package pre-removal script subprocess returned error exit status 127
Errors were encountered while processing:
virtualbox-ext-pack
[ Rootkit Hunter version 1.4.6 ]
File updated: searched for 181 files, found 153
E: Sub-process /usr/bin/dpkg returned an error code (1)
dist-upgrade
myname# apt 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:
uget : Depends: libcurl3 (>= 7.16.2) but it is not installable
virtualbox-ext-pack : Depends: virtualbox (>= 5.2.24-dfsg-0~) or
virtualbox-5.2 but it is not installable
Depends: virtualbox (< 5.2.24-dfsg-z) or
virtualbox-5.2 but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
remove packages
myname# apt remove uget virtualbox-ext-pack
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
alsa-base bluedevil brasero brasero-cdrkit ca-certificates-mono dolphin4 dvdauthor ebtables eclipse-platform-data fonts-hack-ttf fonts-oxygen
gfortran-mingw-w64 gfortran-mingw-w64-i686 gfortran-mingw-w64-x86-64 gir1.2-gepub-0.4 gir1.2-javascriptcoregtk-3.0 gir1.2-tracker-1.0
gir1.2-zeitgeist-2.0 gnat-mingw-w64 gnat-mingw-w64-base gnat-mingw-w64-i686 gnat-mingw-w64-x86-64 gnome-icon-theme-symbolic gnome-tweak-tool
growisofs iputils-arping kde-baseapps-data kde-config-sddm kde-style-oxygen-qt5 kdepasswd kdepim-doc kgamma5 kmenuedit kpart-webkit ktnef kwrited
libasm3-java libattr1:i386 libavcodec57:i386 libavresample3:i386 libavutil55:i386 libblas-common libcamel-1.2-59 libclassworlds-java libcln6
libcoin80v5 libcomerr2:i386 libcommons-beanutils-java libcommons-collections3-java libcommons-dbcp-java libcommons-digester-java
libcommons-httpclient-java libcommons-lang-java libcommons-pool-java libcryptui0a libdata-random-perl libdb-java libdb-je-java libdb5.3-java
libdb5.3-java-jni libdoxia-core-java libeasymock-java libebook-1.2-16 libeclipse-aether-java libedata-cal-1.2-28 libedataserver-1.2-22
libedataserverui-1.2-1 libequinox-osgi-java libextutils-depends-perl libextutils-pkgconfig-perl libfelix-bundlerepository-java
libfelix-gogo-command-java libfelix-gogo-runtime-java libfelix-gogo-shell-java libfelix-osgi-obr-java libfelix-shell-java libfelix-utils-java
libfile-copy-recursive-perl libfile-slurp-tiny-perl libfwupd1 libgcab-1.0-0 libgcr-3-common libgd-perl libgeos-3.4.2 libgepub0 libgit2-24
libgles2-mesa libgltf-0.0-0v5 libgnome-autoar-common libgnome-desktop-3-12 libgom-1.0-common libgoocanvas-common libgoocanvas3
libgtk2-ex-podviewer-perl libgtk2-ex-simple-list-perl libgutenprint2 libgweather-3-6 libhttp-parser2.1 libhttp-server-simple-perl libical2
libicu4j-4.2-java libicu4j-49-java libicu57:i386 libidn11:i386 libiodbc2 libjavascriptcoregtk-3.0-0 libjetty9-java libjgraph-java
libjgrapht0.8-java libjson-pp-perl libjtidy-java libkdecorations2private5v5 libkf5akonadicore-bin libkf5akonadiprivate5 libkf5calendarcore5
libkf5dbusaddons-bin libkf5gapi-data libkf5gpgmepp-pthread5 libkf5iconthemes-bin libkf5incidenceeditor-bin libkf5kdgantt2-5
libkf5mailcommon-plugins libkf5pimcommon-plugins libkf5qgpgme5 libkf5syndication5 libkf5webkit5 libkonqsidebarplugin4a libkxmlrpcclient4
liblivemedia57 liblucene2-java libmaven2-core-java libmcrypt4 libmetadata-extractor-java libmouse-perl libmozjs-24-0 libmysqlclient18
libnet-dropbox-api-perl libnet-oauth-perl libnetty-3.9-java libnfs8 libobjc-6-dev libobjenesis-java liboce-foundation10 liboce-modeling10
liboce-ocaf-lite10 liboce-ocaf10 liboce-visualization10 libopencv-calib3d2.4v5 libopencv-features2d2.4v5 libopencv-flann2.4v5
libopencv-objdetect2.4v5 libopencv-video2.4v5 libopenspecfun1 liborcus-0.11-0 liboxygenstyle5-5 liboxygenstyleconfig5-5 libpackagekitqt5-0
libpath-class-perl libplexus-ant-factory-java libplexus-bsh-factory-java libplexus-classworlds2-java libplexus-cli-java
libplexus-component-metadata-java libplexus-container-default-java libplexus-container-default1.5-java libplexus-containers1.5-java
libplexus-interactivity-api-java libpodofo0.9.4 libproc-simple-perl libproj0 libprotobuf-lite10 libpyside-py3-1.2 libpython3.5-dev
libqcustomplot1.3 libqdox2-java libqgsttools-p1 libqpdf17 libqt5clucene5 libqt5designercomponents5 libqt5multimediaquick-p5 libre2-3 librpm3
librpmbuild3 librpmio3 librpmsign3 libsane-extras libsane-extras:i386 libsane-extras-common libsane-extras-dev libshiboken-py3-1.2v5
libsndio6.1:i386 libsodium18 libsoprano4 libsoqt4-20 libsort-naturally-perl libspeexdsp1:i386 libsuitesparseconfig4 libswresample2:i386
libswt-cairo-gtk-3-jni libswt-glx-gtk-3-jni libswt-gnome-gtk-3-jni libswt-gtk-3-java libswt-gtk-3-jni libswt-webkit-gtk-3-jni libsynctex1
libtomcat8-java libtracker-control-1.0-0 libtracker-miner-1.0-0 libtracker-sparql-1.0-0 libtxc-dxtn-s2tc:i386 libunbound2 libva-drm1:i386
libva-wayland1 libvpx4:i386 libvte-common libvte9 libwagon-ftp-java libwagon-java libwebkitgtk-3.0-0 libwebpmux2:i386 libwww-mechanize-perl
libx11-protocol-other-perl libx264-148:i386 libx265-95:i386 libxbean-java libxfont1 libxmpcore-java octave-info owncloud-files perlmagick
php-xml-parser php5-intl php5-ldap php5-mcrypt php5-mysql php5-pgsql php5-sqlite plasma-discover plasma-discover-common python-antlr python-pam
python-ply python-pyinotify python-qt4-gl python3-tz python3.5 python3.5-dev python3.5-minimal qdoc-qt5 qml-module-org-kde-extensionplugin
qml-module-org-kde-kirigami qpdf qt5-assistant qttools5-dev-tools rename sat4j seahorse-daemon software-properties-kde soprano-daemon tcpd
user-manager virtualbox-guest-utils vlc-plugin-visualization
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
uget virtualbox-ext-pack
0 upgraded, 0 newly installed, 2 to remove and 578 not upgraded.
After this operation, 1509 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 670161 files and directories currently installed.)
Removing uget (2.0.8-1+b1) ...
Removing virtualbox-ext-pack (5.2.24-2~bpo9+1) ...
/var/lib/dpkg/info/virtualbox-ext-pack.prerm: 4: /var/lib/dpkg/info/virtualbox-ext-pack.prerm: vboxmanage: not found
dpkg: error processing package virtualbox-ext-pack (--remove):
installed virtualbox-ext-pack package pre-removal script subprocess returned error exit status 127
Errors were encountered while processing:
virtualbox-ext-pack
[ Rootkit Hunter version 1.4.6 ]
File updated: searched for 181 files, found 153
E: Sub-process /usr/bin/dpkg returned an error code (1)
clean & autoclean
apt clean and apt autoclean run without problems
autoremove
myname# apt autoremove
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:
virtualbox-ext-pack : Depends: virtualbox (>= 5.2.24-dfsg-0~) or
virtualbox-5.2 but it is not installable
Depends: virtualbox (< 5.2.24-dfsg-z) or
virtualbox-5.2 but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
|
According to your logs, uget was removed; it should be possible for you to re-install the Debian 10 version now.
To remove virtualbox-ext-pack, you’d usually need virtualbox; unfortunately, because of the stretch-backports’ version’s dependency on Python 3.5, it can’t easily be installed in Debian 10. To work around the uninstallation errors, you need to delete the two voxmanage lines in the prerm maintainer script:
sudo sed -i '/vboxmanage/d' /var/lib/dpkg/info/virtualbox-ext-pack.prerm
This will then allow you to remove the virtualbox-ext-pack package.
| Package error while upgrading debian stretch to buster |
1,584,874,164,000 |
on Debian Bullseye (11) I recently have run into some dead endpoints when I run apt dist-upgrade after an update, see my sources list below. I have tried to resolve with --fix-missing and I have run apt clean... Any ideas?
I have looked at the site, http://deb.debian.org/debian/pool/main/, and I can confirm the directories are missing.
Errors
Failed to fetch http://deb.debian.org/debian/pool/main/g/glibc/locales_2.31-13_all.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/g/glibc/libc6-i386_2.31-13_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/g/glibc/libc-dev-bin_2.31-13_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/g/glibc/libc6-dev_2.31-13_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/g/glibc/libc6_2.31-13_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/p/perl/perl-modules-5.32_5.32.1-4_all.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/p/perl/libperl5.32_5.32.1-4_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/p/perl/perl_5.32.1-4_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/p/perl/perl-base_5.32.1-4_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/m/mutter/mutter_3.38.4-1_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/m/mutter/libmutter-7-0_3.38.4-1_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/n/nautilus/nautilus_3.38.2-1_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/n/nautilus/nautilus-data_3.38.2-1_all.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/e/exiv2/libexiv2-27_0.27.3-3_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/g/grilo/libgrilo-0.3-0_0.3.13-1_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/n/nodejs/nodejs_12.21.0%7edfsg-5_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/n/nodejs/libnode72_12.21.0%7edfsg-5_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/g/ghostscript/ghostscript_9.53.3%7edfsg-7_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/g/ghostscript/libgs9-common_9.53.3%7edfsg-7_all.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/f/flatpak/flatpak_1.10.2-3_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/g/gnome-shell/gnome-shell-extension-prefs_3.38.4-1_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/s/speech-dispatcher/speech-dispatcher-espeak-ng_0.10.2-2_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/s/speech-dispatcher/speech-dispatcher_0.10.2-2_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Failed to fetch http://deb.debian.org/debian/pool/main/s/speech-dispatcher/speech-dispatcher-audio-plugins_0.10.2-2_amd64.deb 404 Not Found [IP: 2a04:4e42:10::644 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Sources
deb http://deb.debian.org/debian/ stable main contrib non-free
deb-src http://deb.debian.org/debian/ stable main contrib non-free
deb http://deb.debian.org/debian/ stable-updates main contrib non-free
deb-src http://deb.debian.org/debian/ stable-updates main contrib non-free
deb http://ftp.debian.org/debian buster-backports main contrib non-free
deb-src http://ftp.debian.org/debian buster-backports main contrib non-free
deb http://deb.debian.org/debian/ buster main contrib non-free
deb http://deb.debian.org/debian/ buster-updates main contrib non-free
|
Your apt update is either too old or didn’t complete successfully; the current Debian 11 version of glibc packages is 2.31-13+deb11u2, not 2.13-13.
Note that your sources.list is missing the Debian 11 security repositories:
deb http://security.debian.org bullseye-security main contrib non-free
deb-src http://security.debian.org bullseye-security main contrib non-free
| Issue with sources, 404 on upgrade |
1,584,874,164,000 |
I understand that it is generally recommended to always upgrade Debian sequentially. For example upgrade Debian Jessie (8) to Stretch (9) and then to Buster (10). But I couldn't find any clear instructions on how to do this exactly.
Is it sufficient to edit APT's source-list files (/etc/apt/sources.list and files under /etc/apt/sources.list.d/) to refer to my target release version while following the upgrade instructions in the release notes?
E.g. to upgrade from Jessie to Stretch I'd replace every reference to jessie (or stable, ...) with stretch and perform the upgrade? And afterwards again replace stretch with buster and perform the next upgrade?
Answers to other questions here like Upgrade Debian Jessie (8) to Buster (10) possible or need to go sequential in versions upgrades? only explain that it is recommended to upgrade sequentially but don't explain how. Maybe this is really obvious and I just lack the experience.
I'm a little worried that apt-get dist-upgrade might directly upgrade from Jessie to Buster leaving out Stretch.
Kind regards :)
|
The release notes explain how to go about each upgrade, and as you say, each upgrade needs to be performed in sequence, following each release’s upgrade notes. The Debian 10 release notes mention this explicitly:
Direct upgrades from Debian releases older than 9 (stretch) are not supported. Please follow the instructions in the Release Notes for Debian 9 to upgrade to Debian 9 first.
If you follow the release notes, you won’t end up upgrading directly when using apt-get dist-upgrade. That could happen if you tried upgrading to “stable” rather than a release codename: if your repositories were configured to reference Jessie, and you changed them to reference “stable”, apt-get dist-upgrade would attempt to upgrade directly to Buster (and soon, Bullseye). Using codenames ensures you only end up upgrading to the named release.
Repository configuration is also addressed in the release notes, and can’t generally be simplified to a replacement operation (because the repository structure might change from one release to the next, and some repositories should be removed before upgrading). Thus the Stretch release notes list the repositories which need to be added, and instruct the administrator to remove obsolete repositories.
There is an unfortunate, large caveat though: the upgrade section of the release notes doesn’t mention the security update repositories, which should be configured for the last upgrade; for Debian 10 you should end up with something like
deb http://deb.debian.org/debian buster main
deb http://security.debian.org buster/updates main
as a minimum. The relevant repository configuration can always be found on Debian’s security information page.
(This will change for Debian 11, and is mentioned in the release notes.)
| How to do multiple sequential Debian distribution upgrades? |
1,584,874,164,000 |
I'm currently upgrading one of my Debian 9/KDE machines and have around 1000 packages being held back after running sudo apt-get upgrade -> should I run sudo apt full-upgrade, sudo apt-get dist-upgrade, sudo apt-get install [~1000 packages] (how?) or something else?
Here it says:
New versions of currently installed packages that cannot be upgraded without changing the install status of another package will be left at their current version (displayed as “held back”). This can be resolved by either using aptitude to choose these packages for installation or by trying apt install package.
after the apt full-upgrade step.
In some stackexchange answers on related questions like this one it says that running apt-get dist-upgrade can be dangerous during a upgrade when packages have been held back and instead recommend using other more cautious methods than just running apt-get dist-upgrade or apt full-upgrade even though this old page at debian-administration.org says that to fix this problem one should run apt-get dist-upgrade.
When I run sudo apt upgrade (not in the official guide) instead of sudo apt-get upgrade it only shows 1 package having unmet dependencies.
|
As the release notes say, the next step after running
apt-get upgrade
(section 4.4.4) is to run a full upgrade with
apt full-upgrade
(section 4.4.5). This should resolve the conditions which resulted in the packages being held back with the minimal upgrade, notably by removing obsolete packages and installing new dependencies: apt-get upgrade only upgrades already-installed packages, whereas apt full-upgrade will remove and add packages as necessary as well as upgrading packages.
If apt-get can’t resolve the situation, it will tell you about it before upgrading anything. There’s not much point in worrying about what could happen before you try it; the section you’re referring to is useful if you do run into problems upgrading.
| How to resolve many packages being held back after "apt-get upgrade" during Debian 10 upgrade? |
1,584,874,164,000 |
Following my Debian upgrade from Wheezy to Jessie, I wanted to upgrade to Buster while I'm at it.
I have updated my sources.list file to use "buster":
cat /etc/apt/sources.list
deb http://ftp.fr.debian.org/debian/ buster main contrib non-free
Then I did an apt-get update && upgrade then dist-upgrade, which failed midway because my kernel wasn't up to date and libc6 really wants at least a 3.2 kernel.
os-release tells me I'm on Buster.
cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
But my kernel seems very old:
uname -a
Linux vps54085 2.6.32-042stab127.2 #1 SMP Thu Jan 4 16:41:44 MSK 2018 x86_64 GNU/Linux
apt-cache search linux-image gives me a bunch of 4.19 images.
Now, I tried apt-get install linux-image-amd64 but it fails because it's trying to upgrade libc6
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
libc-dev-bin : Depends: libc6 (> 2.28) but 2.19-18+deb8u10 is to be installed
Recommends: manpages-dev but it is not going to be installed
libc6-dev : Depends: libc6 (= 2.28-10) but 2.19-18+deb8u10 is to be installed
linux-image-amd64 : Depends: linux-image-4.19.0-5-amd64 but it is not going to be installed
locales : Depends: libc-bin (> 2.28) but 2.19-18+deb8u10 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
The suggested apt-get -f install just retries installing libc6 (which fails because of the kernel).
I found posts telling to run dpkg --configure -a but it fails on locales:
dpkg: dependency problems prevent configuration of locales:
locales depends on libc-bin (>> 2.28); however:
Version of libc-bin on system is 2.19-18+deb8u10.
dpkg: error processing package locales (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
locales
And ls /var/cache/apt/archives/partial/ tells me this folder is empty.
I've also tried forcing the install of a previous version of libc6 but it's a mess of dependencies.
So, how do I rollback my apt-get upgrade so I can update my kernel?
|
Your VPS is a container on OpenVZ, running a kernel which you can’t upgrade (it’s not inside your VPS). You’ll have to ask your provider how to proceed, starting with whether Debian 10 is supported at all. See Why is my CentOS 7.4 on kernel 2.6.32?.
apt-get doesn’t support rolling upgrades back. It might be possible to downgrade all the packages manually, but it’s unlikely that this will be any easier than starting from scratch.
| Cancel failing apt-get upgrade |
1,584,874,164,000 |
I'm about to upgrade from Debian 10 to 11.
During this step, and like when I do common apt-get upgrade or dist-upgrade, I'm expecting to receive a lot of questions: "Do you want to replace or to keep your configurations files?"
And having little knowledge (or absolutely no, sometimes) about the goals and the effects of most packages that are asking for this, a diff won't help me.
What is the default response you recommend to answer, when you "know nothing"?
Y : replace configurations file
or
N : keep them
or
press Enter key, to use the default answer suggested?
|
Most of the time, keeping your current configuration is the best option - you generally want an upgrade to be providing the same functionality in pretty much the same way, and you generally don't want to lose any hand-crafted configuration changes. That's why it's the default.
It's extremely rare for an upgraded program to have a completely incompatible config file, which is about the only time that keeping the old config will prevent an upgraded service from running....and even in that case, you generally don't want it to run until you've gone over the new config and made sure it's going to do what you want it to - especially, if what you want differs from the default.
You can always change your mind later, anyway. Debian packages don't just replace listed conffiles. If you choose to overwrite your current config, it keeps the old config file renamed to end with .dpkg-old. If you choose to keep your current config, it renames the suggested new config file to end with .dpkg-dist. You can manually copy one of those over the config file at any time.
NOTE: a conffile isn't necessarily a configuration file. Nor is every configuration file a conffile (although most are). In Debian, conffiles are those files which are listed in the package as being a conffile. conffiles are basically a way of telling the package manager (dpkg) "If this file has been edited since it was installed, don't replace it without asking". dpkg uses md5sums to detect whether the current on-disk version of a conffile differs from the packaged file.
| During any upgrade, and even upgrading my Linux major version, should I reply: "replace configuration files" or "keep them" when I'm asked for? |
1,584,874,164,000 |
I have a Debian 8.11 server and I'd like to upgrade it to Debian 9 first and to Debian 10 afterwards.
I did the following:
apt-get update
apt-get upgrade
apt-get dist-upgrade
All finished with no errors and if I repeat the commands above they say that there are 0 packages to be upgraded. Thus I assume that it went well.
Nonetheless, my system is still 8.11:
$ cat /etc/debian_version
8.11
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
NAME="Debian GNU/Linux"
VERSION_ID="8"
VERSION="8 (jessie)"
ID=debian
HOME_URL="http://www.debian.org/"
SUPPORT_URL="http://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
What can be the problem? I was trying to follow Upgrades from Debian 8 (jessie)
|
You need to update your “sources” so that they refer to stretch rather than jessie:
sudo sed -i s/jessie/stretch/ /etc/apt/sources.list
Once that’s done,
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
will upgrade to Debian 9.
After rebooting, you can repeat the process, replacing stretch with buster to upgrade to Debian 10.
| Debian dist-upgrade does not upgrade to anything higher than 8.11 |
1,584,874,164,000 |
Originally my system was on 8.0 and now it's 8.6 but this latest version does not support all playonlinux requirements to run 86x_64x applications, then I'd like to know if it's possible to safely do a downgrade to my old version 8.0.
Ps: I did nothing with the repositories except adding jessie-backports to sources.list and performing:
sudo apt-get -t jessie-backports dist-upgrade
After that my kernel was also upgraded as well my /etc/os-release status to Debian Jessie 8.6.
Ps2: Would be great to keep my current Os and Kernel versions and also have my playonlinux 32 bits software working, but, if not, going back to my old system version is ok too.
Sorry if this topic was already answered in another question, but I've been searching for that and haven't found it.
|
You should use 8.6 which is 100% compatible with 8.0. The jessie-backports repo is the one which is not fully compatible, because they're packages from the unstable release called Stretch.
To force downgrade all your packages to Jessie, first make sure you have a rescue disc available. Then create a file: /etc/apt/preferences.d/jessie
Package: *
Pin: release n=jessie
Pin-Priority: 1100
Package: *
Pin: release n=jessie-updates
Pin-Priority: 1100
Start a script session (to record exactly what is happening): script downgrade.log (note this will appear to immediately return—you're actually at a shell prompt inside script, with everything being logged to that file; you'll need a second "exit" to log out). Then do apt-get dist-upgrade. According to quick testing in a VM, this will fail at some point, at which point you'll need to dpkg -i /var/cache/apt/archives/systemd_215*.deb. Then apt-get install -f. Then another apt-get dist-upgrade. You will be asked if you really want to remove the running kernel—unfortunately, you do. Finally, do an apt-get autoremove at the end but take a look at the packages it's removing before saying yes!
Before rebooting, confirm that you have kernel 3.16.0-4 installed. Then reboot.
updates
| How to do a downgrade in debian after doing "apt-get dist-upgrade -t jessie-backports" |
1,584,874,164,000 |
I earlier had RDP access to a remote machine (a typical physical desktop PC) using which I launched a sudo apt dist-upgrade inside a GUI gnome-terminal. Since then I have lost the RDP connection and only have SSH[1]. Since there was no 'assume yes' in the apt command, inspecting cat /var/log/dist-upgrade/screenlog.0 over SSH has revealed that the upgrade, still running, is stuck on a prompt[2], seeking the user to hit Enter or select yes (and then hit Enter). Note that at this point dist-upgrade has been running for about an hour (excluding the await since) and has installed lots of packages.
The objective now is to pass Enter to that running dist-upgrade (or teminate the upgrade altogether but this may corrupt the system). An LLM has suggested using gdb -p pid /usr/libexec/gnome-terminal-server followed by call (int)write(0, "\n", 1) where pid and executable are obtained from ps -ex | grep terminal. However that errs as No symbol "write" in current context. since No debugging symbols found in /usr/libexec/gnome-terminal-server).
Another approach is to use xdotool to generate a programmatic click. Alas, it's not already installed on remote and installing it now isn't possible since an update is running. This is true of all programs - at this point we have to work with what we've got (standard bash) and nothing new can be installed.
What to do?
[1]: Actually 'remote:xrdp:SSHTunnel:Remmina:client' based RDP access still works except that we are dropped into a black screen and nothing apparently can be done to wake the remote's display.
[2]: The prompt in question is simply
#tail /var/log/dist-upgrade/screenlog.0
Package configuration
Upgrade to the firefox snap
Starting in Ubuntu 22.04, all new releases of firefox are only available to Ubuntu users through the snap package. This package update will transition your system over to the snap by installing it.It is recommended to close all open firefox windows before proceeding to the upgrade.
<-- 0:jammy -- time-stamp -- Apr/01/24 15:45:57 --
|
I'm not entirely familiar with apt, but the name of that logfile (screenlog.0) makes me wonder if the process is already running under the control of screen? If that were the case, screen -ls should show an active session, and screen -R should re-attach to it.
If the log filename is a red herring, you may be able to reptyr, which is a tool that allows you to attach an existing program to a new terminal.
| Pass Enter key to dist-upgrade's prompt, running inside a GUI terminal on a remote machine, accessible henceforth only over SSH |
1,584,874,164,000 |
A major advantage of doing an in-place upgrade compared to doing
a clean install,
is that all accounts, configurations, and installed programs are kept
intact.
Using Windows Subsystem for Linux (WSL),
I have installed a fresh instance of openSUSE 42.
1
How can I perform an in-place upgrade of openSUSE 42 to 15.x?
My primary interest is in going from openSUSE 42 to the latest
openSUSE version.
At the time of writing,
Leap 15.4 is the latest active openSUSE release.
Motivation
WSL still offers only version 42.2 of openSUSE when installing from
the command line.
Considering that the lifetime of openSUSE 42.2 officially ended
in January 2018
– almost five years ago – it would make sense to upgrade to
a newer version.
Caution!
Make sure there is enough free disk space before considering
an in-place upgrade,
in this case, at least about 5 GiB.
References
How to install Linux on Windows with WSL
Active openSUSE Leap releases
openSUSE Leap discontinued distributions
1
Open Windows CMD.exe as administrator
(WinKey+r, type cmd, hold down
Ctrl+Shift, press Enter).
Then install openSUSE 42.2 by running :
wsl.exe --install --distribution openSUSE-42
|
How can I perform an in-place upgrade of openSUSE 42 to 15.x?
Before starting to experiment, it's a good idea to make a
precautionary backup in case things go wrong.
To back up the existing .repo configuration files, do :
1
cd /etc/zypp/repos.d/ && sudo zip oss-42.2_orig.zip *.repo
How I upgraded openSUSE from 42.2 to 15.4 2
1. Refresh and update the existing openSUSE 42.2
Before upgrading, a crucial step is to run sudo zypper refresh and
sudo zypper update to refresh and update the current version of the
system.
:~> sudo zypper refresh
Retrieving repository 'oss' metadata ...........................[done]
Building repository 'oss' cache ................................[done]
Retrieving repository 'oss_update' metadata ....................[done]
Building repository 'oss_update' cache .........................[done]
All repositories have been refreshed.
:~> sudo zypper update
Loading repository data...
Warning: Repository 'oss_update' appears to be outdated.
Consider using a different mirror or server.
Reading installed packages...
The following 3 NEW packages are going to be installed:
kbd kmod pkg-config
The following 88 packages are going to be upgraded:
binutils command-not-found coreutils cpp48 curl dbus-1 …
…
yast2-xml zip zypper
88 packages to upgrade, 3 new.
Overall download size: 96.8 MiB. Already cached: 0 B. After the operation,
additional 7.8 MiB will be used.
Continue? [y/n/...? shows all options] (y): y
As indicated in the output dump above, I chose y to start the
update.
This started the download and installation of the latest package
versions of openSUSE 42.2.
Retrieving package emacs-info-24.3-24.6.1.noarch (1/91), 4.2 MiB
Retrieving: emacs-info-24.3-24.6.1.noarch.rpm .............[done (1.7 MiB/s)]
Retrieving package file-magic-5.22-7.6.1.x86_64 (2/91), 334.5 KiB
Retrieving: file-magic-5.22-7.6.1.x86_64.rpm ..........................[done]
…
Retrieving package wicked-service-0.6.40-6.6.1.x86_64 (91/91), 58.6 KiB
Retrieving: wicked-service-0.6.40-6.6.1.x86_64.rpm ....................[done]
Checking for file conflicts: ..........................................[done]
( 1/91) Installing: emacs-info-24.3-24.6.1.noarch .....................[done]
( 2/91) Installing: file-magic-5.22-7.6.1.x86_64 ......................[done]
…
(91/91) Installing: wicked-service-0.6.40-6.6.1.x86_64 ................[done]
Additional rpm output:
Failed to connect to bus: No such file or directory
…
Output of coreutils-8.25-2.3.1.x86_64.rpm %posttrans script:
Please run mkinitrd as soon as your system is complete.
Now that openSUSE Leap 42.2 has been successfully refreshed and
updated,
it's time to start upgrading to openSUSE Leap 15.4.
2. Change the version numbers in the .repo configuration files
A. In /etc/zypp/repos.d/oss.repo, replace 42.2/repo/oss/suse
with 15.4/repo/oss :
sudo sed -i 's|42.2/repo/oss/suse|15.4/repo/oss|g' /etc/zypp/repos.d/oss.repo
:~> cat /etc/zypp/repos.d/oss.repo
[oss]
enabled=1
autorefresh=0
baseurl=http://download.opensuse.org/distribution/leap/15.4/repo/oss/
type=rpm-md
B. In /etc/zypp/repos.d/oss_update.repo, replace 42.2
with 15.4 :
sudo sed -i 's|42.2|15.4|g' /etc/zypp/repos.d/oss_update.repo
:~> cat /etc/zypp/repos.d/oss_update.repo
[oss_update]
enabled=1
autorefresh=0
baseurl=http://download.opensuse.org/update/leap/15.4/oss/
type=rpm-md
3. Synchronize the list of packages and versions available
:~> sudo zypper refresh
Retrieving repository 'oss' metadata ...........................[done]
Building repository 'oss' cache ................................[done]
Retrieving repository 'oss_update' metadata ....................[done]
Building repository 'oss_update' cache .........................[done]
All repositories have been refreshed.
4. Perform the distribution upgrade
:~> sudo zypper dist-upgrade
Warning: You are about to do a distribution upgrade with all enabled
repositories. Make sure these repositories are compatible before you
continue. See 'man zypper' for more information about this command.
Loading repository data...
Reading installed packages...
Computing distribution upgrade...
14 Problems:
…
Problem: nothing provides (kmod(sg.ko) if kernel)
needed by suse-module-tools-15.4.12-150400.1.4.x86_64
Solution 1: deinstallation of suse-module-tools-12.4-3.2.x86_64
Solution 2: keep obsolete suse-module-tools-12.4-3.2.x86_64
Solution 3: break suse-module-tools-15.4.12-150400.1.4.x86_64
by ignoring some of its dependencies
Choose from above solutions by number or skip, retry, cancel [1/2/3/s/r/c]: 1
OK? What should I do now?
As indicated in the output dump above, I chose
deinstallation of suse-module-tools-12.4-…
A new Problem was displayed.
Problem: nothing provides (/usr/sbin/useradd or busybox)
needed by sysuser-shadow-3.1-150400.1.35.noarch
Solution 1: deinstallation of rpcbind-0.2.3-3.3.1.x86_64
Solution 2: keep obsolete rpcbind-0.2.3-3.3.1.x86_64
Solution 3: break sysuser-shadow-3.1-150400.1.35.noarch
by ignoring some of its dependencies
Choose from above solutions by number or skip, retry, cancel [1/2/3/s/r/c]: 1
Again, I chose deinstallation … (rpcbind-0.2.3-3.3.1.x86_64).
This went on and on.
Sometimes, deinstallation was presented as Solution 2.
I continued to choose deinstallation for the following packages:
patterns-openSUSE-base-20150918-27.1.x86_64,
man-2.6.6-6.3.1.x86_64,
emacs-24.3-24.6.1.x86_64,
udev-228-25.18.1.x86_64,
util-linux-2.28-12.9.1.x86_64,
systemd-228-25.18.1.x86_64,
libutempter0-1.1.6-7.55.x86_64,
openssh-7.2p2-11.6.1.x86_64,
emacs-nox-24.3-24.6.1.x86_64,
gpm-1.20.7-9.53.x86_64,
systemd-sysvinit-228-25.18.1.x86_64,
util-linux-systemd-2.28-12.9.1.x86_64,
sysconfig-netconfig-0.84.0-1.2.x86_64,
aaa_base-13.2+git20140911.61c1681-24.3.1.x86_64,
kmod-17-10.3.1.x86_64,
screen-4.0.4-7.21.x86_64,
sysconfig-0.84.0-1.2.x86_64,
wicked-0.6.40-6.6.1.x86_64,
kmod-compat-17-10.3.1.x86_64,
libwicked-0-6-0.6.40-6.6.1.x86_64,
ruby-common-2.1-6.3.1.noarch,
wicked-service-0.6.40-6.6.1.x86_64,
yast2-packager-3.1.123-5.6.1.x86_64,
aaa_base-extras-13.2+git20140911.61c1681-24.3.1.x86_64,
yast2-ruby-bindings-3.1.51.2-3.1.x86_64,
yast2-3.1.217-5.6.1.x86_64,
yast2-country-data-3.1.32-1.2.x86_64,
ruby-2.1-4.2.x86_64,
yast2-hardware-detection-3.1.7-9.5.x86_64,
yast2-transfer-3.1.3-1.3.x86_64.
After answering deinstallation for that last package, a lot of
output followed.
Resolving dependencies...
Computing distribution upgrade...
The following 96 NEW packages are going to be installed:
bash-sh blog boost-license1_66_0 branding-openSUSE … vim-data-common
The following NEW product is going to be installed:
"openSUSE Leap 15.4"
The following 45 packages are going to be REMOVED:
aaa_base aaa_base-extras emacs emacs-nox gpm kmod … yast2-transfer
The following pattern is going to be REMOVED: base
The following product is going to be REMOVED: openSUSE
The following 198 packages are going to be upgraded:
augeas bash bc bind-utils binutils bzip2 ca-certificates … zypper
The following pattern is going to be upgraded: minimal_base
The following 26 packages are going to be downgraded:
acl fillup insserv-compat klogd libacl1 libaio1 libattr1 … unzip zip
The following 4 packages are going to change architecture:
file-magic x86_64 -> noarch
linux-glibc-devel noarch -> x86_64
openssl x86_64 -> noarch
perl-XML-NamespaceSupport x86_64 -> noarch
The following 217 packages are going to change vendor:
acl openSUSE -> SUSE LLC <https://www.suse.com/>
…
zypper openSUSE -> SUSE LLC <https://www.suse.com/>
198 packages to upgrade, 26 to downgrade, 96 new, 45 to remove, 217 to
change vendor, 4 to change arch.
Overall download size: 189.6 MiB. Already cached: 0 B. After the operation,
additional 293.0 MiB will be used.
Continue? [y/n/...? shows all options] (y): y
I chose y, and the download and installation started.
Retrieving package boost-license1_66_0-1.66.0-12.3.1.noarch (1/320), 20.8 KiB
Retrieving: boost-license1_66_0-1.66.0-12.3.1.noarch.rpm ..............[done]
Retrieving package branding-openSUSE-15.4.20220322-lp154.2. (2/320), 11.6 KiB
…
Retrieving package device-mapper-1.02.163-150400.15.95.x (320/320), 143.7 KiB
Retrieving: device-mapper-1.02.163-150400.15.95.x86_64.rpm ............[done]
Checking for file conflicts: ..........................................[done]
( 1/363) Installing: boost-license1_66_0-1.66.0-12.3.1.noarch ........[done]
Additional rpm output:
warning: /var/cache/zypp/packages/oss/noarch/boost-license1_66_0-1.66.0-12.3.
1.noarch.rpm: Header V3 RSA/SHA256 Signature, key ID 39db7c82: NOKEY
( 2/363) Installing: …
…
(362/363) Removing kmod-17-10.3.1.x86_64 ..............................[done]
(363/363) Removing suse-module-tools-12.4-3.2.x86_64 ..................[done]
…
Output of rpm-4.14.3-150300.46.1.x86_64.rpm %posttrans script:
migrating rpmdb from /var/lib/rpm to /usr/lib/sysimage/rpm...
I saw lots of warnings, of which the most common was
No such file or directory.
The download and installation took about 7 minutes.
5. Check the new current version of openSUSE
:~> sudo zypper repos
Repository priorities are without effect.
All enabled repositories share the same priority.
# | Alias | Name | Enabled | GPG Check | Refresh
--+-----------------------------+-------------+---------+-----------+--------
1 | oss | oss | Yes | (r ) Yes | No
2 | oss_update | oss_update | Yes | (r ) Yes | No
3 | repo-backports-debug-update | Update re-> | No | ---- | ----
4 | repo-backports-update | Update re-> | Yes | (r ) Yes | Yes
5 | repo-sle-debug-update | Update re-> | No | ---- | ----
6 | repo-sle-update | Update re-> | Yes | (r ) Yes | Yes
…
Check the version :
:~> cat /etc/os-release
NAME="openSUSE Leap"
VERSION="15.4"
…
6. Rebuild the caches for the system repositories
:~> sudo zypper refresh
Repository 'oss' is up to date.
Building repository 'oss' cache ................................[done]
Repository 'oss_update' is up to date.
Building repository 'oss_update' cache .........................[done]
New repository or package signing key received:
Repository: Update repository of openSUSE Backports
Key Fingerprint: …
…
Do you want to reject the key, trust temporarily, trust always? [r/t/a/?]: t
Retrieving repository 'Update repository of openSUSE Backports'metadata[done]
Building repository 'Update repository of openSUSE Backports' cache ...[done]
New repository or package signing key received:
Repository: Update repository with updates from SUSE Linux Enterprise 15
Key Fingerprint: …
…
Do you want to reject the key, trust temporarily, trust always? [r/t/a/?]: t
Retrieving repository 'Update repository with updates from SUSE Linux E[done]
Building repository 'Update repository with updates from SUSE Linux Ent[done]
All repositories have been refreshed.
7. Upgrade installed packages to their newest available versions 3
Then I ran sudo zypper update.
-bash-4.4$ sudo zypper update
Loading repository data...
Reading installed packages...
The following 125 packages are going to be upgraded:
augeas bind-utils binutils ca-certificates-mozilla curl … zypper
The following 7 NEW packages are going to be installed:
libisc1606 libjitterentropy3 libutempter0 libzck1 … util-linux
The following 2 packages are going to be REMOVED:
bind-libs hardlink
125 packages to upgrade, 7 new, 2 to remove.
Overall download size: 102.2 MiB. Already cached: 0 B. After the operation,
additional 1.7 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): y
Of course, I chose y.
The download and installation of the Update followed.
Retrieving package sysuser-shadow-3.1-150400.1.35.noarch (1/132), 12.9 KiB
Retrieving: sysuser-shadow-3.1-150400.1.35.noarch.rpm .................[done]
Retrieving package system-group-hardware-20170617-150400.… (2/132), 12.4 KiB
Retrieving: …
…
Retrieving package util-linux-2.37.2-150400.8.8.1.x86_64 (132/132), 1.3 MiB
Retrieving: util-linux-2.37.2-150400.8.8.1.x86_64.rpm .................[done]
Checking for file conflicts: ..........................................[done]
( 1/132) Installing: sysuser-shadow-3.1-150400.1.35.noarch ...........[done]
/usr/sbin/groupadd -r render
/usr/sbin/groupadd -r sgx
( 2/132) Installing: …
…
(132/132) Installing: util-linux-2.37.2-150400.8.8.1.x86_64 ...........[done]
Executing %posttrans scripts ..........................................[done]
8. The battle between http: and https:
In my experience, replacing http: with https: in the
/etc/zypp/repos.d/*.repo files,
can cause an error.
When I do this – and then run sudo zypper refresh – I often
(but not always) get :
4
:~> sudo zypper refresh
Download (curl) error for 'https://download.opensuse.org/distribution/…':
Error code: Curl error 60
Error message: SSL certificate problem: certificate has expired
Apparently, this is a problem with expired certificates.
The risk of getting such a Curl error is likely much smaller once an
upgrade has been successfully completed, including refreshing and
updating the system.
Summary
It's prudent to repeat the initial precautionary backup :
cd /etc/zypp/repos.d/ && sudo zip oss-15.4_orig.zip *.repo
It's far from obvious which choices to make during an upgrade like
this.
But it seems the upgrade worked for the most part.
And cat /etc/os-release says the version is now
openSUSE Leap 15.4.
I still get Access is denied. Press Enter or Esc to exit... every
now and then, when I try to start openSUSE-15 via ConEmu.
I don't know if this issue is related to ConEmu, but I've never seen
it when I start openSUSE-15 directly from CMD.exe,
wsl ~ -d openSUSE-15.
5
References
Support Data Base: System upgrade
Downloads for Leap 15.4 | main page
Downloads for Leap 15.4 | updates
The zypper man page
Enable snaps on openSUSE (and install GNU nano)
Prompt changed to "-Bash-4.2" and colors lost
1
To see the contents of the oss-42.2_orig.zip file,
run unzip -l oss-42.2_orig.zip.
To restore the .repo files :
cd /etc/zypp/repos.d/ && sudo rm *.repo && sudo unzip oss-42.2_orig.zip
2
Support Data Base: System upgrade is the single most
important reference I used to perform the upgrade.
3
At this point, the openSUSE distro hang and didn't respond to any
input from the keyboard.
When I restarted, it looked as follows.
-bash: /etc/profile: No such file or directory
-bash-4.4$
After installing Snap as described here, and restarting
again, that behavior went away.
The prompt resumed to looking normal again, like so :
henke@hp:~>
I don't know exactly what fixed the system.
And I don't know how to replicate the problem.
4
To replace http: with https: in all .repo files, run :
sudo sed -i 's/http:/https:/' /etc/zypp/repos.d/*.repo
5
If you haven't changed the name of the distro, you should start it as
wsl ~ -d openSUSE-42, even though the distro contained is
openSUSE 15.
| How to do an in-place upgrade to the latest openSUSE Leap release |
1,584,874,164,000 |
I am unable to update my pop-os distribution due to the inability to upgrade 1 package.
apt list --upgradable -a
returns
Listing... Done
pop-system-updater/impish 0.1.0~1657035226~21.10~6f0d903 amd64 [upgradable from: 0.1.0~1655219862~21.10~b81523a]
pop-system-updater/now 0.1.0~1655219862~21.10~b81523a amd64 [installed,upgradable to: 0.1.0~1657035226~21.10~6f0d903]
I tried the below functions without success
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get install --fix-broken
sudo apt-get upgrade -y
sudo apt-get full-upgrade -y
sudo apt-get dist-upgrade
anyone has a clue about what is broken and how I could fix it?
|
after following this thread (forcing the replacement of the sources) I manage to update and upgrade with several reboots, and apt autoremove.
| unable to update/upgrade 1 package [closed] |
1,584,874,164,000 |
Every time I try to update or install a new package, I get these errors:
┌──(mahdi㉿kali)-[~]
└─$ sudo apt update
Hit:1 http://packages.microsoft.com/repos/code stable InRelease
Hit:3 http://ppa.launchpad.net/obsproject/obs-studio/ubuntu bionic InRelease
Hit:5 https://packages.sury.org/php buster InRelease
Hit:6 https://repo.protonvpn.com/debian stable InRelease
Hit:7 https://download.mono-project.com/repo/debian bionic InRelease
Hit:8 http://ppa.launchpad.net/uget-team/ppa/ubuntu bionic InRelease
Get:10 https://packages.microsoft.com/debian/11/prod bullseye InRelease [10.5 kB]
Hit:2 http://mirror.karneval.cz/pub/linux/kali kali-last-snapshot InRelease
Hit:4 http://wlglam.fsmg.org.nz/kali kali-rolling InRelease
Hit:9 http://ftp.halifax.rwth-aachen.de/kali kali-bleeding-edge InRelease
Get:11 http://mirror-1.truenetwork.ru/kali kali-experimental InRelease [23.0 kB]
Fetched 33.4 kB in 4s (7,728 B/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
N: Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'https://packages.microsoft.com/debian/11/prod bullseye InRelease' doesn't support architecture 'i386'
┌──(mahdi㉿kali)-[~]
└─$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
debconf: Perl may be unconfigured (syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 178, near "sudo exec"
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 182, near "} and"
Global symbol "$stat_w" requires explicit package name (did you forget to declare "my $stat_w"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 190.
Global symbol "$stat_w" requires explicit package name (did you forget to declare "my $stat_w"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 191.
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 196, near "else"
Global symbol "$stat_w" requires explicit package name (did you forget to declare "my $stat_w"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 197.
Global symbol "$stat_r" requires explicit package name (did you forget to declare "my $stat_r"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 199.
Global symbol "$stat_r" requires explicit package name (did you forget to declare "my $stat_r"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 202.
Global symbol "$kidpid" requires explicit package name (did you forget to declare "my $kidpid"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 203.
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 212, near "}"
/usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm has too many errors.
Compilation failed in require at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open2.pm line 31.
Compilation failed in require at /usr/share/perl5/Debconf/ConfModule.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/ConfModule.pm line 7.
Compilation failed in require at /usr/share/perl5/Debconf/AutoSelect.pm line 8.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/AutoSelect.pm line 8.
Compilation failed in require at (eval 1) line 8.
BEGIN failed--compilation aborted at (eval 1) line 8.
) -- aborting
Setting up debconf (1.5.79) ...
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 178, near "sudo exec"
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 182, near "} and"
Global symbol "$stat_w" requires explicit package name (did you forget to declare "my $stat_w"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 190.
Global symbol "$stat_w" requires explicit package name (did you forget to declare "my $stat_w"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 191.
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 196, near "else"
Global symbol "$stat_w" requires explicit package name (did you forget to declare "my $stat_w"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 197.
Global symbol "$stat_r" requires explicit package name (did you forget to declare "my $stat_r"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 199.
Global symbol "$stat_r" requires explicit package name (did you forget to declare "my $stat_r"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 202.
Global symbol "$kidpid" requires explicit package name (did you forget to declare "my $kidpid"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 203.
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 212, near "}"
/usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm has too many errors.
Compilation failed in require at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open2.pm line 31.
Compilation failed in require at /usr/share/perl5/Debconf/ConfModule.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/ConfModule.pm line 7.
Compilation failed in require at /usr/share/perl5/Debconf/AutoSelect.pm line 8.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/AutoSelect.pm line 8.
Compilation failed in require at /usr/share/debconf/frontend line 8.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 8.
dpkg: error processing package debconf (--configure):
installed debconf package post-installation script subprocess returned error exit status 255
Errors were encountered while processing:
debconf
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
I tried to reinstall the debconf but:
┌──(mahdi㉿kali)-[~]
└─$ sudo apt install --reinstall debconf
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for debconf:amd64
Also fixing packages didn't work:
┌──(mahdi㉿kali)-[~]
└─$ sudo apt --fix-broken install 100 ⨯
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
debconf: Perl may be unconfigured (syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 178, near "sudo exec"
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 182, near "} and"
Global symbol "$stat_w" requires explicit package name (did you forget to declare "my $stat_w"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 190.
Global symbol "$stat_w" requires explicit package name (did you forget to declare "my $stat_w"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 191.
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 196, near "else"
Global symbol "$stat_w" requires explicit package name (did you forget to declare "my $stat_w"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 197.
Global symbol "$stat_r" requires explicit package name (did you forget to declare "my $stat_r"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 199.
Global symbol "$stat_r" requires explicit package name (did you forget to declare "my $stat_r"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 202.
Global symbol "$kidpid" requires explicit package name (did you forget to declare "my $kidpid"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 203.
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 212, near "}"
/usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm has too many errors.
Compilation failed in require at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open2.pm line 31.
Compilation failed in require at /usr/share/perl5/Debconf/ConfModule.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/ConfModule.pm line 7.
Compilation failed in require at /usr/share/perl5/Debconf/AutoSelect.pm line 8.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/AutoSelect.pm line 8.
Compilation failed in require at (eval 1) line 8.
BEGIN failed--compilation aborted at (eval 1) line 8.
) -- aborting
Setting up debconf (1.5.79) ...
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 178, near "sudo exec"
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 182, near "} and"
Global symbol "$stat_w" requires explicit package name (did you forget to declare "my $stat_w"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 190.
Global symbol "$stat_w" requires explicit package name (did you forget to declare "my $stat_w"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 191.
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 196, near "else"
Global symbol "$stat_w" requires explicit package name (did you forget to declare "my $stat_w"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 197.
Global symbol "$stat_r" requires explicit package name (did you forget to declare "my $stat_r"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 199.
Global symbol "$stat_r" requires explicit package name (did you forget to declare "my $stat_r"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 202.
Global symbol "$kidpid" requires explicit package name (did you forget to declare "my $kidpid"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 203.
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 212, near "}"
/usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm has too many errors.
Compilation failed in require at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open2.pm line 31.
Compilation failed in require at /usr/share/perl5/Debconf/ConfModule.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/ConfModule.pm line 7.
Compilation failed in require at /usr/share/perl5/Debconf/AutoSelect.pm line 8.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/AutoSelect.pm line 8.
Compilation failed in require at /usr/share/debconf/frontend line 8.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 8.
dpkg: error processing package debconf (--configure):
installed debconf package post-installation script subprocess returned error exit status 255
Errors were encountered while processing:
debconf
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
I even tried to install debconf manually:
┌──(mahdi㉿kali)-[~]
└─$ sudo dpkg -i '/home/mahdi/Downloads/Applications/debconf_1.5.73_all.deb' 100 ⨯
dpkg: warning: downgrading debconf from 1.5.79 to 1.5.73
(Reading database ... 543793 files and directories currently installed.)
Preparing to unpack .../debconf_1.5.73_all.deb ...
Unpacking debconf (1.5.73) over (1.5.79) ...
Setting up debconf (1.5.73) ...
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 178, near "sudo exec"
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 182, near "} and"
Global symbol "$stat_w" requires explicit package name (did you forget to declare "my $stat_w"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 190.
Global symbol "$stat_w" requires explicit package name (did you forget to declare "my $stat_w"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 191.
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 196, near "else"
Global symbol "$stat_w" requires explicit package name (did you forget to declare "my $stat_w"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 197.
Global symbol "$stat_r" requires explicit package name (did you forget to declare "my $stat_r"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 199.
Global symbol "$stat_r" requires explicit package name (did you forget to declare "my $stat_r"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 202.
Global symbol "$kidpid" requires explicit package name (did you forget to declare "my $kidpid"?) at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 203.
syntax error at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm line 212, near "}"
/usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm has too many errors.
Compilation failed in require at /usr/lib/x86_64-linux-gnu/perl-base/IPC/Open2.pm line 31.
Compilation failed in require at /usr/share/perl5/Debconf/ConfModule.pm line 7.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/ConfModule.pm line 7.
Compilation failed in require at /usr/share/perl5/Debconf/AutoSelect.pm line 8.
BEGIN failed--compilation aborted at /usr/share/perl5/Debconf/AutoSelect.pm line 8.
Compilation failed in require at /usr/share/debconf/frontend line 8.
BEGIN failed--compilation aborted at /usr/share/debconf/frontend line 8.
dpkg: error processing package debconf (--install):
installed debconf package post-installation script subprocess returned error exit status 255
Processing triggers for kali-menu (2021.4.2) ...
Errors were encountered while processing:
debconf
Even dist-update doesn't work:
┌──(mahdi㉿kali)-[~]
└─$ sudo apt dist-upgrade 1 ⨯
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
debconf-i18n : Depends: debconf (= 1.5.79) but 1.5.73 is installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Heeeeelp:(
|
/usr/lib/x86_64-linux-gnu/perl-base/IPC/Open3.pm is corrupt, you need to re-install perl-base:
sudo apt reinstall perl-base
| debconf broken, can't update, install or fix any package anymore |
1,584,874,164,000 |
I'm trying to run sudo dnf system-upgrade download --refresh --releasever=30 --allowerasing (from fedora 25) and hitting the following errors.
Running transaction check
Error: transaction check vs depsolve:
(php-composer(symfony/expression-language) >= 2.8 with php-composer(symfony/expression-language) < 5) is needed by php-phpmyadmin-motranslator-4.0-4.fc30.noarch
(gcc >= 9 with gcc < 10) is needed by annobin-8.71-4.fc30.x86_64
(php-composer(symfony/translation) >= 2.7.1 with php-composer(symfony/translation) < 4.0) is needed by php-twig-extensions-1.5.4-4.fc30.noarch
(php-composer(twig/twig) >= 1.27 with php-composer(twig/twig) < 3.0) is needed by php-twig-extensions-1.5.4-4.fc30.noarch
(php-composer(symfony/polyfill-mbstring) >= 1.3 with php-composer(symfony/polyfill-mbstring) < 2) is needed by php-twig2-2.12.5-1.fc30.noarch
(php-composer(composer/ca-bundle) >= 1.0 with php-composer(composer/ca-bundle) < 2) is needed by composer-1.10.6-1.fc30.noarch
(php-composer(composer/semver) >= 1.0 with php-composer(composer/semver) < 2) is needed by composer-1.10.6-1.fc30.noarch
(php-composer(composer/spdx-licenses) >= 1.2 with php-composer(composer/spdx-licenses) < 2) is needed by composer-1.10.6-1.fc30.noarch
(php-composer(composer/xdebug-handler) >= 1.1 with php-composer(composer/xdebug-handler) < 2) is needed by composer-1.10.6-1.fc30.noarch
(php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2) is needed by composer-1.10.6-1.fc30.noarch
(php-composer(seld/jsonlint) >= 1.4 with php-composer(seld/jsonlint) < 2) is needed by composer-1.10.6-1.fc30.noarch
(php-composer(seld/phar-utils) >= 1.0 with php-composer(seld/phar-utils) < 2) is needed by composer-1.10.6-1.fc30.noarch
(php-composer(psr/log) >= 1.0.1 with php-composer(psr/log) < 2.0) is needed by php-symfony-console-2.8.52-1.fc30.noarch
(php-composer(psr/log) >= 1.0.1 with php-composer(psr/log) < 2.0) is needed by php-symfony-http-kernel-2.8.52-1.fc30.noarch
(php-composer(symfony/polyfill-php56) >= 1.8 with php-composer(symfony/polyfill-php56) < 2.0) is needed by php-symfony-http-kernel-2.8.52-1.fc30.noarch
(php-composer(psr/log) >= 1.0.1 with php-composer(psr/log) < 2.0) is needed by php-symfony-debug-2.8.52-1.fc30.noarch
(php-composer(symfony/polyfill-php54) >= 1.8 with php-composer(symfony/polyfill-php54) < 2.0) is needed by php-symfony-http-foundation-2.8.52-1.fc30.noarch
(php-composer(symfony/polyfill-php55) >= 1.8 with php-composer(symfony/polyfill-php55) < 2.0) is needed by php-symfony-http-foundation-2.8.52-1.fc30.noarch
(php-composer(psr/log) >= 1.0 with php-composer(psr/log) < 2) is needed by php-composer-xdebug-handler-1.4.1-1.fc30.noarch
(php-composer(dasprid/enum) >= 1.0 with php-composer(dasprid/enum) < 2) is needed by php-bacon-qr-code2-2.0.0-1.fc30.noarch
(php-composer(paragonie/constant_time_encoding) >= 1.0 with php-composer(paragonie/constant_time_encoding) < 3) is needed by php-pragmarx-google2fa5-5.0.0-1.fc30.noarch
(php-composer(paragonie/random_compat) >= 2.0 with php-composer(paragonie/random_compat) < 3) is needed by php-pragmarx-google2fa5-5.0.0-1.fc30.noarch
(php-composer(google/recaptcha) >= 1.1 with php-composer(google/recaptcha) < 2) is needed by phpMyAdmin-4.9.5-1.fc30.noarch
(php-composer(phpmyadmin/motranslator) >= 4.0 with php-composer(phpmyadmin/motranslator) < 5) is needed by phpMyAdmin-4.9.5-1.fc30.noarch
(php-composer(phpmyadmin/shapefile) >= 2.0 with php-composer(phpmyadmin/shapefile) < 3) is needed by phpMyAdmin-4.9.5-1.fc30.noarch
(php-composer(phpmyadmin/sql-parser) >= 4.3.2 with php-composer(phpmyadmin/sql-parser) < 5) is needed by phpMyAdmin-4.9.5-1.fc30.noarch
(php-composer(phpseclib/phpseclib) >= 2.0.9 with php-composer(phpseclib/phpseclib) < 3) is needed by phpMyAdmin-4.9.5-1.fc30.noarch
(php-composer(psr/container) >= 1.0 with php-composer(psr/container) < 2) is needed by phpMyAdmin-4.9.5-1.fc30.noarch
(php-composer(symfony/expression-language) >= 2.8 with php-composer(symfony/expression-language) < 4) is needed by phpMyAdmin-4.9.5-1.fc30.noarch
(php-composer(symfony/polyfill-mbstring) >= 1.3 with php-composer(symfony/polyfill-mbstring) < 2) is needed by phpMyAdmin-4.9.5-1.fc30.noarch
(php-composer(twig/extensions) >= 1.5.1 with php-composer(twig/extensions) < 2) is needed by phpMyAdmin-4.9.5-1.fc30.noarch
(php-composer(twig/twig) >= 1.34 with php-composer(twig/twig) < 3) is needed by phpMyAdmin-4.9.5-1.fc30.noarch
To diagnose the problem, try running: 'rpm -Va --nofiles --nodigest'.
You probably have corrupted RPMDB, running 'rpm --rebuilddb' might fix the issue.
Download complete! Use 'dnf system-upgrade reboot' to start the upgrade.
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
TBH I really don't care about PHP. I'd be surprised if everything can't just be dnf installed after the upgrade finishes and it's not like core system packages are listed so the system should be happy without them. Is there an --i-dont-care-just-do-it option? (more than --allowerasing)
If not I'd happily uninstall the packages listed so dnf doesn't try to upgrade them and fail miserably. I've tried to sudo dnf remove <a bunch of these> but nothing is working:
No match for argument: php-phpmyadmin-motranslator
No match for argument: annobin
No match for argument: php-twig-extensions
No match for argument: php-twig2
No match for argument: composer
No match for argument: php-symfony*
No match for argument: php-composer*
What else can I try?
EDIT
I think the reason these packages don't exist is they're proposed replacements to some existing package. DNF should be printing the source packages and explaining how it got itself into this state. Otherwise it's just a total guessing game.
|
This could work:
dnf remove '*php*'
| Error: transaction check vs depsolve... php dependencies |
1,584,874,164,000 |
How can I hold packages back from getting upgraded and do a Ubuntu Release Upgrade at the same time?
If I run this script I'm getting the error:
ASK [Run do-release-upgrade non-interactively.]
fatal: [31.171.246.151]: FAILED! => {"changed": true, "cmd":
["do-release-upgrade", "-d", "-f", "DistUpgradeViewNonInteractive"],
"delta": "0:00:05.992413", "end": "2020-07-14 15:23:58.037328", "msg":
"non-zero return code", "rc": 1, "start": "2020-07-14
15:23:52.044915", "stderr": "", "stderr_lines": [], "stdout":
"Checking for a new Ubuntu release\nPlease install all available
updates for your release before upgrading.", "stdout_lines":
["Checking for a new Ubuntu release", "Please install all available
updates for your release before upgrading."]}
************************************************************************************---
- hosts: localhost
become: yes
tasks:
- name: disable upgrade of Java
dpkg_selections:
name: openjdk-8-jre
selection: hold
- name: disable install of PostgreSQL
dpkg_selections:
name: postgresql-9.3
selection: hold
- name: update apt cache
apt:
update_cache: yes
autoclean: yes
- name: upgrade packages
apt:
upgrade: dist
- name: Run do-release-upgrade non-interactively.
command: do-release-upgrade -d -f DistUpgradeViewNonInteractive
|
Q: "How can I hold packages back from getting upgraded and do a Ubuntu Release Upgrade at the same time?"
A: In Ubuntu, it is not possible to upgrade a release and keep the packages. It's necessary to install the packages from the new release's repositories.
| Ansible hold back packages to be upgraded and do-release-upgrade |
1,584,874,164,000 |
Running # apt-get dist-upgrade produced the following warnings/errors:
WARNING: missing /lib/modules/uname
depmod: ERROR: Bad version passed uname (2 times)
dpkg: warning: version 'uname' has bad syntax: version number does not start with digit (4 times)
Everything happened in the dist-upgrade step right after Processing triggers for initramfs-tools (0.130ubuntu3.8) ... was printed out, so I guess it has something to do with that...
Does anyone have an idea what is going wrong and how I can fix it? Thanks!
Here is the complete output:
root:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
libelf1 libglib2.0-0 libglib2.0-data libnss-systemd libpam-systemd libpython3.6 libpython3.6-minimal libpython3.6-stdlib libssl1.1 libsystemd0 libudev1 openssl python3-cryptography python3-gdbm
python3.6 python3.6-minimal systemd systemd-sysv udev
19 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 13.3 MB of archives.
After this operation, 792 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libnss-systemd amd64 237-3ubuntu10.22 [105 kB]
Get:2 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libsystemd0 amd64 237-3ubuntu10.22 [204 kB]
Get:3 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpam-systemd amd64 237-3ubuntu10.22 [108 kB]
Get:4 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 systemd amd64 237-3ubuntu10.22 [2,901 kB]
Get:5 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 udev amd64 237-3ubuntu10.22 [1,101 kB]
Get:6 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libudev1 amd64 237-3ubuntu10.22 [53.8 kB]
Get:7 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 systemd-sysv amd64 237-3ubuntu10.22 [11.7 kB]
Get:8 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6 amd64 3.6.8-1~18.04.1 [1,418 kB]
Get:9 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libssl1.1 amd64 1.1.1-1ubuntu2.1~18.04.1 [1,295 kB]
Get:10 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6 amd64 3.6.8-1~18.04.1 [202 kB]
Get:11 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3.6-minimal amd64 3.6.8-1~18.04.1 [1,620 kB]
Get:12 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-stdlib amd64 3.6.8-1~18.04.1 [1,715 kB]
Get:13 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libpython3.6-minimal amd64 3.6.8-1~18.04.1 [533 kB]
Get:14 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libelf1 amd64 0.170-0.4ubuntu0.1 [44.8 kB]
Get:15 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libglib2.0-0 amd64 2.56.4-0ubuntu0.18.04.3 [1,169 kB]
Get:16 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libglib2.0-data all 2.56.4-0ubuntu0.18.04.3 [4,608 B]
Get:17 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 openssl amd64 1.1.1-1ubuntu2.1~18.04.1 [614 kB]
Get:18 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-gdbm amd64 3.6.8-1~18.04 [13.3 kB]
Get:19 http://at.archive.ubuntu.com/ubuntu bionic-updates/main amd64 python3-cryptography amd64 2.1.4-1ubuntu1.3 [221 kB]
Fetched 13.3 MB in 2s (6,677 kB/s)
Preconfiguring packages ...
(Reading database ... 102639 files and directories currently installed.)
Preparing to unpack .../libnss-systemd_237-3ubuntu10.22_amd64.deb ...
Unpacking libnss-systemd:amd64 (237-3ubuntu10.22) over (237-3ubuntu10.21) ...
Preparing to unpack .../libsystemd0_237-3ubuntu10.22_amd64.deb ...
Unpacking libsystemd0:amd64 (237-3ubuntu10.22) over (237-3ubuntu10.21) ...
Setting up libsystemd0:amd64 (237-3ubuntu10.22) ...
(Reading database ... 102639 files and directories currently installed.)
Preparing to unpack .../libpam-systemd_237-3ubuntu10.22_amd64.deb ...
Unpacking libpam-systemd:amd64 (237-3ubuntu10.22) over (237-3ubuntu10.21) ...
Preparing to unpack .../systemd_237-3ubuntu10.22_amd64.deb ...
Unpacking systemd (237-3ubuntu10.22) over (237-3ubuntu10.21) ...
Preparing to unpack .../udev_237-3ubuntu10.22_amd64.deb ...
Unpacking udev (237-3ubuntu10.22) over (237-3ubuntu10.21) ...
Preparing to unpack .../libudev1_237-3ubuntu10.22_amd64.deb ...
Unpacking libudev1:amd64 (237-3ubuntu10.22) over (237-3ubuntu10.21) ...
Setting up libudev1:amd64 (237-3ubuntu10.22) ...
Setting up systemd (237-3ubuntu10.22) ...
(Reading database ... 102639 files and directories currently installed.)
Preparing to unpack .../00-systemd-sysv_237-3ubuntu10.22_amd64.deb ...
Unpacking systemd-sysv (237-3ubuntu10.22) over (237-3ubuntu10.21) ...
Preparing to unpack .../01-libpython3.6_3.6.8-1~18.04.1_amd64.deb ...
Unpacking libpython3.6:amd64 (3.6.8-1~18.04.1) over (3.6.7-1~18.04) ...
Preparing to unpack .../02-libssl1.1_1.1.1-1ubuntu2.1~18.04.1_amd64.deb ...
Unpacking libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.1) over (1.1.0g-2ubuntu4.3) ...
Preparing to unpack .../03-python3.6_3.6.8-1~18.04.1_amd64.deb ...
Unpacking python3.6 (3.6.8-1~18.04.1) over (3.6.7-1~18.04) ...
Preparing to unpack .../04-python3.6-minimal_3.6.8-1~18.04.1_amd64.deb ...
Unpacking python3.6-minimal (3.6.8-1~18.04.1) over (3.6.7-1~18.04) ...
Preparing to unpack .../05-libpython3.6-stdlib_3.6.8-1~18.04.1_amd64.deb ...
Unpacking libpython3.6-stdlib:amd64 (3.6.8-1~18.04.1) over (3.6.7-1~18.04) ...
Preparing to unpack .../06-libpython3.6-minimal_3.6.8-1~18.04.1_amd64.deb ...
Unpacking libpython3.6-minimal:amd64 (3.6.8-1~18.04.1) over (3.6.7-1~18.04) ...
Preparing to unpack .../07-libelf1_0.170-0.4ubuntu0.1_amd64.deb ...
Unpacking libelf1:amd64 (0.170-0.4ubuntu0.1) over (0.170-0.4) ...
Preparing to unpack .../08-libglib2.0-0_2.56.4-0ubuntu0.18.04.3_amd64.deb ...
Unpacking libglib2.0-0:amd64 (2.56.4-0ubuntu0.18.04.3) over (2.56.4-0ubuntu0.18.04.2) ...
Preparing to unpack .../09-libglib2.0-data_2.56.4-0ubuntu0.18.04.3_all.deb ...
Unpacking libglib2.0-data (2.56.4-0ubuntu0.18.04.3) over (2.56.4-0ubuntu0.18.04.2) ...
Preparing to unpack .../10-openssl_1.1.1-1ubuntu2.1~18.04.1_amd64.deb ...
Unpacking openssl (1.1.1-1ubuntu2.1~18.04.1) over (1.1.0g-2ubuntu4.3) ...
Preparing to unpack .../11-python3-gdbm_3.6.8-1~18.04_amd64.deb ...
Unpacking python3-gdbm:amd64 (3.6.8-1~18.04) over (3.6.7-1~18.04) ...
Preparing to unpack .../12-python3-cryptography_2.1.4-1ubuntu1.3_amd64.deb ...
Unpacking python3-cryptography (2.1.4-1ubuntu1.3) over (2.1.4-1ubuntu1.2) ...
Setting up libnss-systemd:amd64 (237-3ubuntu10.22) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for ureadahead (0.100.0-21) ...
ureadahead will be reprofiled on next reboot
Setting up systemd-sysv (237-3ubuntu10.22) ...
Setting up libelf1:amd64 (0.170-0.4ubuntu0.1) ...
Setting up libglib2.0-0:amd64 (2.56.4-0ubuntu0.18.04.3) ...
No schema files found: doing nothing.
Setting up libglib2.0-data (2.56.4-0ubuntu0.18.04.3) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up udev (237-3ubuntu10.22) ...
update-initramfs: deferring update (trigger activated)
Setting up libssl1.1:amd64 (1.1.1-1ubuntu2.1~18.04.1) ...
Setting up openssl (1.1.1-1ubuntu2.1~18.04.1) ...
Installing new version of config file /etc/ssl/openssl.cnf ...
Setting up python3-gdbm:amd64 (3.6.8-1~18.04) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for dbus (1.12.2-1ubuntu1) ...
Setting up python3-cryptography (2.1.4-1ubuntu1.3) ...
Setting up libpam-systemd:amd64 (237-3ubuntu10.22) ...
Setting up libpython3.6-minimal:amd64 (3.6.8-1~18.04.1) ...
Setting up libpython3.6-stdlib:amd64 (3.6.8-1~18.04.1) ...
Setting up python3.6-minimal (3.6.8-1~18.04.1) ...
Setting up libpython3.6:amd64 (3.6.8-1~18.04.1) ...
Setting up python3.6 (3.6.8-1~18.04.1) ...
Processing triggers for initramfs-tools (0.130ubuntu3.8) ...
update-initramfs: Generating /boot/initrd.img-uname
WARNING: missing /lib/modules/uname
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: Bad version passed uname
dpkg: warning: version 'uname' has bad syntax: version number does not start with digit
dpkg: warning: version 'uname' has bad syntax: version number does not start with digit
dpkg: warning: version 'uname' has bad syntax: version number does not start with digit
dpkg: warning: version 'uname' has bad syntax: version number does not start with digit
depmod: ERROR: Bad version passed uname
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Update, answering the question in the comments "What are the contents of /var/lib/initramfs-tools in your system?":
root:/var/lib/initramfs-tools# ll
total 24
drwxr-xr-x 2 root root 4096 Jun 5 13:47 ./
drwxr-xr-x 35 root root 4096 May 15 19:30 ../
-rw-r--r-- 1 root root 77 Jun 4 10:52 4.15.0-50-generic
-rw-r--r-- 1 root root 77 Jun 11 12:43 4.15.0-51-generic
-rw-r--r-- 1 root root 65 Jun 11 12:06 uname
-rw-r--r-- 1 root root 68 Jun 3 15:54 'uname -r'
root:/var/lib/initramfs-tools# cat 4.15.0-50-generic
acaea6c0d9c90f8bf83318577512b41aaa5f0ad8 /boot/initrd.img-4.15.0-50-generic
root:/var/lib/initramfs-tools# cat 4.15.0-51-generic
bd7c14ffe0b4389131448c3049b3530e05dad256 /boot/initrd.img-4.15.0-51-generic
root:/var/lib/initramfs-tools# cat uname
0a84ae4e46f9e3495fa7c7303692e405e61ebaf0 /boot/initrd.img-uname
root:/var/lib/initramfs-tools# cat 'uname -r'
053fe3e77f0f235dc9a1f8e327ab362e302cd459 /boot/initrd.img-uname -r
|
During the days before the apt-get dist-upgrade issue appeared, I run update-initramfs -k <version> -c several times.
In one case I can remember that I erroneously used just uname as parameter (instead of the `uname -r`). I was not aware that although this command produces warning and error messages it still creates an entry uname in /var/lib/initramfs-tools. And in the subsequent apt-get dist-upgrade which triggered initramfs-tools the erroneous update-initramfs command was run again.
So I think the solution is just to delete the 2 wrong uname-related entries in /var/lib/initramfs-tools.
| "apt-get dist-upgrade" reports error "depmod: ERROR: Bad version passed uname" and various warnings |
1,584,874,164,000 |
Where is the log that tells me where the upgrade got to before it failed.
My current info:
No LSB modules are available.
Distributor ID: Kali
Description: Kali GNU/Linux Rolling
Release: 2019.1
Codename: n/a
Just trying to get to the latest build
|
The detailed log of apt-based package changes (including upgrades) is stored in /var/log/apt/term.log. Reading that will tell you how far the process got, and also why it failed.
/var/log/apt/history.log, which you can match up with term.log by looking at the entry timestamps, will tell you what apt command was run and what it tried to do.
| My Kali upgrade fails - location of the log to find out the problem |
1,584,874,164,000 |
I'm getting this error while upgrading to Fedora 26 from 25
Detailed errors from the package manager follow:
Error running transaction: file /usr/bin/pytest from install of python2-pytest-3.1.1-1.fc26.noarch conflicts with file from python-logilab-common-0.63.2-6.fc25.noarch
Any solution?
|
First, it's worth checking whether the package is obsolete; in this case, it is.
Assuming you're following the instructions outlined here, two things you can try:
First, at step 3 from the article, append "--allowerasing", to allow the upgrade process to remove obsolete packages. I.e., instead of:
# dnf system-upgrade download --releasever=26
use:
# dnf system-upgrade download --releasever=26 --allowerasing
If that doesn't work, than second, try @DopeGhoti's solution:
# dnf remove python-logilab-common
then repeat the previous command.
| Error while upgrading to Fedora 26 from 25 |
1,584,874,164,000 |
I recently attempted a do-release-upgrade, which unfortunately was interrupted during the process (it is a remote machine, that I can only access through ssh), and I now encounter many broken dependencies that I'm unable to fix. Also I'm unable to install other packages (for example apache2) because of those unmet dependencies.
(Short) history of the system:
At some point in the past there was an Ubuntu 13.04 (raring) on it
Later I installed Ubuntu 13.10 (saucy).
I think that at some point, there were mixed sources (raring and saucy) in sources.list, but I do not remember the reason.
There were also third-party sources (in particular because I wanted to, and did, install virtualmin)
Now:
I wanted to upgrade this system to the newest LTS release. I decided to do this in several steps (13.10 -> 14.04 and then LTS release upgrade 14.04-> 16.04).
For this, I removed all third-party sources (actually only virtualmin I think), and replaced "raring/saucy" by "trusty" (14.04) and did apt update and dist-upgrade. I think it worked, but I did not play long with this system.
Then I did edited /etc/update-manager/release-upgrades and set Prompt=lts in order to allow a release-upgrade to the next LTS version "Xenial" (16.04) instead of 14.10. Then I performed do-release-upgrade.
Unfortunately I lost the Internet connection to the machine (this is a remote machine) during the process and the installation did not go to the end (although I believe it was almost the end)
And here I am:
aptitude update shows some problems that I do not understand:
root@digi00261:/var/log# aptitude update
Hit http://archive.ubuntu.com xenial InRelease
Hit http://archive.ubuntu.com xenial-security InRelease
Hit http://archive.ubuntu.com xenial-updates InRelease
Hit http://archive.ubuntu.com xenial-backports InRelease
Hit http://archive.ubuntu.com xenial/main Sources
Hit http://archive.ubuntu.com xenial/restricted Sources
Hit http://archive.ubuntu.com xenial/universe Sources
Hit http://archive.ubuntu.com xenial/multiverse Sources
Hit http://archive.ubuntu.com xenial/restricted amd64 Packages
Hit http://archive.ubuntu.com xenial/universe amd64 Packages
Hit http://archive.ubuntu.com xenial/multiverse amd64 Packages
Hit http://archive.ubuntu.com xenial/restricted i386 Packages
Hit http://archive.ubuntu.com xenial/universe i386 Packages
.... I'm cutting here because too many lines.
But the y all refer to "xenial" ....
Hit http://archive.ubuntu.com xenial-backports/universe i386 Packages
Hit http://archive.ubuntu.com xenial-backports/multiverse i386 Packages
Hit http://archive.ubuntu.com xenial-backports/main Translation-en
Hit http://archive.ubuntu.com xenial-backports/multiverse Translation-en
Hit http://archive.ubuntu.com xenial-backports/restricted Translation-en
Hit http://archive.ubuntu.com xenial-backports/universe Translation-en
W: Unknown Multi-Arch type 'no' for package 'kwin' 17.6 MB/s 0s
W: Unknown Multi-Arch type 'no' for package 'kwin-dev'
W: Unknown Multi-Arch type 'no' for package 'kwin-wayland'
W: Unknown Multi-Arch type 'no' for package 'kwin-x11'
W: Unknown Multi-Arch type 'no' for package 'libkf5sysguard-dev'
W: Ignoring Provides line with DepCompareOp for package php-psr-http-message-implementation
W: Ignoring Provides line with DepCompareOp for package php-psr-log-implementation
W: Ignoring Provides line with DepCompareOp for package php-seclib
W: Ignoring Provides line with DepCompareOp for package php-sabre-http
W: Ignoring Provides line with DepCompareOp for package php-math-biginteger
W: Ignoring Provides line with DepCompareOp for package pypy-cffi
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-min
W: Unknown Multi-Arch type 'no' for package 'kwin-dev'
W: Unknown Multi-Arch type 'no' for package 'kwin-wayland'
W: Unknown Multi-Arch type 'no' for package 'kwin-x11'
W: Unknown Multi-Arch type 'no' for package 'libkf5sysguard-dev'
W: Ignoring Provides line with DepCompareOp for package pypy-cffi
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-min
W: Unknown Multi-Arch type 'no' for package 'compiz-core'
W: Unknown Multi-Arch type 'no' for package 'compiz-gnome'
W: Ignoring Provides line with DepCompareOp for package xserver-xorg
W: Ignoring Provides line with DepCompareOp for package php-math-biginteger
W: Ignoring Provides line with DepCompareOp for package pypy-cffi
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-min
W: Unknown Multi-Arch type 'no' for package 'compiz-core'
W: Unknown Multi-Arch type 'no' for package 'compiz-gnome'
W: Ignoring Provides line with DepCompareOp for package xserver-xorg
W: Ignoring Provides line with DepCompareOp for package pypy-cffi
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-min
W: You may want to run apt-get update to correct these problems
But the way the above output seems to confirm that there are no mixed sources, since only "xenial" appear. In my sources.list there are only xenial lines.
Attempt to upgrade does not want to do anything:
root@digi00261:/var/log# aptitude upgrade
Resolving dependencies...
open: 97; closed: 113; defer: 22; conflict: 43
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 103 not upgraded.
Attempt to full-upgrade shows however many broken dependencies:
root@digi00261:/var/log# aptitude full-upgrade
The following NEW packages will be installed:
distro-info-data{a} initramfs-tools-core{a} libapt-inst2.0{a} libapt-pkg5.0{ab} libbytes-random-secure-perl{a}
libcrypt-random-seed-perl{a} libfdisk1{a} libgcrypt20{ab} libgnutls30{ab} libhogweed4{ab} libjs-excanvas{a} libmath-random-isaac-perl{a}
libmath-random-isaac-xs-perl{a} libmemcached11{a} libmemcachedutil2{a} libmspack0{a} libnettle6{a} libperl5.22{a} libplymouth4{a}
libprocps4{a} librtmp1{a} libruby2.3{ab} libsystemd0{a} lynx-common{a} netfilter-persistent{a} perl-modules-5.22{ab}
python-cryptography{ab} ruby2.3{ab} ruby2.3-doc{a} xdg-user-dirs{a}
The following packages will be upgraded:
apt apt-transport-https apt-utils bash{b} bsdutils dovecot-core{b} dovecot-imapd{b} dovecot-pop3d dpkg{b} gcc-4.9-base ifupdown
init-system-helpers{b} initramfs-tools{b} initramfs-tools-bin iproute2{b} iptables-persistent joe{b} kmod lame{b} landscape-common{b}
less{b} libaccountsservice0 libapparmor-perl libavahi-client3 libclamav7{b} libcrypt-ssleay-perl libcups2 libcurl3 libcurl3-gnutls
libdbus-1-3 libgd3{b} libglib2.0-0 libgnutls-openssl27 libgssapi-krb5-2 libk5crypto3 libkrb5-3{b} libkrb5support0 libldap-2.4-2
libpg-perl libpolkit-gobject-1-0 libpulse0 libpython-stdlib libpython2.7 libpython2.7-minimal libpython2.7-stdlib{b}
libschroedinger-1.0-0{b} libudev1 libwhoopsie0 libxml-libxml-perl lsb-base lsb-release{b} lynx{b} lynx-cur mercurial mercurial-common
mtr-tiny{b} nano{b} ntfs-3g ntp{b} openssh-client openssh-server openssh-sftp-server passwd perl perl-base{b} plymouth ppp procps{b}
proftpd-basic{b} psmisc{b} python python-apt python-crypto python-debian{b} python-launchpadlib python-lazr.restfulclient python-minimal
python-openssl{b} python-requests python-twisted-core{b} python-urllib3 python2.7 python2.7-minimal python3-apt{b}
python3-commandnotfound{b} python3-distupgrade{b} python3-update-manager{b} resolvconf{b} ri sasl2-bin ssh tcpdump{b}
ubuntu-release-upgrader-core udev unattended-upgrades{b} update-manager-core update-notifier-common{b} upstart{b} util-linux{b}
uuid-runtime w3m{b} whoopsie{b} wpasupplicant
The following packages are RECOMMENDED but will NOT be installed:
dbus dbus:i386 libglib2.0-data mythbuntu-default-settings plymouth-theme-hamara plymouth-theme-kubuntu-logo plymouth-theme-kubuntu-text
plymouth-theme-lubuntu-logo plymouth-theme-lubuntu-text plymouth-theme-sabily plymouth-theme-sabily-text plymouth-theme-ubuntu-gnome-logo
plymouth-theme-ubuntu-gnome-text plymouth-theme-ubuntu-logo plymouth-theme-ubuntu-mate-logo plymouth-theme-ubuntu-mate-text
plymouth-theme-ubuntu-text plymouth-theme-ubuntustudio plymouth-theme-xubuntu-logo plymouth-theme-xubuntu-text plymouth-themes
103 packages upgraded, 30 newly installed, 0 to remove and 0 not upgraded.
Need to get 47.4 MB/51.0 MB of archives. After unpacking 88.3 MB will be used.
The following packages have unmet dependencies:
nano : Depends: libncursesw5 (>= 6) but 5.9-10ubuntu4 is installed.
Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
libclamav7 : Depends: libllvm3.6v5 which is a virtual package.
Depends: libltdl7 (>= 2.4.6) but 2.4.2-1.2ubuntu1 is installed.
libpython2.7-stdlib : Depends: libncursesw5 (>= 6) but 5.9-10ubuntu4 is installed.
Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
resolvconf : Breaks: sysv-rc (< 2.88dsf-42) but 2.88dsf-41ubuntu6.3 is installed.
Breaks: sysv-rc:i386 (< 2.88dsf-42) which is a virtual package.
perl-base : Breaks: perl-modules (< 5.22.1~) but 5.18.2-2ubuntu1.7 is installed.
procps : Depends: libncurses5 (>= 6) but 5.9-10ubuntu4 is installed.
Depends: libncursesw5 (>= 6) but 5.9-10ubuntu4 is installed.
Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
tcpdump : Depends: libpcap0.8 (>= 1.5.1) but 1.3.0-1 is installed.
dpkg : PreDepends: libselinux1 (>= 2.3) but 2.2.2-1ubuntu0.1 is installed.
Breaks: install-info (< 5.1.dfsg.1-3~) but 4.13a.dfsg.1-10ubuntu4 is installed.
Breaks: install-info:i386 (< 5.1.dfsg.1-3~) which is a virtual package.
Breaks: man-db (< 2.6.3-6~) but 2.6.3-3 is installed.
Breaks: man-db:i386 (< 2.6.3-6~) which is a virtual package.
whoopsie : PreDepends: sysvinit-utils (>= 2.88dsf-50) but 2.88dsf-41ubuntu6.3 is installed.
joe : Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
libkrb5-3 : Depends: libkeyutils1 (>= 1.5.9) but 1.5.5-4 is installed.
lame : Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
iproute2 : Depends: libmnl0 (>= 1.0.3-4~) which is a virtual package.
python3-update-manager : Depends: python3:any (>= 3.3.2-2~) which is a virtual package.
libapt-pkg5.0 : Depends: liblz4-1 (>= 0.0~r127) which is a virtual package.
libgcc1 : Depends: gcc-4.9-base (= 4.9.3-0ubuntu4) but 4.9.3-13ubuntu2 is to be installed.
perl-modules-5.22 : Conflicts: perl-modules but 5.18.2-2ubuntu1.7 is installed.
python3-commandnotfound : Depends: python3:any (>= 3.3.2-2~) which is a virtual package.
psmisc : Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
ruby2.3 : Depends: rubygems-integration (>= 1.8) which is a virtual package.
python-cryptography : Depends: python-cffi-backend-api-9729 which is a virtual package.
Depends: python-enum34 which is a virtual package.
Depends: python-idna which is a virtual package.
Depends: python-ipaddress which is a virtual package.
Depends: python-pyasn1 (>= 0.1.8) which is a virtual package.
Depends: python-six (>= 1.4.1) but 1.2.0-1 is installed.
libschroedinger-1.0-0 : Depends: liborc-0.4-0 (>= 1:0.4.20) but 1:0.4.17-1 is installed.
update-notifier-common : Depends: python3-dbus which is a virtual package.
Depends: python3-debian which is a virtual package.
libruby2.3 : Depends: rake (>= 10.4.2) which is a virtual package.
Depends: ruby-did-you-mean (>= 1.0) which is a virtual package.
Depends: ruby-minitest (>= 5.4) which is a virtual package.
Depends: ruby-net-telnet (>= 0.1.1) which is a virtual package.
Depends: ruby-test-unit (>= 3.0.8~) which is a virtual package.
libgd3 : Depends: libvpx3 (>= 1.5.0) which is a virtual package.
initramfs-tools : Breaks: initscripts (< 2.88dsf-59.3~) but 2.88dsf-41ubuntu6.3 is installed.
Breaks: initscripts:i386 (< 2.88dsf-59.3~) which is a virtual package.
w3m : Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
python-debian : Depends: python-six (> 1.4~) but 1.2.0-1 is installed.
lynx : Depends: libncursesw5 (>= 6) but 5.9-10ubuntu4 is installed.
Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
ntp : Depends: libopts25 (>= 1:5.18.7) but 1:5.17.1-1ubuntu2 is installed.
bash : PreDepends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
proftpd-basic : Depends: libncurses5 (>= 6) but 5.9-10ubuntu4 is installed.
Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
lsb-release : Depends: python3:any (>= 3.4~) which is a virtual package.
dovecot-core : Depends: libexttextcat-2.0-0 (>= 3.3.0) which is a virtual package.
Depends: liblz4-1 (>= 0.0~r113) which is a virtual package.
less : Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
python3-apt : Depends: python3 (>= 3.5~) but 3.3.1-0ubuntu1 is installed.
libhogweed4 : Depends: libgmp10 (>= 2:6.0.0) but 2:5.0.5+dfsg-2ubuntu3 is installed.
mtr-tiny : Depends: libncurses5 (>= 6) but 5.9-10ubuntu4 is installed.
Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
upstart : Depends: libcgmanager0 (>= 0.28) but 0.24-0ubuntu7.5 is installed.
python-openssl : Depends: python-six (>= 1.5.2) but 1.2.0-1 is installed.
python-twisted-core : Depends: python-service-identity which is a virtual package.
libgnutls30 : Depends: libgmp10 (>= 2:6) but 2:5.0.5+dfsg-2ubuntu3 is installed.
python3-distupgrade : Depends: python3:any (>= 3.3.2-2~) which is a virtual package.
landscape-common : Depends: python-configobj which is a virtual package.
init-system-helpers : Breaks: sysvinit-utils (< 2.88dsf-59.3~) but 2.88dsf-41ubuntu6.3 is installed.
Breaks: sysvinit-utils:i386 (< 2.88dsf-59.3~) which is a virtual package.
dovecot-imapd : Depends: liblz4-1 (>= 0.0~r113) which is a virtual package.
util-linux : Depends: sysvinit-utils (>= 2.88dsf-59.1~) but 2.88dsf-41ubuntu6.3 is installed.
PreDepends: libncursesw5 (>= 6) but 5.9-10ubuntu4 is installed.
PreDepends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
unattended-upgrades : Depends: python3-gi but it is not installable.
Depends: python3-dbus which is a virtual package.
libgcrypt20 : Depends: libgpg-error0 (>= 1.14) but 1.10-3.1ubuntu1 is installed.
open: 148; closed: 285; defer: 53; conflict: 87
Unfortunately aptitude is not able to find any solution to fix these dependencies. The proposed solution amount to "Keep the following packages at their current version" for all the packages.
Any help will be welcome...
EDIT1:
Output of apt-get install apt apt-transport-https apt-utils:
root@digi00261:/var/log# apt-get install apt apt-transport-https apt-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
apt : Depends: libapt-pkg5.0 (>= 1.2.32) but it is not going to be installed
Depends: init-system-helpers (>= 1.18~) but 1.14ubuntu1 is to be installed
apt-transport-https : Depends: libapt-pkg5.0 (>= 1.1~exp15) but it is not going to be installed
apt-utils : Depends: libapt-inst2.0 (>= 1.0.5) but it is not going to be installed
Depends: libapt-pkg5.0 (>= 1.1~exp15) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
EDIT2
Here is the source of the problem: my sources.list:
###### Ubuntu Main Repos
deb http://archive.ubuntu.com/ubuntu/ xenial restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
###### Ubuntu Update Repos
deb http://archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://software.virtualmin.com/vm/6/gpl/apt virtualmin-xenial main
deb http://software.virtualmin.com/vm/6/gpl/apt virtualmin-universal main
The repos were missing the "main" !! This is the reason why there were some many broken dependencies in the form "package_xxx needs package_yyy version a.a.a but version b.b.b is installed". The needed newes versions could not be installed because of the missing "main" repo.
|
I finally found the reason: The repos were missing the "main" !! See Edit 2
| broken Ubuntu after failed release-upgrade |
1,584,874,164,000 |
I am trying to upgrade my Debian 9 to Debian 10.
I have changed my sources.list to following
deb http://deb.debian.org/debian buster main contrib non-free
deb-src http://deb.debian.org/debian buster main contrib non-free
deb http://deb.debian.org/debian-security/ buster/updates main contrib non-free
deb-src http://deb.debian.org/debian-security/ buster/updates main contrib non-free
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
Now whenever I am performing apt update I am getting following error
E: The repository 'http://build.openvpn.net/debian/openvpn/stable buster Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
I have already checked this post which talks about using testing repository. However, now that it is officially released, it should upgrade properly right? Am I missing something?
|
The build.openvpn.net repository accept only the following Debian codenames :
wheezy
jessie
stretch
Check your /etc/apt/sources.list.d/ then disable the openvpn repository. The package openvpn can be installed from Debian repository later:
sudo apt install openvpn
| Upgrading Debian 9 Stretch to Debain 10 Buster |
1,432,290,488,000 |
I'm trying to remove this dkms module but am running into trouble.
I run
sudo dkms uninstall rtl8812au/4.3.14
and I get
Error! The module/version combo: rtl8812au-4.3.14
is not located in the DKMS tree.
However, when I run dkms status, I get
8188eu, 1.0, 4.13.0-26-generic, x86_64: installed
bcmwl, 6.30.223.271+bdcom, 4.13.0-26-generic, x86_64: installed
mt7610u_sta, 1.0, 4.13.0-26-generic, x86_64: installed (WARNING! Diff between built and installed module!)
rtl8812au, 4.3.8.12175.20140902+dfsg: added
and when I go into the Makefile.dkms in the following folder,
y9@y9-aspire:~/rtl8812AU_8821AU_linux$ ls
clean core ifcfg-wlan0 Makefile README.md
contrib dkms.conf include Makefile.dkms runwpa
CONTRIBUTORS.md fetch.sh Kconfig os_dep wlan0dhcp
contributors.sh hal LICENSE platform
I see
modname := rtl8812au
DKMS := dkms
modver := 4.3.14
I just want to know how I can clear my dkms modules. Thank you.
|
In case of normal operations gone wrong, you can always delete dkms add-ons by hand, with sudo or as root.
Normally the modules sources are installed by make install under /var/lib/dkms/ in a directory with the corresponding name, probably named rtl...something. Just delete that directory.
You have also to delete the corresponding compiled file module under /lib/modules/KERNEL_VERSION/updates/dkms/ where KERNEL_VERSION is your current kernel. The file should be called rtl...something.ko or similar.
Once done that, you can either try to rmmod the module or falling that, reboot.
No module and corresponding dkms anymore in the system.
While not critical, the module dependencies also need to be updated after deleting the module. Run:
sudo /sbin/depmod -a
| why can I not remove this dkms module? |
1,432,290,488,000 |
I have installed vitualbox on Debian Jessie according to instructions on debian wiki.
By running:
apt-get install linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,') virtualbox
During installation some errors were reported.
Now I want to re-configure virtualbox-dkms but I receive this error:
Loading new virtualbox-4.3.18 DKMS files...
Building only for 3.16-3-amd64
Module build for the currently running kernel was skipped since the
kernel source for this kernel does not seem to be installed.
Note: uname -r shows 3.16-3-amd64 but my source folder in /usr/src is named:
linux-headers-3.16.0-4-amd64.
I don't know what to do!
|
I did all of these solutions but problem was about my kernel!
linux-headers-uname -r wanted to install 3.16.0-3 headers due to my kernel version but there is no such linux kernel header in Debian repos: There is 3.16.0-4
Solution: upgrade my kernel via apt-get then everything works fine.
| cannot reconfigure virtualbox-dkms |
1,432,290,488,000 |
I want to install CUDA according to the info on NVIDIA CUDA toolkit site
wget http://developer.download.nvidia.com/compute/cuda/10.2/Prod/local_installers/cuda-repo-rhel8-10-2-local-10.2.89-440.33.01-1.0-1.x86_64.rpm
sudo rpm -i cuda-repo-rhel8-10-2-local-10.2.89-440.33.01-1.0-1.x86_64.rpm
sudo dnf clean all
sudo dnf -y module install nvidia-driver:latest-dkms
sudo dnf -y install cuda
...
Error:
Problem 1: conflicting requests
- nothing provides dkms needed by kmod-nvidia-latest-dkms-3:440.33.01-1.el8.x86_64
If I enable epel via
sudo subscription-manager repos --enable "codeready-builder-for-rhel-8-$(arch)-rpms"
[sudo] password for adminsafe20:
Repository 'codeready-builder-for-rhel-8-x86_64-rpms' is enabled for this system.
it looks ok, but I don't see anything returning from yum search dkms except for:
============================== Name Matched: dkms ==============================
kmod-nvidia-latest-dkms.x86_64 : NVIDIA display driver kernel module
witch I get the same original message as before trying to install:
- nothing provides dkms needed by kmod-nvidia-latest-dkms-3:440.33.01-1.el8.x86_64
|
You didn't enable epel. You enabled the codeready-builder repo.
First, add the epel repo:
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
It's normally enabled by default after it's installed but if not:
dnf config-manager --enable epel
You can then install dkms.
| CUDA 10 and dkms on RHEL8 |
1,432,290,488,000 |
I would appreciate, if anybody can help me.
1) I am trying to build kernel module for Ubuntu sever using dkms.
Detailed manual is here.
2) When It is building module using this syntax:
sudo dkms build -m ixgbevf -v 2.15.3
it says, that some kernel headers are missing:
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area....(bad exit status: 2)
cd src/; make BUILD_KERNEL=....(bad exit status: 2)
ERROR (dkms apport): binary package for ixgbevf: 2.15.3 not found
Error! Bad return status for module build on kernel: 3.13.0-36-generic (x86_64)
Consult /var/lib/dkms/ixgbevf/2.15.3/build/make.log for more information.
3) Log file: /var/lib/dkms/ixgbevf/2.15.3/build/make.log:
DKMS make.log for ixgbevf-2.15.3 for kernel 3.13.0-36-generic (x86_64)
Tue Dec 23 09:27:47 UTC 2014
Makefile:64: *** Kernel header files not in any of the expected locations.
Makefile:65: *** Install the appropriate kernel development package, e.g.
Makefile:66: *** kernel-devel, for building kernel modules and try again. Stop.
4) I have headers here:
/usr/src/linux-headers-3.13.0-36
/usr/src/linux-headers-3.13.0-36-generic
/usr/include
And cpp -v shows:
#include <...> search starts here:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include
/usr/local/include
/usr/lib/gcc/x86_64-linux-gnu/4.8/include-fixed
/usr/include/x86_64-linux-gnu
/usr/include
If you need more information, I will provide you immediately.
Thanks.
--- Added info ---
1) dpkg -l | grep linux-headers shows:
ii linux-headers-3.13.0-36 3.13.0-36.63 all Header files related to Linux kernel version 3.13.0
ii linux-headers-3.13.0-36-generic 3.13.0-36.63 amd64 Linux kernel headers for version 3.13.0 on 64 bit x86 SMP
ii linux-headers-generic 3.13.0.36.43 amd64 Generic Linux kernel headers
ii linux-headers-virtual 3.13.0.36.43 amd64 Transitional package.
2) Output info of dpkg -l | grep linux-image
ii linux-image-3.13.0-36-generic 3.13.0-36.63 amd64 Linux kernel image for version 3.13.0 on 64 bit x86 SMP
ii linux-image-virtual 3.13.0.36.43 amd64 This package will always depend on the latest minimal generic kernel image.
3) Output of uname -a
Linux ip-10-0-3-11 3.13.0-36-generic #63-Ubuntu SMP Wed Sep 3 21:30:07 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
4) The link to sources of ixgbevf module is here.
|
So, Finally, I have managed to install driver ixgbevf v. 2.15.3 for kernel version 3.13.0-43.
But, there are some important points:
First of all, I tried to use make to build it manually and got the same result:
Makefile:64: *** Kernel header files not in any of the expected locations.
Makefile:65: *** Install the appropriate kernel development package, e.g.
Makefile:66: *** kernel-devel, for building kernel modules and try again. Stop.
Secondly, I ran apt-get upgrade and apt-get dist-upgrade to update kernel from 3.13.0-36 to 3.13.0-43, and reboot machine after, to update kernel. Details are here.
It installed kernel headers for 3.13.0-43 as well.
Thirdly, I had to change dkms.conf configuration file, like here:
MAKE="make -C src/ KERNELDIR=/lib/modules/${kernelver}/build"
CLEAN="make -C src/ clean"
BUILT_MODULE_NAME=ixgbevf
BUILT_MODULE_LOCATION=src/
DEST_MODULE_LOCATION="/updates"
PACKAGE_NAME=ixgbevf-dkms
PACKAGE_VERSION=2.15.3
REMAKE_INITRD=no
After that, It was able to build driver.
If you have the same problem and need help, feel free to contact me.
@Faheem Mitha, Thanks a lot for your helping.
| Building kernel module using dkms, missing headers |
1,432,290,488,000 |
I have very little experience with kernel module development. Despite this I have been tasked with maintaining an old driver for a Sensoray 626 DAQ card. I am using a very simple dkms setup to build and install the driver which has been working well for a long time. The driver has been working in Ubuntu 22.04 until recently I ran into the error below during the kernel module build and I'm unable to find a solution. Any help is appreciated. If additional information is needed, simply ask and I will update the question with the requested information.
Note: I am aware that Comedi has a driver for the Sensoray 626. I do not want to use the Comedi driver.
DKMS build log:
DKMS make.log for s626-1.0.5 for kernel 6.5.0-14-generic (x86_64)
Fri Jan 12 01:17:52 PM PST 2024
make -C /lib/modules/6.5.0-14-generic/build M=/var/lib/dkms/s626/1.0.5/build SUBDIRS=/var/lib/dkms/s626/1.0.5/build
make[1]: Entering directory '/usr/src/linux-headers-6.5.0-14-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
You are using: gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
CC [M] /var/lib/dkms/s626/1.0.5/build/s626drv.o
gcc: error: unrecognized command-line option ‘-ftrivial-auto-var-init=zero’
make[3]: *** [scripts/Makefile.build:251: /var/lib/dkms/s626/1.0.5/build/s626drv.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.5.0-14-generic/Makefile:2037: /var/lib/dkms/s626/1.0.5/build] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.5.0-14-generic'
make: *** [Makefile:29: all] Error 2
Distribution: Ubuntu 22.04.3 LTS
Linux kernel version: 6.5.0-14-generic
Output of apt list --installed | grep gcc
gcc-11-base/jammy-updates,jammy-security,now 11.4.0-1ubuntu1~22.04 amd64 [installed,automatic]
gcc-11/jammy-updates,jammy-security,now 11.4.0-1ubuntu1~22.04 amd64 [installed,automatic]
gcc-12-base/jammy-updates,jammy-security,now 12.3.0-1ubuntu1~22.04 amd64 [installed,automatic]
gcc-12/jammy-updates,jammy-security,now 12.3.0-1ubuntu1~22.04 amd64 [installed,automatic]
gcc/jammy,now 4:11.2.0-1ubuntu1 amd64 [installed,automatic]
libgcc-11-dev/jammy-updates,jammy-security,now 11.4.0-1ubuntu1~22.04 amd64 [installed,automatic]
libgcc-12-dev/jammy-updates,jammy-security,now 12.3.0-1ubuntu1~22.04 amd64 [installed,automatic]
libgcc-s1/jammy-updates,jammy-security,now 12.3.0-1ubuntu1~22.04 amd64 [installed,automatic]
Makefile (note this makefile has recipes for things other than the kernel module and the CC variable is not used for building the kernel module):
###############################################################################
# for kernel modeule level driver:
# Kernel directory
KDIR := /lib/modules/$(shell uname -r)/build
# Module directory
MODDIR := /lib/modules/$(shell uname -r)/kernel/drivers/sensoray
# System values
PWD := $(shell pwd)
KERNEL_24 := $(if $(wildcard $(KDIR)/Rules.make),1,0)
# Target file
obj-m := s626.o
# Source files
ifeq ($(KERNEL_24),0) # > 2.4
s626-objs := s626drv.o
else # <= 2.4
s626-objs := s626drv.o
endif
.PHONY: all clean modules_install
ifeq ($(KERNEL_24),0) # > 2.4
ifeq ($(KERNELRELEASE),)
all:
$(MAKE) -C $(KDIR) M=$(PWD) SUBDIRS=$(PWD)
clean modules_install:
$(MAKE) -C $(KDIR) M=$(PWD) SUBDIRS=$(PWD) $@
endif # KERNELRELEASE
else # <= 2.4
ifneq ($(KERNELRELEASE),)
include $(KDIR)/Rules.make
s626.o: $(s626-objs)
$(Q)$(LD) $(LD_RFLAG) -r -o $@ $(s626-objs)
else
all:
$(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
clean:
rm -f *.ko *.o .*.cmd .*.o.flags *.mod.c
endif # KERNELRELEASE
endif # KERNEL_24
ifeq ($(KERNEL_24),1) # <= 2.4
install: s626.o
@if [ -d /lib/modules/$(shell uname -r)/kernel/drivers/sensoray/ ];\
then rm -f /lib/modules/$(shell uname -r)/kernel/drivers/sensoray/s626.*;\
fi
@if [ -d /lib/modules/$(shell uname -r)/extra/ ];\
then rm -f /lib/modules/$(shell uname -r)/extra/s626.*;\
fi
su -c "set -x;./MAKEDEV;mkdir -p $(MODDIR);cp -v s626.o $(MODDIR);depmod -a"
else
install: s626.ko
@if [ -d /lib/modules/$(shell uname -r)/kernel/drivers/sensoray/ ];\
then rm -f /lib/modules/$(shell uname -r)/kernel/drivers/sensoray/s626.*; \
fi
@if [ -d /lib/modules/$(shell uname -r)/extra/ ];\
then rm -f /lib/modules/$(shell uname -r)/extra/s626.*;\
fi
@if [ -d /lib/modules/$(shell uname -r)/kernel/drivers/staging/comedi/drivers ];\
then rm -f /lib/modules/$(shell uname -r)/kernel/drivers/staging/comedi/drivers/s626.*;\
fi
su -c "set -x;./MAKEDEV;mkdir -p $(MODDIR);cp -v s626.ko $(MODDIR);install -m 444 s626.ko $(MODDIR);depmod -a"
endif # KERNEL > 2.4
###############################################################################
# for library and application level:
SRC= # module source tree
CC= # compiler
AR= # library manager
# source path
ifeq ($(strip $(SRC)),)
SRC=.
endif
# the compiler
ifeq ($(strip $(CC)),)
CC=gcc
endif
# the library manager
ifeq ($(strip $(AR)),)
AR=ar
endif
# build the distribution's library
lib: libs626.a
libs626.a: s626core.o s626mod.o
$(AR) cr libs626.a $(SRC)/s626core.o $(SRC)/s626mod.o
# compile the 626 universal core
core: s626core.o
s626core.o: $(SRC)/s626core.c $(SRC)/s626core.h $(SRC)/s626mod.h
$(CC) $(CFLAGS) -c $(SRC)/s626core.c
# build the 626 OS-dependent module
mod: s626mod.o
s626mod.o: $(SRC)/s626mod.c $(SRC)/s626core.h $(SRC)/s626mod.h $(SRC)/s626drv.h $(SRC)/s626.h $(SRC)/s626api.h
$(CC) $(CFLAGS) -c $(SRC)/s626mod.c
# build the distribution's library (you may need to install gcc-multilib package)
lib32: libs626-32.a
libs626-32.a: s626core-32.o s626mod-32.o
$(AR) cr libs626-32.a $(SRC)/s626core-32.o $(SRC)/s626mod-32.o
# compile the 626 universal core
s626core-32.o: $(SRC)/s626core.c $(SRC)/s626core.h $(SRC)/s626mod.h
$(CC) $(CFLAGS) -m32 -c $(SRC)/s626core.c -o $@
# build the 626 OS-dependent module
s626mod-32.o: $(SRC)/s626mod.c $(SRC)/s626core.h $(SRC)/s626mod.h $(SRC)/s626drv.h $(SRC)/s626.h $(SRC)/s626api.h
$(CC) $(CFLAGS) -m32 -c $(SRC)/s626mod.c -o $@
#----------------------------------------------------------------
# Demonstration programs
# type "make demo" to compile, link, and create demo application
demo: libs626.a s626demo.o s626dm2b.o
$(CC) -o s626demo s626demo.o -L$(SRC) -ls626 -lpthread
$(CC) -o s626dm2b s626dm2b.o -L$(SRC) -ls626 -lpthread
s626demo.o: $(SRC)/s626demo.c $(SRC)/s626core.h $(SRC)/s626mod.h $(SRC)/s626drv.h $(SRC)/s626api.h $(SRC)/App626.h
$(CC) $(CFLAGS) -c $(SRC)/s626demo.c
s626dm2b.o: $(SRC)/s626dm2b.c $(SRC)/s626core.h $(SRC)/s626mod.h $(SRC)/s626drv.h $(SRC)/s626api.h $(SRC)/App626.h
$(CC) $(CFLAGS) -c $(SRC)/s626dm2b.c
demo32: libs626-32.a s626demo-32.o s626dm2b-32.o
$(CC) -m32 -o s626demo-32 s626demo-32.o -L$(SRC) -ls626-32 -lpthread
$(CC) -m32 -o s626dm2b-32 s626dm2b-32.o -L$(SRC) -ls626-32 -lpthread
s626demo-32.o: $(SRC)/s626demo.c $(SRC)/s626core.h $(SRC)/s626mod.h $(SRC)/s626drv.h $(SRC)/s626api.h $(SRC)/App626.h
$(CC) $(CFLAGS) -m32 -c $(SRC)/s626demo.c -o $@
s626dm2b-32.o: $(SRC)/s626dm2b.c $(SRC)/s626core.h $(SRC)/s626mod.h $(SRC)/s626drv.h $(SRC)/s626api.h $(SRC)/App626.h
$(CC) $(CFLAGS) -m32 -c $(SRC)/s626dm2b.c -o $@
# for debugging:
# gcc -g -o s626demo s626core.c s626mod.c s626demo.c -lpthread
# gcc -g -o s626dm2b s626core.c s626mod.c s626dm2b.c -lpthread
clnall:
rm -f *.ko *.o .*.cmd .*.o.flags *.mod.c libs626*.a s626demo s626dm2b *.tar.gz s626*-32 Module.symvers modules.order
###############################################################################
# for internal develoment only
#----------------------------------------------------------------
# select files for the distribution tarball
T = $(SRC)/README
T += $(SRC)/COPYING
T += $(SRC)/MAKEDEV
T += $(SRC)/Modules.conf
T += $(SRC)/Makefile
T += $(SRC)/s626drv.h
T += $(SRC)/s626drv.c
T += $(SRC)/s626.h
T += $(SRC)/s626mod.h
T += $(SRC)/s626mod.c
T += $(SRC)/s626core.h
T += $(SRC)/s626core.c
T += $(SRC)/s626api.h
T += $(SRC)/App626.h
T += $(SRC)/libs626.a
T += $(SRC)/s626demo.c
T += $(SRC)/s626dm2b.c
#----------------------------------------------------------------
# build distribution tarball (only for development)
tar:
# tar -Pzcf s626-0.3.tar.gz $(T)
tar -czvf s626-1.0.tar.gz $(T)
DKMS configuration file:
MAKE="'make' KDIR=/lib/modules/${kernelver}/build"
CLEAN="'make' clean"
BUILT_MODULE_NAME=s626
BUILT_MODULE_LOCATION=./
DEST_MODULE_LOCATION=/kernel/drivers/sensoray/
PACKAGE_NAME=s626
PACKAGE_VERSION=1.0.5
AUTOINSTALL=yes
REMAKE_INITRD=yes
|
It appears that the problem is that the Makefile (which was written by the original developers) sets the CC make variable, thus preventing DKMS from properly overriding the compiler using a CC environment variable. This potential problem is described by this bug report.
Since in my case the Makefile only uses the CC make variable for building a user-level API library (i.e. it is not used in the portion of the Makefile used for building the module), the best solution was to install (into /usr/src/) a copy of the Makefile that only contains that portion dealing with the kernel module instead of installing the full Makefile.
| Unrecognized command-line option ‘-ftrivial-auto-var-init=zero’ when building kernel module |
1,432,290,488,000 |
I'm analyzing different PKGBUILDs to learn creating packages for Arch. I saw in a lot of them, that they do make on sources, and then manually copy files in the different places with the install command, instead of running make install. Is there a reason for it?
Examples:
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=mt7610u_wifi_sta
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=rt3290sta-dkms
(BTW, why I cannot even see make here?)
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=tbs-dvb-drivers
|
Well for one, these are dkms packages, and the actual make/etc is handled via dkms at install time, not make time.
For another reason, perhaps the Makefile itself is rather shoddy itself and would not work/could not be made to work with arch linux's packaging standards.
If you check out more repo PKGBUILDs you may find more that actually do use
make install DESTDIR=${pkgdir}, where ${pkgdir} resolves to the root directory
that is tar'd up under fakeroot to set proper permissions during the package()
function of the PKGBUILD
| Arch Linux: Why people do not do "make install" in PKGBUILD? |
1,432,290,488,000 |
I am running AlmaLinux 9 (RedHat 9 clone) and have compiled a new kernel module. I am running in a VM with UEFI and secure boot enabled. When I insert the module I get the following error:
insmod: ERROR: could not insert module npreal2.mod: Key was rejected by service
From other posts I concluded it was related to UEFI/secure boot. So I disabled secure boot and then insmod reports:
insmod: ERROR: could not insert module npreal2.mod: Invalid module format
I tried recompiling with secure mode off then insmod worked, but I then have to leave secure boot disabled. How can I make this module work with secure boot?
There is a post on github about creating your own MOK keys, but that seems to be DKMS specific.
|
Now (after a discussion in the comments) that you have a working but unsigned npreal2.ko kernel module, we can try tackling Secure Boot.
First, you need to create a X.509 key pair (a public key and a corresponding secret key) to use as a MOK. To do that, first create a minimal OpenSSL configuration file, as e.g. ~/x509.genkey:
[ req ]
default_bits = 4096
distinguished_name = req_distinguished_name
prompt = no
x509_extensions = myexts
[ req_distinguished_name ]
O = ModuleType
CN = ModuleType module signing key
[ myexts ]
basicConstraints=critical,CA:FALSE
keyUsage=digitalSignature
subjectKeyIdentifier=hash
authorityKeyIdentifier=keyid
The CN = line defines the name your MOK is primarily identifiable with, so type whatever you want in there. The O = line would be the place for the name of your organization, but you can omit the entire line if you wish.
Now you can generate your key pair:
openssl req -x509 -new -nodes -utf8 -sha256 -days 36500 \
-batch -config x509.genkey -outform DER \
-out signing_key.x509 \
-keyout signing_key.priv
This command creates a key pair that is nominally valid for 10 years from the time of creation; if you want to change that, change the -days parameter.
Now you should have two files:
signing_key.x509 is the public key, which you will register as your MOK (Machine Owner's Key)
signing_key.priv is the corresponding private key, which you will need to sign any kernel modules you build yourself. This private key is not passphrase-protected, so keep it secure.
To enroll signing_key.x509 as the MOK, make sure that the mokutil package has been installed, and then run:
sudo mokutil --import signing_key.x509
This command will ask you to set a one-time password for the key enrollment process. Once you do that, the first phase of the MOK enrollment is done. To complete the MOK enrollment, you'll need to reboot.
When you reboot, the shimx64.efi will detect that you have initiated a MOK enrollment process, and will display a blue screen with a simple text-based menu, with options to either Enroll MOK or Continue boot.
Select Enroll MOK to begin the second phase of the MOK enrollment. It will then give you a chance to view the hash and the CN = line of the key you're about to enroll, then a yes/no confirmation, and finally the one-time password you set in the first enrollment phase above. If the enrollment is successful, that password should never be needed again. Select "Reboot" in the blue-screen menu to go back to Linux.
(The second phase of the enrollment process happens during reboot to ensure that only someone with physical-equivalent access to the system will be able to complete the process, and the password ensures that the key you're enrolling is the one you selected in the first phase, and not one inserted by some malware.)
To verify that the key enrollment was successful, you can run sudo keyctl list %:.platform as root: it should display all Secure Boot keys the system recognizes, including your MOK, the distribution's key embedded in the shimx64.efi, and the manufacturer's and Microsoft's keys from the firmware.
Alternatively, you can run sudo mokutil -l for a more verbose listing of the distribution's key and your MOK.
Now you are ready for signing your kernel module:
/usr/src/kernels/$(uname -r)/scripts/sign-file sha256 \
~/signing_key.priv \
~/signing_key.x509 \
/some/where/npreal2.ko # adjust the paths as needed
To confirm signing, run sudo modinfo ./npreal2.ko: it should include a signer: line with the CN = name of your MOK, and a long signature: block with hexadecimal numbers.
And of course, now you should be able to load the module with sudo insmod npreal2.ko with Secure Boot enabled!
Source: https://www.redhat.com/sysadmin/secure-boot-systemtap
| Insmod causes key rejected by service |
1,432,290,488,000 |
I need to install a .deb package on a raspberryPi that doesn't have connectivity. When I try to install such package using:
sudo dpkg -i <name>.deb
I get the error:
dpkg: dependency problems prevent configuration of rtl8192eu-dkms:
rtl8192eu-dkms depends on dkms (>= 1.95); however:
package dkms is not installed.
dpkg: error processing package rtl8192eu-dkms (--install)
dependency problems - leaving unconfigured
errors were encountered while processing:
rtl8192eu-dkms
I do have another windows machine that I could download files from, but where do I get those files?
|
You must install dkms and all its dependencies at the same time or before installing rtl8192eu-dkms. For example: dpkg -i rtl8192eu-dkms.deb dkms.deb or dpkg -i dkms.deb && dpkg -i rtl8192eu-dkms.deb.
| Raspbian/Debian - Install .deb offline |
1,432,290,488,000 |
I'm trying to install a Windows7 guest on a Linux host with Virtual box. I've set my guest up but when I hit start, I keep getting the message:
Kernel driver not installed (rc=-1908)
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Please reinstall the kernel module by executing
'/etc/init.d/vboxdrv setup'
as root. If it is available in your distribution, you should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.
I've ran/etc/init.d/vboxdrv setup n the shell but nothing happens and the error keeps popping up, how can I get this resolved?
Oh yeah, and I've installed dkms already:
# apt-get install dkms
EDIT 1
# modprobe vboxdrv
modprobe: FATAL: Module vboxdrv not found.
EDIT 2
There's virtualbox-guest-dkms and virtualbox-dkms and I have them both installed but I still get the same error...
|
Remember to use sudo. Run it like this and it will work:
sudo apt-get install dkms
sudo su
/etc/init.d/vboxdrv setup
see if it works now.
I am trying to use it too. I had the same problem.
I did the following in the terminal:
sudo su
I don't have a virtual machine yet, but this problem/error is solved for me after doing this.
| virtualbox keeps showing error "Kernel driver not installed" |
1,432,290,488,000 |
My OS:
uname -a
Linux debian 5.10.0-0.bpo.5-amd64 #1 SMP Debian 5.10.24-1~bpo10+1 (2021-03-29) x86_64 GNU/Linux
Something is wrong with my r8168-dkms; every time I install some other package, this appears at the end of the output:
Setting up r8168-dkms (8.046.00-1) ...
Removing old r8168-8.046.00 DKMS files...
------------------------------
Deleting module version: 8.046.00
completely from the DKMS tree.
------------------------------
Done.
Loading new r8168-8.046.00 DKMS files...
Building for 5.10.0-0.bpo.5-amd64
Building initial module for 5.10.0-0.bpo.5-amd64
Error! Bad return status for module build on kernel: 5.10.0-0.bpo.5-amd64 (x86_64)
Consult /var/lib/dkms/r8168/8.046.00/build/make.log for more information.
dpkg: error processing package r8168-dkms (--configure):
installed r8168-dkms package post-installation script subprocess returned error exit status 10
Processing triggers for man-db (2.8.5-2) ...
Errors were encountered while processing:
r8168-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
How to fix the issue?
|
You can install the newer r8168-dkms (8.048.03-1~bpo10+1) package
from backports which compiles fine on my system (same kernel version).
If not already done, add the following line to your /etc/apt/sources.list
deb http://deb.debian.org/debian buster-backports main contrib non-free
to enable the backports repository.
Then run
sudo apt update
sudo apt -t buster-backports install r8168-dkms
to install the package.
Related: bugs.debian.org/cgi-bin/bugreport.cgi?bug=960091
| How to set up r8168-kms? |
1,432,290,488,000 |
I am trying to install wireless drivers on my Dell Studio 1555 (as per these instructions).
In order to install the drivers the guide asks me to install dkms, which I did by running
sudo apt-get install dkms
Afterwards, the instructions say to enable the service by running sudo systemctl enable dkms. However, when I run this command, I get the following:
Failed to execute operation: No such file or directory
I have tried rebooting, with no change. What am I doing wrong?
Running systemctl status dkms.service produced the following output:
user@debian:~$ sudo systemctl status dkms.service
[sudo] password for user:
● dkms.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
|
What am I doing wrong?
You're mixing operating systems.
You're following instructions written for Arch Linux on Debian Linux. Debian Linux packages dkms in a very different way to Arch Linux. Arch Linux uses a systemd service unit to load/unload DKMS kernel modules. Debian Linux uses modprobe.d files.
Use the doco of the operating system that you are actually using.
Further reading
bcm43xx. Debian wiki.
wl. Debian wiki.
| systemctl: Failed to execute operation: No such file or directory |
1,432,290,488,000 |
I am on Linux Mint 18.1 Cinnamon 64-bit.
DKMS seems to be stuck while installing new kernel for 30 minutes now, what shall I do?
Kill the DKMS process? And then run dpkg --configure -a?
Here is the mintupdate log:
(Reading database ... 317520 files and directories currently installed.)
Preparing to unpack .../adobe-flashplugin_1%3a20170110.1-0ubuntu0.16.04.1_amd64.deb ...
Unpacking adobe-flashplugin (1:20170110.1-0ubuntu0.16.04.1) over (1:20161213.1-0ubuntu0.16.04.1) ...
Preparing to unpack .../libwebkit2gtk-4.0-37_2.14.2-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libwebkit2gtk-4.0-37:amd64 (2.14.2-0ubuntu0.16.04.1) over (2.12.5-0ubuntu0.16.04.1) ...
Preparing to unpack .../libjavascriptcoregtk-4.0-18_2.14.2-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libjavascriptcoregtk-4.0-18:amd64 (2.14.2-0ubuntu0.16.04.1) over (2.12.5-0ubuntu0.16.04.1) ...
Preparing to unpack .../gir1.2-webkit2-4.0_2.14.2-0ubuntu0.16.04.1_amd64.deb ...
Unpacking gir1.2-webkit2-4.0:amd64 (2.14.2-0ubuntu0.16.04.1) over (2.12.5-0ubuntu0.16.04.1) ...
Preparing to unpack .../gir1.2-javascriptcoregtk-4.0_2.14.2-0ubuntu0.16.04.1_amd64.deb ...
Unpacking gir1.2-javascriptcoregtk-4.0:amd64 (2.14.2-0ubuntu0.16.04.1) over (2.12.5-0ubuntu0.16.04.1) ...
Selecting previously unselected package linux-headers-4.4.0-59.
Preparing to unpack .../linux-headers-4.4.0-59_4.4.0-59.80_all.deb ...
Unpacking linux-headers-4.4.0-59 (4.4.0-59.80) ...
Selecting previously unselected package linux-headers-4.4.0-59-generic.
Preparing to unpack .../linux-headers-4.4.0-59-generic_4.4.0-59.80_amd64.deb ...
Unpacking linux-headers-4.4.0-59-generic (4.4.0-59.80) ...
Selecting previously unselected package linux-image-4.4.0-59-generic.
Preparing to unpack .../linux-image-4.4.0-59-generic_4.4.0-59.80_amd64.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic
Done.
Unpacking linux-image-4.4.0-59-generic (4.4.0-59.80) ...
Selecting previously unselected package linux-image-extra-4.4.0-59-generic.
Preparing to unpack .../linux-image-extra-4.4.0-59-generic_4.4.0-59.80_amd64.deb ...
Unpacking linux-image-extra-4.4.0-59-generic (4.4.0-59.80) ...
Preparing to unpack .../linux-libc-dev_4.4.0-59.80_amd64.deb ...
Unpacking linux-libc-dev:amd64 (4.4.0-59.80) over (4.4.0-57.78) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for mintsystem (8.3.0) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Setting up adobe-flashplugin (1:20170110.1-0ubuntu0.16.04.1) ...
update-alternatives: using /usr/lib/adobe-flashplugin/libflashplayer.so to provide /usr/lib/mozilla/plugins/flashplugin-alternative.so (mozilla-flashplugin) in auto mode
Setting up libjavascriptcoregtk-4.0-18:amd64 (2.14.2-0ubuntu0.16.04.1) ...
Setting up libwebkit2gtk-4.0-37:amd64 (2.14.2-0ubuntu0.16.04.1) ...
Setting up gir1.2-javascriptcoregtk-4.0:amd64 (2.14.2-0ubuntu0.16.04.1) ...
Setting up gir1.2-webkit2-4.0:amd64 (2.14.2-0ubuntu0.16.04.1) ...
Setting up linux-headers-4.4.0-59 (4.4.0-59.80) ...
Setting up linux-headers-4.4.0-59-generic (4.4.0-59.80) ...
Examining /etc/kernel/header_postinst.d.
run-parts: executing /etc/kernel/header_postinst.d/dkms 4.4.0-59-generic /boot/vmlinuz-4.4.0-59-generic
And here are dkms processes:
ps aux | grep dkms
root 13671 0.0 0.0 10124 2268 pts/1 S+ 11:54 0:00 /bin/sh /usr/lib/dkms/dkms_autoinstaller start 4.4.0-59-generic
root 13677 0.0 0.0 18540 5840 pts/1 S+ 11:54 0:00 /bin/bash /usr/sbin/dkms autoinstall --kernelver 4.4.0-59-generic
root 16419 0.0 0.0 18580 5636 pts/1 S+ 11:55 0:00 /bin/bash /usr/sbin/dkms autoinstall --kernelver 4.4.0-59-generic
root 16807 0.0 0.0 18600 4956 pts/1 S+ 11:55 0:00 /bin/bash /usr/sbin/dkms autoinstall --kernelver 4.4.0-59-generic
root 16813 0.0 0.0 10124 1904 pts/1 S+ 11:55 0:00 /bin/sh -c make "CC=cc" KBUILD_VERBOSE= -C /lib/modules/4.4.0-59-generic/build M=/var/lib/dkms/nvidia-375/375.26/build ARCH=x86_64 NV_KERNEL_SOURCES=/lib/modules/4.4.0-59-generic/build NV_KERNEL_OUTPUT=/lib/modules/4.4.0-59-generic/build NV_KERNEL_MODULES="nvidia nvidia-uvm nvidia-modeset nvidia-drm" INSTALL_MOD_DIR=kernel/drivers/video modules
root 16814 0.0 0.0 14296 3828 pts/1 S+ 11:55 0:00 make CC=cc KBUILD_VERBOSE= -C /lib/modules/4.4.0-59-generic/build M=/var/lib/dkms/nvidia-375/375.26/build ARCH=x86_64 NV_KERNEL_SOURCES=/lib/modules/4.4.0-59-generic/build NV_KERNEL_OUTPUT=/lib/modules/4.4.0-59-generic/build NV_KERNEL_MODULES=nvidia nvidia-uvm nvidia-modeset nvidia-drm INSTALL_MOD_DIR=kernel/drivers/video modules
root 17124 0.0 0.0 15272 4776 pts/1 S+ 11:55 0:00 make -f ./scripts/Makefile.build obj=/var/lib/dkms/nvidia-375/375.26/build
vlastim+ 17701 0.0 0.0 15720 2132 pts/2 S+ 12:08 0:00 grep --color=auto dkms
I have noticed it is probably caused by the Nvidia driver, but both the driver and kernel worked together flawlessly until today's update.
How do I revert this update?
EDIT1:
uname -r
currently is:
4.4.0-57-generic
The result of:
ls -la /lib/modules/`uname -r`/updates
currently is:
drwxr-xr-x 2 root root 4096 Dec 20 21:42 .
drwxr-xr-x 7 root root 4096 Jan 5 05:23 ..
-rw-r--r-- 1 root root 482872 Dec 20 21:42 ndiswrapper.ko
EDIT2:
The result of:
ls -la /var/lib/dkms
currently is:
drwxr-xr-x 5 root root 4096 Jan 5 05:22 .
drwxr-xr-x 96 root root 4096 Jan 6 06:38 ..
drwxr-xr-x 3 root root 4096 Jan 11 13:51 bbswitch
-rw-r--r-- 1 root root 6 Jul 8 2008 dkms_dbversion
drwxr-xr-x 3 root root 4096 Jan 11 13:52 ndiswrapper
drwxr-xr-x 3 root root 4096 Jan 5 05:23 nvidia-375
1.: it is a laptop
2.: wifi card is available but currently unused
|
First you need to get rid of all those DKMS processes:
ps aux | grep dkms
This will show you what DKMS related processes are running.
Don't kill those recklessly, you need to identify this process or all such processes:
make -f ./scripts/Makefile.build obj=/var/lib/dkms/nvidia-375/375.26/build
The reason being if you kill e.g. this process:
/bin/bash /usr/sbin/dkms autoinstall --kernelver 4.4.0-59-generic
You will have more DKMS processes than before, they will auto respawn.
Once you have identified the process ID(s) you need to get rid of, proceed with caution, let's try out soft and even softer kill first, for the sake of this example, I use 17124 process ID:
sudo kill -HUP 17124
If it does not help, try:
sudo kill -TERM 17124
And if that does not kill it, you may finally use:
sudo kill -KILL 17124
Now you need to remove the lock files:
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
If that is acceptable for you, you may remove the Nvidia driver:
sudo apt-get remove nvidia-375
Now finish up the system's updates, which were interrupted:
sudo dpkg --configure -a
sudo apt-get install --fix-broken
Run the Mint's updater:
sudo mintupdate
Open up menu View -> Linux kernels.
Remove the improperly installed kernel.
You may close the kernels' window.
If everything went smoothly, you may reboot:
sudo reboot
| DKMS stuck while installing new kernel, what shall I do? |
1,432,290,488,000 |
I'm using Debian "testing".
At my work we have a Novell network and we are "forced" to use ncpfs. With kernel 4.18 this module/driver was removed from kernel.
Can someone explain how to re-add this module/driver? Maybe by using DKMS?
|
My co-worker built a RPM and I edited it for use with Debian and DKMS. If you need it, feel free to clone it here. It's also available as stand-alone-module here.
| Re-add ncpfs module to linux kernel 4.18, with Debian |
1,432,290,488,000 |
I'm in PopOS. If I try to install any of 5.8.* new kernels, an error shows up: "ERROR (dkms apport): kernel package linux-headers-5.8.-generic is not supported". I have this problem with ALL the 5.8. versions, and I can't use Virtualbox with these versions of kernels. How could I fix?
|
You will need minimum version 6.1.14 of VirtualBox to run on Kernel 5.8
you are right thanks. if I may ask you... how did you find this? what did you search on google? in general, if I encouter a bug, what can I do in order to find news by myself instead of asking here?
In my case it was experience, I already seen reports of people where virtual box didn't run after the kernel 5.8 release few weeks ago
Actually this isn't the first time, "out-of-tree"/external kernel modules like Virtual Box or VMWare break constantly with bigger kernel changes but their developer are really slow on pushing updates to fix that
Anyway I found the informations about it after searching either "virtualbox kernel 5.8" or "virtualbox-dkms kernel 5.8" (here is the bug report from above) on DuckDuckGo
| If I try to install any of 5.8.* new kernels, an error shows up: "ERROR (dkms apport): kernel package linux-headers-5.8.*-generic is not supported" |
1,432,290,488,000 |
I am trying to install DKMS on a Linux system that I made from the Linux from Scratch and Beyond Linux from Scratch books. I've found the package source from here but absolutely no info as to how to install them. There's no configure file in the tar ball and the Makefile seems to expect either Debian or RPM, which I don't have. Any help would be greatly appreciated. Thanks
|
Ok...so there's only one change to be made. This can be done in two ways:
Rename the directory in which the tarball is extracted as dkms instead of dkms-2.2.x.x. The Makefile expects that the tarball is unpacked in a directory called dkms.
Change the Makefile using the below sed:
sed "s@\.\./\$\(RELEASE_NAME\) @\.\.\/\$\(RELEASE_STRING\) @" -i Makefile
Go with option 1 though. Much easier and safer.
After that DKMS can be installed using:
make tarball
sudo make install
sudo make install-doc
| Install DKMS on self-made Linux system |
1,432,290,488,000 |
I use the rtl8812au driver for my wifi adapter. I have dkms setup so that after each kernel upgrade, it gets compiled. Here are the commands I ran to set that up:
DRV_NAME=rtl8812AU
DRV_VERSION=4.3.14
mkdir /usr/src/${DRV_NAME}-${DRV_VERSION}
git archive driver-${DRV_VERSION} | tar -x -C /usr/src/${DRV_NAME}-${DRV_VERSION}
dkms add -m ${DRV_NAME} -v ${DRV_VERSION}
dkms build -m ${DRV_NAME} -v ${DRV_VERSION}
dkms install -m ${DRV_NAME} -v ${DRV_VERSION}
Now, after each reboot, my wifi adapter is disabled and to get it working again, I have to go back to the source directory of rtl8812au driver (I go to the original dir, not the dkms-made one), ensure that make has been run for this kernel, and run insmod 8812au.ko. At this point, my adapter fires up and works until the next boot.
How to fix dkms for this driver?
|
cat /usr/src/8812au-4.3.14/dkms.conf
PACKAGE_NAME="rtl8812AU"
PACKAGE_VERSION="#MODULE_VERSION#"
BUILT_MODULE_NAME[0]="8812au"
MAKE="'make'"
CLEAN="'make' clean"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="YES"
But I use git clone. And I rename /usr/src/rtl8812AU to /usr/src/8812au-4.3.14/
sudo dkms add -m 8812au -v 4.3.14
sudo dkms install -m 8812au -v 4.3.14
sudo depmod -a
sudo update-initramfs -u -k $(uname -r)
The drivername is 8812au not rtl8812AU. You need depmod -a because modinfo 8812au | grep dep
depends: cfg80211
The modul needs another modul as dependency.
| Have to run insmod for rtl8812au after each boot |
1,432,290,488,000 |
My apt install id3v2 fails due to
dkms: running auto installation service for kernel 6.1.0-18-amd64.
with
dpkg: error processing package linux-headers-amd64 (--configure):
dependency problems - leaving unconfigured
Processing triggers for man-db (2.11.2-2) ...
Errors were encountered while processing:
linux-image-6.1.0-18-amd64
linux-headers-6.1.0-18-amd64
linux-image-amd64
linux-headers-amd64
I've tried apt-mark hold linux-image-amd64 and have two holds
$ apt-mark showhold
linux-headers-amd64
linux-image-amd64
I am running 6.1.0-17-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.69-1 (2023-12-30) x86_64 GNU/Linux
|
A package hold doesn’t prevent packages which are already installed from being processed:
hold is used to mark a package as held back, which will prevent the package from being automatically installed,
upgraded or removed
In your case, linux-image-6.1.0-18-amd64 is already installed (at least partially), and it’s its configuration which tries to run dkms and fails.
Since you’re still running 6.1.0-17, the simplest solution for now is to remove 6.1.0-18:
sudo apt purge linux-image-6.1.0-18-amd64
(which will also remove linux-image-amd64).
Once the failing dkms module is fixed, you’ll have to install linux-image-amd64 again to upgrade your kernel.
If the failure is caused by NVIDIA drivers, that problem has already been fixed; you should upgrade the drivers instead of removing the kernel.
| Why is apt-mark hold not stopping dkms from running on Debian? |
1,432,290,488,000 |
I am tring to install nvidia driver by the following command.
sudo ./NVIDIA-Linux-x86_64-418.43.run --dkms -s
Here I got an error as follows.
ERROR: Failed to run `/sbin/dkms build -m nvidia -v 418.43 -k 3.10.0-1062.el7.x86_64`: Error! echo
Your kernel headers for kernel 3.10.0-1062.el7.x86_64 cannot be found at
/lib/modules/3.10.0-1062.el7.x86_64/build or /lib/modules/3.10.0-1062.el7.x86_64/source.
You can use the --kernelsourcedir option to tell DKMS where it's located.
ERROR: Failed to install the kernel module through DKMS. No kernel module was installed; please try installing again without DKMS, or check the DKMS logs for more
information.
However, /lib/modules/3.10.0-1062.el7.x86_64/build and /lib/modules/3.10.0-1062.el7.x86_64/source are both in my /lib/modules path.
# cd /lib/modules/3.10.0-1062.el7.x86_64
# ls -la
lrwxrwxrwx. 1 root root 39 7月 2 11:11 build -> /usr/src/kernels/3.10.0-1062.el7.x86_64
lrwxrwxrwx. 1 root root 5 7月 2 11:11 source -> build
I have tried sudo yum install "kernel-devel-uname-r == $(uname -r)" in a similar question which doesn't work, it said
No package kernel-devel-uname-r == 3.10.0-1062.el7.x86_64 available
This is my output of uname -r
3.10.0-1062.el7.x86_64
And this is the kernel related packages
kernel.x86_64 3.10.0-1062.el7
kernel.x86_64 3.10.0-1160.31.1.el7
kernel-devel.x86_64 3.10.0-1160.31.1.el7
kernel-headers.x86_64 3.10.0-1160.31.1.el7
How can I solve this?
|
The simplest option would appear to be a reboot, so that the running kernel matches the installed headers (1160.31.1).
Otherwise you’d have to find the header package for your older kernel (1062).
| Your kernel headers for kernel 3.10.0-1062.el7.x86_64 cannot be found |
1,432,290,488,000 |
I'm using Debian 12 Bookworm, and currently, when I run uname -a, it shows:
Linux pctxd 6.1.0-20-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.85-1 (2024-04-11) x86_64 GNU/Linux
The package linux-image-6.1.0-21-amd64 and related packages are ready to install. However, the corresponding linux-headers-6.1.0-21-amd64 package is not available. Without these headers, the Nvidia drivers can't be compiled, rendering the graphical user interface non-functional—something I learned the hard way during the last upgrade to 6.1.85-1.
Running aptitude show yields:
Package: linux-image-6.1.0-21-amd64
Version: 6.1.90-1
New: yes
State: not installed
Priority: optional
Section: kernel
Maintainer: Debian Kernel Team <[email protected]>
Architecture: amd64
Uncompressed Size: 408 M
Depends: kmod, linux-base (>= 4.3~), initramfs-tools (>= 0.120+deb8u2) | linux-initramfs-tool
Recommends: firmware-linux-free, apparmor
Suggests: linux-doc-6.1, debian-kernel-handbook, grub-pc | grub-efi-amd64 | extlinux
Conflicts: linux-image-6.1.0-21-amd64-unsigned
Breaks: fwupdate (< 12-7), initramfs-tools (< 0.120+deb8u2), wireless-regdb (< 2019.06.03-1~)
Replaces: linux-image-6.1.0-21-amd64-unsigned
Provides: $kernel (= 6.1.90-1)
Just now, web page Package: linux-headers-6.1.0-21-amd64 seems to describe the missing package, but clicking the “list of files” button results in a error page with the information “No such package in this suite on this architecture.”
Currently, there is another Security update (regarding libglib2.0) waiting. So, the time lag between the kernel security update and the linux header files necessary for my graphic UI is a increasing risk.
For future updates: Is there a way to automatically defer the kernel update until the linux-headers package is available but process the security updates of other packages?
|
The kernel image and headers packages come from the same source package, so they are available simultaneously on the mirror network (barring failures on a specific mirror). If you follow the amd64 link on the linux-headers-6.1.0-21-amd64 package page, you’ll find a package download link which works; that’s the package which apt will download. Examining the package pool shows that all the amd64 packages for 6.1.90-1 were uploaded at the same time, 2024-05-03 21:54.
The package file list is unfortunately not particularly reliable for packages which aren’t in the main archive — the latest Debian 12 kernel package was published in the security archive.
Given the many different scenarios around kernel image and headers package, it isn’t possible to introduce dependencies between them such that one could guarantee that an image package is only installed if its matching headers package is also installed. In any case that still wouldn’t ensure smooth updates for NVIDIA users — what matters there is whether the NVIDIA module is successfully built, and that can fail with matching kernel packages.
| How to defer kernel updates until the corresponding "linux-headers" package is available? |
1,384,098,124,000 |
I want to copy my c directory with all subdirectories excluding ./git subdirectory. I do it using rsync :
echo "copy c and sh files "
rsync -a --include='*.c' --include='*.sh' --include='*/' --exclude='*' ~/c/ ~/Dropbox/Public/c
# remove .git directory = do not send it to dropbox. Thx to Tomasz Sowa
rm -rf ~/Dropbox/Public/c/.git
Can I do it better?
|
Just add an explicit exclude for .git:
rsync -a --exclude='.git/' --include='*.c' --include='*.sh' --include='*/' --exclude='*' ~/c/ ~/Dropbox/Public/c
Another option is to create ~/.cvsignore containing the following line along with any other directories you'd like to exclude:
.git/
| How to use rsync to backup a directory without git subdirectory |
1,384,098,124,000 |
I'm using Debian 6 and Dropbox. I followed these commands to install it.
When I run ~/.dropbox-dist/dropboxd — Dropbox works and stuff. Problem is that when I close terminal or, even worse — reboot, Dropbox stops working and I need to run that daemon again.
How can I have the computer automatically start that daemon in the background?
|
If you're running the daemon from your own account, start it at boot time with Cron. Run crontab -e to edit your crontab file and add the line
@reboot ~/.dropbox-dist/dropboxd
| How to run Dropbox daemon in background? |
1,384,098,124,000 |
I've been struggling with this for a couple days so I'm hoping someone on SE can help me.
I've downloaded a large file from Dropbox using wget (following command)
wget -O folder.zip https://www.dropbox.com/sh/.../.../dropboxfolder?dl=1
I'm sure it's a zip because 1), file dropboxfolder.zip yields
dropboxfolder.zip: Zip archive data, at least v2.0 to extract, and 2) the download and extraction works find on my Windows machine.
When I try to unzip to the current directory using unzip dropboxfolder.zip, on Linux, I get the following output:
warning: stripped absolute path spec from /
mapname: conversion of failed
creating: subdir1/
creatingL subdir2/
extracting: subdir1/file1.tif
error: invalid zip file with overlapped components (possible zip bomb)
I'm unsure what the issue is, since as I said it works fine on Windows. Since the zip is rather large (~19GB) I would like to avoid transferring it bit by bit, so I would be very thankful for any help. I've run unzip -t but it gives the same error. When listing all the elements in the archive it shows everything as it should be. Could it be an issue with the file being a tif file?
|
I had the exact same issue with dropbox, wget and zip.
I used an alternative compressing tool and extracted the file with:
7z e file.zip
| Unzip thinks my zip file is a zip bomb |
1,384,098,124,000 |
I mounted Box.com cloud storage using davfs according to these instructions. I mounted my Box.com account under /home/me/Cloud/Box
I can access the mounted filesystem via Dolphin as well as via the terminal. It is a little slow, but I can list (ls) and navigate the entire directory structure with no errors.
Next I attempted to run rsync as follows:
rsync -auvz --max-size=250M --exclude '.*' /home/me/Music/ /home/me/Cloud/Box/Music
I also tried:
rsync -auv /home/me/Music/A /home/me/Cloud/Box/Music
and other variations of rsync commands. The command is copying my Music from my local file system (/home/me/Music/) to the Box cloud (/home/me/Cloud/Box/Music) via the davfs mount.
I always get a lot of errors of this form:
rsync: mkstemp <filename> failed: Invalid argument (22)
A specific example is:
rsync: mkstemp "/home/me/Cloud/Box/Music/VariousArtists/.01_Track_1.mp3.YVmFI9" failed: Invalid argument (22)
This is all happening on Kubuntu 12.04 LTS 64 bit, server grade hardware, with a fast/reliable cable modem connection (12 Mb/s upload speeds).
|
The problem occurs because of rsync making temporary files with filenames that the box.com and/or davfs do not understand. Thus the file .01_Track_1.mp3.YVmFI9 does not exist on your system, but is a temporary artifact of rsync. Some guesswork from my side: if you don't get the error on all files, you probably only get the errors on files that were already uploaded (and changed).
It used to be impossible to switch off this temporary file generation, but you might nowadays have more luck by adding the option --inplace.
However the advantages of using rsync if you are not talking to a rsync-daemon (which you are not if you are using davfs), are unclear to me.
Therefore, as an alternative, you could try cp --update, which only copies a file when the source is newer than the destination. New files and any files with changes in ID3 tags will get copied, others will not.
Or if you need to have more control use find:
cd /home/me/Music/
find * -size -250M -print0 | cpio -pdmv0 /home/me/Cloud/Box/Music
this preserves the hierarchy structure and cpio does not overwrite existing files that are not older.
| rsync mkstemp failed Invalid argument (22) with davfs mount of Box.com cloud |
1,384,098,124,000 |
Running other desktop environments than Unity or Gnome with a different file manager than Nautilus, it might be a good idea to install Dropbox without Nautilus. But advice on Dropbox involves installing Nautilus too.
Nautilus has conflicts with some file managers, as it takes over the desktop (workspace) and the file manager integration of many programs.
In Xubuntu with Thunar this is a big problem. Also with Cinnamon and Nemo in Linux Mint Nautilus changed the desktop and took over integration with Firefox. But it seemed ok on Elementary OS. Fewer problems on Lubuntu too, if I am not mistaken.
I want to ask for other people's experience on installing Dropbox without Nautilus on various Linux systems and find if there's one single way to do it or system specific ways etc.
Trying to follow this advice on Linux Mint (sudo apt-get install dropbox python-gpgme) it had installed Nautilus already!
Update after answer on Linux Mint.
As I am already using other Linux distros and will in the future, I expect other solutions for a few other distros, DE, and file managers. I will also update my answer to add them if I can.
|
Installing the Dropbox deb files from the Dropbox website (Ubuntu or Debian, I have not tested others) will not install Nautilus, although gdebi says a Nautilus extension will be installed. Installing just Dropbox from Ubuntu sources in Synaptic or in terminal will neither install Nautilus. File manager integration is also provided in Synaptic (Ubuntu sources) with the packages nemo-dropbox and caja-dropbox, as well as with libnet-dropbox-api-perl.
After installing Dropbox with Nautilus (sudo apt-get install dropbox python-gpgme)
Un-installing Nautilus works without glitches but there is limited integration with the file manager at this point, maybe opening Dropbox folder from the tray icon, but without Dropbox features in the file manager (folder symbols and menu integration). Tested with Cinnamon and Nemo.
For Nemo/Cinnamon.
There is nemo-dropbox. "Nemo dropbox is an extension that integrates the dropbox web service with your cinnamon desktop. - installing this package will download the proprietary dropbox binary from dropbox.com."
That should mean that the simplest solution of installing Dropbox without Nautilus for Nemo file manager is to just install the extension nemo-dropbox: that will install Dropbox with Nemo integration. But that is limited to Nemo.
For Caja file manger: caja-dropbox.
"Caja dropbox is an extension that integrates the dropbox web service with your mate desktop. -- to use this package you need to install the proprietary dropbox package from https://www.dropbox.com/install."
So, you need to have Dropbox before installing this.
As far as I can tell, libnet-dropbox-api-perl is enough in order to have file manager integration (tested with Nemo without nemo-dropbox).
For Dolphin:
Based on this KDE-reddit post:
Install dolphin-plugins, then enable the Dropbox service under Configure Dolphin... > Services > Dropbox. This adds the option "Move to Dropbox" for non-dropbox-ed items; inside Dropbox folder it shows this
Among the numerous Dolphin service menus that are included in the KDE-Services package there is one that provides Dropbox options.
Check-marks on dropbox items may be absent with icon-sets lacking the proper files at ICONSET/emblems/scalable. Copying the files from a different icon-set will fix this problem.
| How to install Dropbox (and have Dropbox file manager integration) without Nautilus? |
1,384,098,124,000 |
I'm using Dropbox without the GUI in Linux. I would like to limit the upload rate, sometimes large files eats my internet bandwidth. Anyone knows how I do that?
|
You can start the Dropbox executable under trickle. This is a simple program that limits the bandwidth used by the program that it starts.
trickle -u 42 dropbox.py
| Control Dropbox upload rate on the command line |
1,384,098,124,000 |
I'm trying install dropbox on Debian with xfce and every time it ends with this error
bn.BUILD_KEY: Dropbox
bn.VERSION: 3.12.6
bn.DROPBOXEXT_VERSION: failed
bn.is_frozen: True
pid: 11257
ppid: 5898
ppid exe: '/bin/bash'
uid: 1000
user_info: pwd.struct_passwd(pw_name='honzik', pw_passwd='x', pw_uid=1000, pw_gid=1000, pw_gecos='Jan Schramhauser,,,', pw_dir='/home/honzik', pw_shell='/bin/bash')
effective_user_info: pwd.struct_passwd(pw_name='honzik', pw_passwd='x', pw_uid=1000, pw_gid=1000, pw_gecos='Jan Schramhauser,,,', pw_dir='/home/honzik', pw_shell='/bin/bash')
euid: 1000
gid: 1000
egid: 1000
group_info: grp.struct_group(gr_name='honzik', gr_passwd='x', gr_gid=1000, gr_mem=[])
effective_group_info: grp.struct_group(gr_name='honzik', gr_passwd='x', gr_gid=1000, gr_mem=[])
LD_LIBRARY_PATH: None
cwd: '/home/honzik/.dropbox-dist'
real_path='/home/honzik/.dropbox-dist'
mode=040755 uid=1000 gid=1000
parent mode=040755 uid=1000 gid=1000
HOME: u'/home/honzik'
appdata: u'/home/honzik/.dropbox/instance1'
real_path=u'/home/honzik/.dropbox/instance1'
mode=040700 uid=1000 gid=1000
parent mode=040700 uid=1000 gid=1000
dropbox_path: u'/home/honzik/Dropbox'
real_path=u'/home/honzik/Dropbox'
mode=040777 uid=1000 gid=1000
parent mode=040755 uid=1000 gid=1000
sys_executable: '/home/honzik/.dropbox-dist/dropbox-lnx.x86_64-3.12.6/dropbox'
real_path='/home/honzik/.dropbox-dist/dropbox-lnx.x86_64-3.12.6/dropbox'
mode=0100755 uid=1000 gid=1000
parent mode=040755 uid=1000 gid=1000
trace.__file__: '/home/honzik/.dropbox-dist/dropbox-lnx.x86_64-3.12.6/library.zip/dropbox/client/ui/common/boot_error.pyc'
real_path='/home/honzik/.dropbox-dist/dropbox-lnx.x86_64-3.12.6/library.zip/dropbox/client/ui/common/boot_error.pyc'
not found
parent not found
tempdir: '/tmp'
real_path='/tmp'
mode=041777 uid=0 gid=0
parent mode=040755 uid=0 gid=0
Traceback (most recent call last):
File "dropbox/client/main.py", line 4065, in main_startup
File "dropbox/client/main.py", line 1980, in run
File "ui/common/uikit.py", line 383, in create_ui_kit
File "dropbox/client/ui/qt/__init__.py", line 49, in <module>
File "dropbox/client/ui/qt/setup_wizard.py", line 29, in <module>
File "dropbox/client/ui/qt/xui.py", line 24, in <module>
File "PyQt5/QtWebKit.py", line 14, in <module>
ImportError: libxslt.so.1: cannot open shared object file: No such file or directory
Earlier I used gnome and Dropbox worked flawlessly. Does somebody know, what is missing? I don't understand this error. I did it according to instructions on Dropbox website.
|
The error message the OP posted shows libxslt.so.1 is missing, as in "libxslt.so.1: cannot open shared object file"
Using debian.packages.org or a system where this library is present shows the name of the package:
$ dpkg -S /usr/lib/x86_64-linux-gnu/libxslt.so.1
libxslt1.1:amd64: /usr/lib/x86_64-linux-gnu/libxslt.so.1
Knowing the name of package is lixslt1.1, the command to install it is:
sudo apt-get install libxslt1.1
After installing the XSLT library, it should be then enough to try again to install DropBox.
| Install dropbox ends in error |
1,384,098,124,000 |
I am trying to remove Dropbox from my computer. So far I have done the following:
sudo aptitude remove dropbox
sudo aptitude purge dropbox
But this didn't get rid of it 100%
oshiro@debian:~$ locate dropbox
/usr/share/nmap/scripts/broadcast-dropbox-listener.nse
/var/cache/apt/archives/dropbox_1.6.1_i386.deb
/var/lib/apt/lists/linux.dropbox.com_debian_dists_wheezy_Release
/var/lib/apt/lists/linux.dropbox.com_debian_dists_wheezy_Release.gpg
/var/lib/apt/lists/linux.dropbox.com_debian_dists_wheezy_main_binary-i386_Packages
oshiro@debian:~$
I know I can delete each of those manually, but wanted to know if that is the correct way of removing a .deb installed application?
|
You have already completely removed Dropbox from your computer, at least in ways that manifest themselves by a file whose name contains dropbox. You may have other traces of your use of Dropbox remaining, for example in your browser history. When it comes to file names, check Dropbox as well (locate -i dropbox will do it).
None of the files you list are caused by even a partial installation of Dropbox.
/usr/share/nmap/scripts/broadcast-dropbox-listener.nse is part of nmap. It's the component that allows nmap to recognize a Dropbox server on the machine that it's scanning. It is completely unrelated to your use of Dropbox.
/var/cache/apt/archives/dropbox_1.6.1_i386.deb is the Debian package file for Dropbox. It is in the cache of downloaded package files. You can remove it manually or call apt-get clean (or the corresponding command in another APT frontend) to empty the cache.
The files in /var/lib/apt/lists are available package sources from linux.dropbox.com. These lists are updated by apt-get update (or the corresponding command in another APT frontend). To get rid of this file (which you don't need any more if you aren't going to reinstall Dropbox), edit /etc/apt/sources.list or a file in /etc/apt/sources.list.d and remove the line(s) that mention linux.dropbox.com, then run apt-get update.
| How to remove Dropbox |
1,384,098,124,000 |
After installing the Dropbox DEB package from their site and starting the Dropbox daemon, the tray icon for Dropbox doesn't show up in the tray. I have verified that Dropbox is, in fact, running, but the icon still doesn't show up.
How can I get the tray icon working in Elementary OS Luna/Freya?
|
As of 2015/04/27, the Dropbox daemon looks for a couple of environment variables on startup to try and correctly display the tray icon. Since these environment variables aren't set by Elementary OS, Dropbox just gives up and doesn't try to display a tray icon.
To test this theory, stop the Dropbox daemon like so:
dropbox stop
Next, start it with these two environment variables set:
DROPBOX_USE_LIBAPPINDICATOR=1 XDG_CURRENT_DESKTOP=Unity \
dropbox start
Hooray, the tray icon is there!
To make this change permanent, you'll need to edit the autostart command for the Dropbox daemon. This desktop entry lives at $HOME/.config/autostart/dropbox.desktop. Since "Dropbox knows best™," the start command automatically regenerates this file, overwriting any changes you'd make there.
Therefore, copy it to $HOME/.config/autostart/dropbox-better.desktop. Next, create a script somewhere which will start Dropbox properly:
#!/bin/bash
# stop it if it's running
dropbox stop &>/dev/null
# start it properly
DROPBOX_USE_LIBAPPINDICATOR=1 XDG_CURRENT_DESKTOP=Unity \
dropbox start -i
Now open the dropbox-better.desktop file in your favorite text editor and modify it to this:
[Desktop Entry]
Name=Dropbox (Better)
GenericName=File Synchronizer
Comment=Sync your files across computers and to the web
Exec=/absolute/path/to/start-dropbox.sh
Terminal=false
Type=Application
Icon=dropbox
Categories=Network;FileTransfer;
StartupNotify=false
Log out and back in again to test that it's working, and you, like me, will finally have a Dropbox tray icon after something like 18 months without one!
| Dropbox tray icon doesn't show up in Elementary OS Luna/Freya? |
1,384,098,124,000 |
I want to create a backup of a single .tex file. I created the hard link to the file (which is not in Dropbox directory, lets say it is A) inside Dropbox directory. I did this so because I do not want to backup other auxiliary file created (eg. axu, .log, .bbl etc.) when compiling the tex file. I edit and compile the tex file in A. The changes are reflected when I see the file inside Dropbox directory. But its is not synced with the online folder. However, If I change the file (hard link) inside the Dropbox directory, it gets synced.
Please let me know what is the problem here. Please give the solution within what I am using and trying to do rather than proposing alternative solution for same task.
I am using Fedora 13.
|
Dropbox is probably using inotify or a variant thereof to watch for changes in the Dropbox directory. Because the change happens outside of the Dropbox directory, Dropbox doesn't see it.
To get the desired effect, you might be able to use symlinks instead of hard-links. I'm not sure if there's any special reason it needs to be a hard-link for your use case (edit and compile).
| Hardlinks in Dropbox not updated |
1,384,098,124,000 |
I have a machine (A) behind a firewall with no access to the Internet, on this machine I can NFS mount directories on another machine (B) which can access internet, and is accessible from Internet, but I cannot install anything on this machine (B).
I want to keep a directory on (A) in sync with my Dropbox (that I use on all my other machines (not A or B), all of them connect to Internet regularly).
The solution that I came up with is to have a cron job on (A), to call two rsync commands to sync a directory on (A) with an NFS mounted directory which is actually on (B).
Then I can have a cron job on some other machine on the Internet that syncs my Dropbox with the directory on (B).
Anyone can see any problems with this plan, or has a better suggestion?
Anything other unix utility besides cron and rsync?
|
You may be able to use Unison to synchronize your files. Unison uses the rsync protocol and can run over ssh. You may need to copy the executable into your directory on the remote system.
Using rsync may cause problems as it is difficult to synchronize file deletions.
EDIT: To sync a folder on A from system C (with working Drobox) a chosen directory on B becomes the hub and A and C two spokes. Schedule the steps so that only one is running at a time.
Schedule Unison on system C to sync to the directory on B.
Schedule Unison on system A to sync to the directory on B. (May require NFS mounting the directory.)
Periodically, check Unison for conflicts if automatic resolution wasn't configured.
There are other ways to handle this. If the directory on B is alway mounted when you need it, then you can skip this step. A symlink to an autofs NFS mount would handle this.
p.s. I was working with WinSCP today, and found it has a synchronize function. It appears to be useful for periodic use. Unison still seems better for automated updates.
| Using rsync + cron to sync a machine behind a firewall with my dropbox |
1,384,098,124,000 |
I'm trying to get dropbox symlinked to the relevant folders in /home. I'd like to symlink them like this:
~/Dropbox/Pictures --> ~/Pictures
~/Dropbox/Camera Uploads --> ~/Pictures/Camera Uploads
If I do that it will work but I'll have two copies of my pictures and videos stored on Dropbox. I don't want to waste space.
Any ideas on how to solve this problem?
|
Assuming you have root on the system, you can use a bind mount. Note that this will leave you with an empty Camera Uploads directory in your ~/Dropbox/Pictures, but avoiding that adds much more complexity (unionfs of some sort).
# mount --bind ~user/Dropbox/Pictures ~user/Pictures
# mkdir -p ~user/Pictures/Camera\ Uploads
# mount --bind ~user/Dropbox/Camera\ Uploads ~user/Pictures/Camera\ Uploads
You can put these bind mounts in /etc/fstab or run them through sudo, of course.
| Can I create a symlink that will ignore subdirectories? |
1,384,098,124,000 |
I am using Scientific Linux on my office computer and home laptop. I was usually signed in before I leave my office so when I made a change over SSH on my office computer, Dropbox would automatically sync the change.
But this time I rebooted my office computer using SSH with /sbin/reboot, and after signing in again it would no longer update Dropbox. I guess this is because Dropbox needs to be signed in once locally to continue syncing.
How can I set Dropbox syncing remotely over SSH on my office computer?
|
There is a dropbox command line tool that allows you to perform all sorts of tasks, including stopping and starting dropbox.
You could include a short snippet in your .profile or .bash_profile (depending on what you use), that checks if dropbox is already running, and if not, starts it:
~/bin/dropbox.py running
[ $? -eq 0 ] && ~/bin/dropbox.py start
| Getting Dropbox to sync over SSH |
1,384,098,124,000 |
How can i dump files from my CentOS box to Dropbox account? As regular nightly backup task.
|
0 1 * * * cp -a /tmp/files ~username/Dropbox/tmp_backups_$(date +%Y%m%d)
Breakdown: Every day at one am make an archive copy of /tmp/files into a folder with the date as part of the name in 'username's dropbox.
| How can i dump /tmp/files in CentOS to Dropbox using crontab? |
1,384,098,124,000 |
To keep multiple computers synced with dropbox I tried the following.
Approach A.
-Computer 1: Install dropbox, dropbox folder: /Dropbox/
-Computer 1: Create symbolic link in that folder to home folder
$ln -s /home/ /Dropbox/
-Computer 2: Install dropbox, dropbox folder: /Dropbox/ (got populated with files from computer 1
-Computer 2: Try to overwrite the files with symbolic links to identical local files
$ln -sfn /home/ /Dropbox/
ln: `/Dropbox/home': cannot overwrite directory
So that approach fails, does anyone have a suggestion to fix the error?
Or another approach? The approaches I have come up so far:
Approach B. I could write a script to recursively symlink all the files but I would rather not go that direction since then I would have to run that script in order to pickup on new files.
Approach C. Use rsync to sync between the home and dropbox folder. I would not like that since then it is not automatically updated, you would have to call rsync to do that. And putting rsync in a cronjob that runs each minute seems not like a ideal solution.
Can someone help me with fixing approach A or coming up with approach D or convincing me of approach B or C ?
|
I thought of a workaround for the problems with approach A:
-Computer 2: Pause syncing of dropbox by right-clicking on the notification icon and select 'pause syncing'
-Computer 2: Remove all files in your dropbox (optional move them to your home folder overwriting the local files, however in this scenario they are identical)
-Computer 2: Symlink like you did on computer 1, a link in the dropbox folder to the home folder:
$ln -s /home/ /Dropbox/
-Computer 2: Resume syncing of the dropbox daemon, since the symlinks point to the exact same files no syncing should happen.
I think this is a good solution because the home folder stays intact and dropbox does what it needs to do in another folder in the background. Not really straightforward though.
I also thought of approach A2 and will share it here as an alternative:
-Computer 2: remove the original files in your home folder and create a symlink in your home folder to the Dropbox files
Cons:
this causes all the icons in your home folder to have the link arrow on them
Now you have symlinks in your home folder instead of files, you have to be aware of this when you do file operations on them
| Syncing multiple home folders with dropbox and symlinks |
1,384,098,124,000 |
I'm looking for some software that would provide features like Dropbox.
Will a simple webdav be enough for this use case?
|
OwnCloud is supposed to be a self-hostable cloud solution, see its feature list. It indeed offers WebDAV access, but also a lot more.
While building your own solution using WebDAV is probably possible (and its sufficiency heavily depends on your requested features, as @cjm noted), I'd advise to also have a look at git-annex and especially keep an eye on git-annex assistant.
| Self hosted cloud storage |
1,384,098,124,000 |
I'm trying to get Dropbox not to autostart. The manual shows a command line option that should do the trick but it doesn't seem to work here (dropbox autostart n). Running dropbox autostart issues a note warning that it may only work on current Ubuntu distributions.
Questions
How can I get it not to start?
How should I proceed with the issue?
EDIT
After following some valuable tips, it seems every time I open dropbox, it adds itself to ~/.config/autostart list, which shows in the gnome-session-properties GUI. I wonder if there's a way to stop it. Perhaps not giving the process permissions on that folder?
|
In looking through the RPM that's available from the Dropbox website I only see the following content.
$ rpm -qpl nautilus-dropbox-1.6.0-1.fedora.x86_64.rpm |& \
grep -Ev "/icons/|.icon$|.png$|warning:"
/usr/bin/dropbox
/usr/lib64/nautilus/extensions-2.0/libnautilus-dropbox.so
/usr/lib64/nautilus/extensions-3.0/libnautilus-dropbox.so
/usr/share/applications/dropbox.desktop
/usr/share/man/man1/dropbox.1.gz
We can unroll the RPM to take a peak at the contents like so:
$ mkdir db_unroll
$ cd db_unroll
$ rpm2cpio ../nautilus-dropbox-1.6.0-1.fedora.x86_64.rpm | cpio -idmv
The only file that looks of interest is the .desktop file:
$ more usr/share/applications/dropbox.desktop
[Desktop Entry]
Name=Dropbox
GenericName=File Synchronizer
Comment=Sync your files across computers and to the web
Exec=dropbox start -i
Terminal=false
Type=Application
Icon=dropbox
Categories=Network;FileTransfer;
StartupNotify=false
So how can I stop it from starting?
You could use a modified version of the technique I outline in this other U&L Q&A titled: Update different dropbox instances, which shows how you can run the Dropbox dropboxd daemon for multiple dropbox instances. This same approach will work for a single instance and give you a more sanely behaving Dropbox instance.
Removing the RPM?
If nothing else works, I'd uninstall the RPM and install the binary distro instead. The download page has a section titled: "Install Dropbox via command line".
| Dropbox insists on autostarting - Fedora 20 |
1,384,098,124,000 |
I have a partition that contains all my personal stuff, which is mounted at boot under /home/myuser/foo. I would like to synchronize it on the cloud via Dropbox or Copy.com, but I don't trust them, so I have to encrypt the data in some way.
As I understood, it creates a "volume" when opened, and the data is clear only in ram, which is great. The problem is that this volume is seen as a single file by the Dropbox/Copy.com client, so when I change something, as little as a text file, it will attempt to upload again the whole encrypted "volume".
There is some way to encrypt my data and upload it in security?
|
Instead of encrypting a whole volume, which is the TrueCrypt, LUKS and loopback approach, you can also encrypt the individual files you store in the cloud. Doing that manually with pgp before copying the file to your cloud synchronized directory is one way, but a bit cumbersome.
EncFS may be a solution for you instead. It transparently encrypts files, using an arbitrary directory as storage for the encrypted files.
Two directories are involved in mounting an EncFS filesystem: the source directory, and the mountpoint. Each file in the mountpoint has a specific file in the source directory that corresponds to it. The file in the mountpoint provides the unencrypted view of the one in the source directory. Filenames are encrypted in the source directory.
| Dropbox/Copy.com & Truecrypt |
1,384,098,124,000 |
I am using dropbox on my redhat linux kernel. Right now we have a dummy user set up, with it's own dropbox account. Everyone can access and dump their files into it while on the machine and then everyone has access to the share folder, for when they are not on the machine. This is in no way optimal but no one wanted to give up any space on their own dropbox accounts and I am working with what I am given.
Right now, when I update my own dropbox account I use: ~/.dropbox-dist/dropboxd.
I do this only when I know that I have actually put something different in my folder. This really won't work for the dummy account because I don't know when it is updated and I can't trust anyone else to actually go through with it.
I REALLY don't want to have to log in as this dummy user everyday and update it.
My question is: Is there a way to automatically have dropbox update (i.e. I don't have to log in everyday, multiple times a day to make sure the dropbox is up to date)?
|
Why not setup multiple instances of dropbox? I have 2 dropbox accounts which I've setup like so:
$ ls -l ~/Dropbox
drwxrwxr-x 10 saml saml 4096 Nov 30 22:21 personal
drwxrwxr-x 10 saml saml 4096 Dec 7 15:49 work
Inside each of those directories is a Dropbox folder:
$ ls -l personal/ work/
personal/:
drwxrwxr-x 10 saml saml 4096 Nov 30 22:21 .
drwxrwxr-x 4 saml saml 4096 Dec 14 20:49 ..
drwx------ 3 saml saml 4096 Nov 30 22:20 .cache
drwxrwxr-x 19 saml saml 4096 Mar 19 11:30 .ccache
drwx------ 4 saml saml 4096 Nov 30 22:23 .config
drwx------ 3 saml saml 4096 May 15 11:00 .dropbox
drwx------ 17 saml saml 4096 May 8 22:13 Dropbox
drwx------ 3 saml saml 4096 Nov 30 22:21 .kde
drwxrwxr-x 3 saml saml 4096 Nov 30 22:20 .local
drwx------ 3 saml saml 4096 Nov 30 22:20 .pki
work/:
drwxrwxr-x 10 saml saml 4096 Dec 7 15:49 .
drwxrwxr-x 4 saml saml 4096 Dec 14 20:49 ..
drwx------ 3 saml saml 4096 Dec 7 15:49 .cache
drwxrwxr-x 18 saml saml 4096 Feb 5 10:03 .ccache
drwx------ 4 saml saml 4096 Dec 8 22:18 .config
drwx------ 3 saml saml 4096 May 8 22:13 .dropbox
drwx------ 5 saml saml 4096 May 8 22:13 Dropbox
drwx------ 3 saml saml 4096 Dec 7 15:49 .kde
drwxrwxr-x 3 saml saml 4096 Dec 7 15:49 .local
drwx------ 3 saml saml 4096 Dec 7 15:49 .pki
My content is inside the Dropbox folders for the 2 accounts. I then use this script to start up my dropbox applets.
#!/bin/bash
dropboxes="personal work"
for dropbox in $dropboxes
do
HOME="/home/$USER"
DROPHOME="$HOME/Dropbox"
if ! [ -d "$DROPHOME/$dropbox" ]
then
mkdir "$DROPHOME/$dropbox" 2> /dev/null
ln -s "$HOME/.Xauthority" "$DROPHOME/$dropbox/" 2> /dev/null
fi
HOME="$DROPHOME/$dropbox"
/home/$USER/.dropbox-dist/dropboxd 2> /dev/null &
done
This script is launched from the GNOME Startup Applications tool. The script is called dropbox.sh.
I setup the Startup Application so that it runs this command:
bash -c "sleep 60 && dropbox.sh"
This gives the network a minute to come up before starting Dropbox.
It's a little weird at first but you get used to seeing 2 dropbox icons in your taskbar.
| Update different dropbox instances |
1,384,098,124,000 |
I tried every solution from How to run Dropbox daemon in background? and nothing solves my problem:
Basically, I already installed dropbox on my Ubuntu 12.04LTS headless server. I got init.d setup but the problem is that right now I cannot restart the server (other users are using it actively).
So I am trying to start dropbox via SSH which works and dropbox starts to sync, but as soon as I disconnect from SSH dropbox stops runnning. I tried running it on a detached screen, using ($HOME/.dropbox-dist/dropboxd &)& and they all stop when I log out from SSH.
I tried doing service start but it seems not to work and I don't know why..?
$ sudo service dropbox start
[sudo] password:
Starting dropbox...
$ dropbox status
Dropbox isn't running!
I followed the instructions:
sudo chmod +x /etc/init.d/dropbox
sudo update-rc.d dropbox defaults
from http://www.dropboxwiki.com/tips-and-tricks/install-dropbox-in-an-entirely-text-based-linux-environment#debianubuntu and I got no error messages. Please help.
I don't care as much about starting the process at server restart, as long as I can launch dropbox via ssh and keep it runnning after i log out.
Thank you
UPDATE & ANSWER: thanks a lot for all your answers. Thanks to user Nixgrrrl's comment, I realize that it was because I was using ssh -X (the default on my system). As soon as I did normal ssh, trying the humble dropbox start & worked :)
|
thanks a lot for all your answers. Thanks to user Nixgrrrl's comment, I realize that it was because I was using ssh -X (the default on my system). As soon as I did normal ssh, trying the humble dropbox start & worked :)
| dropbox process stops when I log out of ssh |
1,384,098,124,000 |
I'm having issues with dropbox so I'd like to uninstall and reinstall it. To do so I need to remove ~/.dropbox-dist but no matter what I do it won't budge. If I run ls -l I get:
drwxr-xr-x 3 user user 4096 Nov 13 2014 .dropbox-dist
I have full permissions on the machine.
I have tried,
sudo rm -rf ~/.dropbox-dist
rm -rvf ~/.dropbox-dist
sudo su, rm -rf /home/user/.dropbox-dist
Removing from Nautilus
chmod 777 ~/.dropbox-dist
But the error is always the same, "Operation not permitted"
|
There are few things you could do here:
First check whether you have a Dropbox daemon running.
Check the attributes of the Dropbox folder using lsattr and if the folder is not editable, then change its attributes to editable using chattr.
UPDATE
As OP has reported in the comments, the .dropbox-dist folder contains i attribute which means the folder cannot be modified, deleted or renamed. Hence to change the attrubute, you should use chattr:
sudo chattr =e .dropbox-dist
| How to delete stubborn directory? |
1,384,098,124,000 |
I recently installed Dropbox on my computer running Debian 9.3. But it will not sync. When I mouse over the icon in the notification area of my toolbar, a message says...
Can't monitor Dropbox folder (Click to fix)
Can't access Dropbox folder
When I click the icon, the menu comes up, and I click "Can't monitor Dropbox folder (Click to fix)."
But when I do, a window pops up that says "Type your Linux password to let Dropbox make changes." It also asks if I'd like to save this password to my keyring. When I type my regular login password, the window says it is the incorrect password.
My designated Dropbox folder is on an HDD while Debian 9 is installed on an SSD.
How do I allow Dropbox program to access Dropbox folder?
|
Based on this AU Q&A titled: How do I fix a “Can't access Dropbox folder” error? it sounds like you could try these to see if they resolve your issue:
$ sudo sysctl fs.inotify.max_user_instances=256
$ sudo sysctl fs.inotify.max_user_watches=1048576
If you find this resolves it you can make these permanent. Add the following to this file:
$ cat /etc/sysctl.d/99-dropbox.conf
fs.inotify.max_user_watches = 1048576
fs.inotify.max_user_instances = 256
Then run this to pick up the changes:
$ sudo sysctl -p
| Can't monitor Dropbox folder |
1,384,098,124,000 |
My timeshift snapshots were taking up too much space on my laptop. Is it possible to move the snapshot from /home/timeshift to my dropbox folder to save space?
And then restore by moving the snapshot back into the /home/timeshift directory?
|
You never got a response, so here I am to save the day, two years later.
Nope. Timeshift seems to target partitions when looking for backup locations. Dropbox is a folder in your *nix partition. I'd just recommend getting an external hard drive or SSD for making future timeshift backups.
I wish they allowed backups to directories in partitions. That would be nice.
| Can I save timeshift snapshot to dropbox? |
1,384,098,124,000 |
I am experiencing some weird problems, when using dropbox on my Debian install:
I run Debian with testing repositories enabled
I have Dropbox installed from the website
My dropbox-location is on a shared partition that is formatted with NTFS
I mount the dropbox-location in my fstab with the following line:
UUID=662058B320588C45 /media/ntfs-data ntfs-3g uid=1000,gid=users 0 0
This provides me with read/write permissions on the drive - and as
long as I use a filemanager or console (or any other program) to
access the drive it works.
After setting up my dropbox to access the already existing location on this
drive it indexed nearly all files and then stopped with the message:
Downloading 38 files ...
I tried to check what is happening by attaching strace to the process which
yields the following results (this is an excerpt only, as the message keep on
appearing):
recvfrom(12, 0x33b3ae4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvfrom(12, 0x33b3ae4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=10, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}], 3, 0) = 0 (Timeout)
recvfrom(12, 0x33b3ae4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=10, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}], 3, 496) = 0 (Timeout)
futex(0x9ee784, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 49446674, {1372094398, 476504000}, ffffffff) = -1 EAGAIN (Resource temporarily unavailable)
futex(0x9ee804, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x9ee800, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x9ee840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x9ee7c0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x9ee784, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x9ee780, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x9ee7c0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x9ee784, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 49446680, {1372094398, 476765000}, ffffffff) = -1 EAGAIN (Resource temporarily unavailable)
futex(0x9ee804, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x9ee800, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x9ee840, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x9ee7c0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x9ee784, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x9ee780, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x9ee7c0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x9ee784, FUTEX_WAIT_BITSET_PRIVATE|FUTEX_CLOCK_REALTIME, 49446687, {1372094398, 477169000}, ffffffff) = -1 EAGAIN (Resource temporarily unavailable)
futex(0x9ee804, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x9ee800, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x9ee7c0, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x9ee784, FUTEX_WAKE_OP_PRIVATE, 1, 1, 0x9ee780, {FUTEX_OP_SET, 0, FUTEX_OP_CMP_GT, 1}) = 1
futex(0x9ee7c0, FUTEX_WAKE_PRIVATE, 1) = 1
recvfrom(12, 0x33b3ae4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=10, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}], 3, 0) = 0 (Timeout)
poll([{fd=12, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=12, revents=POLLOUT}])
writev(12, [{"5\30\4\0\26\10@\1[\0@\1\17\0\17\0=\0\4\0[\0@\1\0\0\0\0\17\0\17\0"..., 96}, {NULL, 0}, {"", 0}], 3) = 96
recvfrom(12, 0x33b3ae4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvfrom(12, 0x33b3ae4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=10, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}], 3, 0) = 0 (Timeout)
poll([{fd=12, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=12, revents=POLLOUT}])
writev(12, [{"$\30\1\0&\10\2\0\341\0\0\0", 12}, {NULL, 0}, {"", 0}], 3) = 12
poll([{fd=12, events=POLLIN}], 1, 4294967295) = 1 ([{fd=12, revents=POLLIN}])
recvfrom(12, "\1\1;U\0\0\0\0\341\0\0\0\177\0\300\0\246\5S\1\246\5S\1\24\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32
recvfrom(12, 0x33b3ae4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvfrom(12, 0x33b3ae4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=12, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=12, revents=POLLOUT}])
writev(12, [{"&\30\2\0\177\0\300\0", 8}, {NULL, 0}, {"", 0}], 3) = 8
poll([{fd=12, events=POLLIN}], 1, 4294967295) = 1 ([{fd=12, revents=POLLIN}])
recvfrom(12, "\1\1<U\0\0\0\0\341\0\0\0G\0`\2\246\5S\1\246\0*\1\24\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32
recvfrom(12, 0x33b3ae4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvfrom(12, 0x33b3ae4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=12, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=12, revents=POLLOUT}])
writev(12, [{"&\30\2\0G\0`\2", 8}, {NULL, 0}, {"", 0}], 3) = 8
poll([{fd=12, events=POLLIN}], 1, 4294967295) = 1 ([{fd=12, revents=POLLIN}])
recvfrom(12, "\1\1=U\0\0\0\0\341\0\0\0N\0`\2\246\5S\1\244\0*\1\24\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32
recvfrom(12, 0x33b3ae4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvfrom(12, 0x33b3ae4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=12, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=12, revents=POLLOUT}])
writev(12, [{"&\30\2\0N\0`\2", 8}, {NULL, 0}, {"", 0}], 3) = 8
poll([{fd=12, events=POLLIN}], 1, 4294967295) = 1 ([{fd=12, revents=POLLIN}])
recvfrom(12, "\1\1>U\0\0\0\0\341\0\0\0\0\0\0\0\246\5S\1\244\0\25\1\24\0\0\0\0\0\0\0", 4096, 0, NULL, NULL) = 32
recvfrom(12, 0x33b3ae4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvfrom(12, 0x33b3ae4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=12, events=POLLIN|POLLOUT}], 1, 4294967295) = 1 ([{fd=12, revents=POLLOUT}])
writev(12, [{"%\30\1\0", 4}, {NULL, 0}, {"", 0}], 3) = 4
recvfrom(12, 0x33b3ae4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
recvfrom(12, 0x33b3ae4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=10, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}], 3, 0) = 0 (Timeout)
recvfrom(12, 0x33b3ae4, 4096, 0, 0, 0) = -1 EAGAIN (Resource temporarily unavailable)
poll([{fd=10, events=POLLIN}, {fd=12, events=POLLIN}, {fd=13, events=POLLIN}], 3, 496 C-c C-c^C <unfinished ...>
Process 5687 detached
I already ran ntfsck:
sudo ntfsck /dev/sdb1
Unsupported: replay_log()
Unsupported: check_volume()
Checking 219648 MFT records.
Unsupported cases found.
Rebooting into Windows and running chkdsk did not solve the error neither.
Anybody has any idea what this is / how I can fix it?
|
TL;DR;
The solution that ultimately solved the problem was #4.
1. alternate /etc/fstab options
I've found a couple of people claiming that they're able to do what you're trying to do and did not see any mention of problems similar to yours. The only difference I could find was the /etc/fstab mount they were using. I'd try the following:
UUID=662058B320588C45 /media/ntfs-data ntfs-3g defaults 0 0
If that doesn't work I found this specifically, you'd have to adjust for your locale, but I don't see why you'd need it, to be honest:
UUID=662058B320588C45 /media/ntfs-data ntfs-3g defaults,locale=en_GB.UTF-8 0 0
2. $HOME/Dropbox as a link
Here's another method that I've seen used where instead of using the Dropbox folder from the NTFS partition directly, they're using a link created in $HOME/Dropbox which points to the Dropbox folder on the NTFS partition.
$ ln -s /media/ntfs-data/Windows/User/<username>/Dropbox /home/<username>/Dropbox
Not sure why this would matter but it's entirely possible that the Dropbox application would then view the NTFS share as just a EXT3/4 directory given it's accessing it through the Unix link created by the ln command.
3. Latest version of Dropbox?
I'd confirm that you're using the latest version of the Dropbox client. You can find updated version here. The release notes are here as well.
In general I've found it better to use the downloadable versions of Dropbox rather than anyone that's included in my distros' repositories.
Also I've used the instructions for installing Dropbox from the Unofficial Dropbox Wiki when doing installations from the command-line. The topic's titled: Install Dropbox In An Entirely Text-Based Linux Environment.
4. mount options to ntfs-3g
Just add the correct masks for files and folders to the /etc/fstab entry (this will make the ntfs drive more compatible with Linux in all cases):
UUID=662058B320588C45 /media/ntfs ntfs-3g id=1000,gid=1000,dmask=022,fmask=133 0 0
References
UBUNTU / WINDOWS SHARING A DROPBOX FOLDER ON NTFS
| Dropbox on Debian EAGAIN error on NTFS share |
1,384,098,124,000 |
I followed the guide here:
http://www.webupd8.org/2011/06/encrypt-your-private-dropbox-data-with.html
to get dropbox encfs working on my first computer. I disabled the syncing of the encryption key. so I copied it manually from the 1st computer to the 2nd computer.
By the time I had time to get this setup on the 2nd computer, I had forgotten the password I entered for encfs.
How do I remove the password from the keyring on the 1st computer before I create another key and store it in the keyring on the 1st computer?
|
Not positive about GNOME 3.x but in GNOME 2.x you can get to the "Passwords and Encryption Keys app" (Applications -> Accessories -> Passwords and Encryption Keys).
From here you can manage passwords, keys, etc.
Screenshot
References
GNOME Keyring
Gnome Keyring tutorial and security article; Vala resources; etc
GNOME Keyring - wikipedia
| Forgot encfs password |
1,384,098,124,000 |
I'm using Unison to synchronize my home across several computers, and I've addressed everything but this.
The Dropbox configuration is partially skipped, and as a result Dropbox thinks there is no configuration and goes through the configuration wizard again.
Here's the output from Unison related to dropbox:
Reconciling changes
<-?-- dir .dropbox
<---- dir .dropbox-dist
<---- dir .dropbox-dist-new
[BGN] Copying .dropbox from /home/.nfs/jorge.suarez/linux-home to /home/remoto/jorge.suarez
[END] Copying .dropbox
[BGN] Copying .dropbox-dist from /home/.nfs/jorge.suarez/linux-home to /home/remoto/jorge.suarez
[END] Copying .dropbox-dist
[BGN] Copying .dropbox-dist-new from /home/.nfs/jorge.suarez/linux-home to /home/remoto/jorge.suarez
[END] Copying .dropbox-dist-new
partially transferred: .dropbox
Here's the original contents of the directory:
$ ls -lah
total 22M
drwx------ 3 jorge.suarez users 3,9K 2013-01-25 21:39 .
drwxr-xr-x 43 jorge.suarez users 3,9K 2013-01-25 21:40 ..
srw------- 1 jorge.suarez users 0 2013-01-25 21:39 command_socket
-rw------- 1 jorge.suarez users 3,0K 2013-01-25 21:39 config.db
-rw------- 1 jorge.suarez users 20K 2013-01-25 21:39 config.dbx
-rw------- 1 jorge.suarez users 66K 2013-01-25 21:39 deleted.dbx
-rw------- 1 jorge.suarez users 4 2013-01-25 21:39 dropbox.pid
-rw------- 1 jorge.suarez users 2,0M 2013-01-25 21:39 filecache.dbx
-rw------- 1 jorge.suarez users 89 2013-01-25 21:39 host.db
-rw------- 1 jorge.suarez users 221 2013-01-25 21:39 host.dbx
-rw------- 1 jorge.suarez users 81 2013-01-25 21:39 hostkeys
srw------- 1 jorge.suarez users 0 2013-01-25 21:39 iface_socket
drwx------ 2 jorge.suarez users 3,9K 2013-01-25 21:39 l
-rw------- 1 jorge.suarez users 13K 2013-01-25 21:39 photo.dbx
-rw------- 1 jorge.suarez users 20M 2013-01-25 21:39 sigstore.dbx
-rw------- 1 jorge.suarez users 232 2013-01-25 21:39 unlink.db
And the synchronized one, just before Dropbox gets a chance to be launched:
$ ls -lah
total 22M
drwx------ 3 jorge.suarez users 4,0K Xan 25 22:09 .
drwx------ 43 jorge.suarez users 4,0K Xan 25 22:10 ..
-rw------- 1 jorge.suarez users 3,0K Xan 25 22:09 config.db
-rw------- 1 jorge.suarez users 20K Xan 25 22:09 config.dbx
-rw------- 1 jorge.suarez users 66K Xan 25 22:09 deleted.dbx
-rw------- 1 jorge.suarez users 4 Xan 25 22:09 dropbox.pid
-rw------- 1 jorge.suarez users 2,0M Xan 25 22:09 filecache.dbx
-rw------- 1 jorge.suarez users 89 Xan 25 22:09 host.db
-rw------- 1 jorge.suarez users 221 Xan 25 22:09 host.dbx
-rw------- 1 jorge.suarez users 81 Xan 25 22:09 hostkeys
drwx------ 2 jorge.suarez users 4,0K Xan 25 22:09 l
-rw------- 1 jorge.suarez users 13K Xan 25 22:09 photo.dbx
-rw------- 1 jorge.suarez users 20M Xan 25 22:09 sigstore.dbx
-rw------- 1 jorge.suarez users 232 Xan 25 22:09 unlink.db
It seems iface_socket and command_socket are skipped because they are socket files. Is there anything I can do about this?
As a workaround, I could just parse the Unison output and create the socket files by hand. That should fix this particular issue, but the problem would remain for other socket files since the Unison output doesn't contain the name of the skipped files.
|
As of Unison 2.40 (the latest version as I write), Unison doesn't support any file that isn't a regular file, a directory, or a symbolic link. Prior versions aborted the transfer upon encountering special files; since 2.40 these files are ignored. In 2.40.65, you don't get to see the name of ignored files in the first synchronization but it is displayed in subsequent synchronizations. So you could run Unison manually once, then parse its output to detect special files.
The other options are to patch Unison, or to look for special files manually and copy them.
One method to synchronize these files would be to keep a repository of them. For example, make a parallel hierarchy that encodes the special files with normal files, let Unison synchronize that, and decode the parallel hierarchy back after synchronization. Before running unison, on each side:
mkdir -p .pipes .sockets
find . -type p -exec sh -c '
mkdir -p ".pipes/${0%/*}";
touch -r "$0" ".pipes/$0"; chmod -r "$0" ".pipes/$0"
' {} \;
find . -type s -exec sh -c '
mkdir -p ".sockets/${0%/*}";
touch -r "$0" ".sockets/$0"; chmod -r "$0" ".sockets/$0"
' {} \;
After running unison:
(cd .pipes &&
find -type f -exec sh -c '
[ -p "../$0" ] && exit;
mkfifo "../$0";
touch -r "$0" "../$0"; chmod -r "$0" "../$0"
' {} \;)
find -type p -exec '[ -e ".pipes/$0" ] || rm "$0"' {} \;
(cd .sockets &&
find -type f -exec sh -c '
[ -S "../$0" ] && exit;
python -c "import os, sys; os.mknod(sys.argv[1], 0140000)" "../$0";
touch -r "$0" "../$0"; chmod -r "$0" "../$0"
' {} \;)
find -type s -exec '[ -e ".sockets/$0" ] || rm "$0"' {} \;
(Warning: untested code. Assumes GNU tools (which includes any non-embedded Linux).)
I think this is more complex than warranted. There are very few applications that rely on a named pipe or socket existing: most create them as needed. Dropbox is the first case I've ever heard of. So I think I'd go for an ad hoc approach: skip the sockets when synchronizing, and create them for Dropbox as part of your new account creation procedure (together with the Unison profile creation and whatever else you do).
| Unison can't synchronize Dropbox configuration (socket files) |
1,384,098,124,000 |
I just install Debian 10 for the first time, and then dropbox, simply by downloading the .deb file and doing dpkg -i.
I got dropbox to run just fine, but unfortunately the install "broke" my apt, which keeps complaining:
dropbox : Depends: libpango1.0-0 (>= 1.36.3) but it is not installable
Now it seems I cannot install new packages because of this. As far as I understand, this bug has been reported (here) and is due to a stupid reason, namely a renaming of the libpango package, which has not been updated in the dropbox deb.
What is the easiest solution for me to fix my system? (apt --fix-broken install will solve the issue by removing dropbox, but obviously I want to keep it.)
|
I think the most straightforward solution is to use the installer packaged in Debian non-free, rather than the package provided by Dropbox:
remove the dropbox package;
edit /etc/apt/sources.list and ensure that your buster lines include contrib and non-free, along the lines of
deb http://deb.debian.org/debian buster main contrib non-free
run sudo apt update;
install nautilus-dropbox: sudo apt install nautilus-dropbox.
The nautilus-dropbox package uses the source code provided by Dropbox.
| Installing dropbox on Debian 10: problem with libpango |
1,384,098,124,000 |
I downloaded dropbox_2020.03.04_amd64.deb from dropbox.com and install it with sudo apt install ./dropbox_2020.03.04_amd64.deb, then I click the app dropbox to install it.
Dropbox installation windows get stuck at 92% (sometims 92%, 99%), then the process python3 /usr/bin/dropbox start -i starts occupying more and more memory til the system couldn't afford. Then the system freezes.
How do I fix this to install Dropbox?
I'm using Ubuntu 22.04 and similar things happen on Debian 11.4.
|
The following seems to work for me on Lubuntu 22.04:
# install any dependencies
sudo apt install libpango1.0-0
sudo dpkg -i dropbox_2020.03.04_amd64.deb
which produces:
Dropbox installation successfully completed! You can start Dropbox
from your applications menu.
then starting Dropbox from the GUI will download some package and run it. Near 97% of completion or so, it will launch a browser (Firefox in my case) with a log-in page for Dropbox.
One note is that I uninstalled the Snap version of Firefox and installed the apt version of firefox, as it is said to have some problems:
...
Some third-party integrations are (currently) broken
| install Dropbox on Ubuntu |
1,326,322,412,000 |
Is there a free and open source duplicate image finder for Linux based systems?
Finding exact duplicates (based on content, not file name) is sufficient for me, but the ability to find similar images would certainly be great, too.
|
Digikam
Add all the photos to your collection. In the menu, select “Tools / Find duplicates”. This will look for duplicates accross your whole collection.
Findimagedupes
A command line tool. Pass all the images you want to compare on the command line.
Geeqie (formerly gqview)
In the menu, select “File / Find duplicate”. Drag and drop image files do the duplicates window. You can drop directories to add their contents recursively.
Fdupes
A command line tool to find byte-for-byte duplicates in a directory tree.
(Reposted from https://askubuntu.com/questions/4072/how-can-i-find-duplicate-photos)
| Open source duplicate image finder for Linux? |
1,326,322,412,000 |
I have a folder with duplicate (by md5sum (md5 on a Mac)) files, and I want to have a cron job scheduled to remove any found.
However, I'm stuck on how to do this. What I have so far:
md5 -r * | sort
Which outputs something like this:
04c5d52b7acdfbecd5f3bdd8a39bf8fb gordondam_en-au11915031300_1366x768.jpg
1e88c6899920d2c192897c886e764fc2 fortbourtange_zh-cn9788197909_1366x768.jpg
266ea304b15bf4a5650f95cf385b16de nebraskasupercell_fr-fr11286079811_1366x768.jpg
324735b755c40d332213899fa545c463 grossescheidegg_en-us10868142387_1366x768.jpg
3993028fcea692328e097de50b26f540 Soyuz Spacecraft Rolled Out For Launch of One Year Crew.png
677bcd6006a305f4601bfb27699403b0 lechaustria_zh-cn7190263094_1366x768.jpg
80d03451b88ec29bff7d48f292a25ce6 ontariosunrise_en-ca10284703762_1366x768.jpg
b6d9d24531bc62d2a26244d24624c4b1 manateeday_row10617199289_1366x768.jpg
ca1486dbdb31ef6af83e5a40809ec561 Grueling Coursework.jpg
cdf26393577ac2a61b6ce85d22daed24 Star trails over Mauna Kea.jpg
dc3ad6658d8f8155c74054991910f39c smoocave_en-au10358472670_1366x768.jpg
dc3ad6658d8f8155c74054991910f39c smoocave_en-au10358472670_1366x7682.jpg
How can I process based on the MD5 of the file to remove duplicates? I don't really care which "original" I keep - but I only want to keep one.
Should I be approaching this in a different manner?
|
I'm working on Linux, which means the is the command md5sum which outputs:
> md5sum *
d41d8cd98f00b204e9800998ecf8427e file_1
d41d8cd98f00b204e9800998ecf8427e file_10
d41d8cd98f00b204e9800998ecf8427e file_2
d41d8cd98f00b204e9800998ecf8427e file_3
d41d8cd98f00b204e9800998ecf8427e file_4
d41d8cd98f00b204e9800998ecf8427e file_5
d41d8cd98f00b204e9800998ecf8427e file_6
d41d8cd98f00b204e9800998ecf8427e file_7
d41d8cd98f00b204e9800998ecf8427e file_8
d41d8cd98f00b204e9800998ecf8427e file_9
b026324c6904b2a9cb4b88d6d61c81d1 other_file_1
31d30eea8d0968d6458e0ad0027c9f80 other_file_10
26ab0db90d72e28ad0ba1e22ee510510 other_file_2
6d7fce9fee471194aa8b5b6e47267f03 other_file_3
48a24b70a0b376535542b996af517398 other_file_4
1dcca23355272056f04fe8bf20edfce0 other_file_5
9ae0ea9e3c9c6e1b9b6252c8395efdc1 other_file_6
84bc3da1b3e33a18e8d5e1bdd7a18d7a other_file_7
c30f7472766d25af1dc80b3ffc9a58c7 other_file_8
7c5aba41f53293b712fd86d08ed5b36e other_file_9
Now using awk and xargs the command would be:
md5sum * | \
sort | \
awk 'BEGIN{lasthash = ""} $1 == lasthash {print $2} {lasthash = $1}' | \
xargs rm
The awk part initializes lasthash with the empty string, which will not match any hash, and then checks for each line if the hash in lasthash is the same as the hash (first column) of the current file (second column). If it is, it prints it out. At the end of every step it will set lasthash to the hash of the current file (you could limit this to only be set if the hashes are different, but that should be a minor thing especially if you do not have many matching files). The filenames awk spits out are fed to rm with xargs, which basically calls rm with what the awk part gives us.
You probably need to filter directories before md5sum *.
Edit:
Using Marcins method you could also use this one:
comm -1 -2 \
<(ls) | \
<(md5sum * | \
sort -k1 | \
uniq -w 32 | \
awk '{print $2}' | \
sort) \
xargs rm
This substracts from the filelist optained by ls the first filename of each unique hash optained by md5sum * | sort -k1 | uniq -w 32 | awk '{print $2}'.
| How to remove duplicate files using bash |
1,326,322,412,000 |
I have a string like
"aaa,aaa,aaa,bbb,bbb,ccc,bbb,ccc"
I want to remove duplicate word from string then output will be like
"aaa,bbb,ccc"
I tried This code Source
$ echo "zebra ant spider spider ant zebra ant" | xargs -n1 | sort -u | xargs
It is working fine with same value,but when I give my variable value then it is showing all duplicate word also.
How can I remove duplicate value.
UPDATE
My question is adding all corresponding value into a single string if user is same .I have data like this ->
user name | colour
AAA | red
AAA | black
BBB | red
BBB | blue
AAA | blue
AAA | red
CCC | red
CCC | red
AAA | green
AAA | red
AAA | black
BBB | red
BBB | blue
AAA | blue
AAA | red
CCC | red
CCC | red
AAA | green
In coding I fetch all distinct user then I concatenate color string successfully .For that I am using code -
while read the records
if [ "$c" == "" ]; then #$c I defined global
c="$colour1"
else
c="$c,$colour1"
fi
When I print this $c variable i get the output (For User AAA)
"red,black,blue,red,green,red,black,blue,red,green,"
I want to remove duplicate color .Then desired output should be like
"red,black,blue,green"
For this desired output i used above code
echo "zebra ant spider spider ant zebra ant" | xargs -n1 | sort -u | xargs
but it is displaying the output with duplicate values .Like
"red,black,blue,red,green,red,black,blue,red,green,"
Thanks
|
One more awk, just for fun:
$ a="aaa bbb aaa bbb ccc aaa ddd bbb ccc"
$ echo "$a" | awk '{for (i=1;i<=NF;i++) if (!a[$i]++) printf("%s%s",$i,FS)}{printf("\n")}'
aaa bbb ccc ddd
By the way, even your solution works fine with variables:
$ b="zebra ant spider spider ant zebra ant"
$ echo "$b" | xargs -n1 | sort -u | xargs
ant spider zebra
| Remove all duplicate word from string using shell script |
1,326,322,412,000 |
I'm running Mac OSX and trying to use the command line to find the number of files I have with the same name.
I tried to use the following command:
find ~ -type f -name "*" -print | basename | sort | uniq -d > duplicate_files
It doesn't work! When I do the following:
find ~ -type f -name "*" -print > duplicate_files
Then duplicate_files does contain the paths of all my files. So I think the issue is with basename - it doesn't accept standard input. I then tried the following:
basename $(find ~ -type f -name "*" -print) > duplicate_files
but again that doesn't seem to work. Search on the internet doesn't seem to yield much joy. Any thoughts most welcome.
|
basename operates on its command line argument, it doesn't read from standard input.
You don't need to call the basename utility, and you'd better not: all it would do is strip off the part before the last /, and it would be slow to call an external command for each entry, you can use a text processing utility instead.
find ~ -type f | sed 's!.*/!!' | sort | uniq -d
It may be more useful to keep track of the location of the files. Sorting by name makes it easier to locate duplicates, but sort doesn't have an option to use the last field. What you can do is copy the last /-separated field to the beginning, then sort, and then use a bit of ad hoc awk processing to extract and present the duplicates.
find ~ -type f |
sed 's!.*/\(.*\)!\1/&!' | # copy the last field to the beginning
sort -t/ -k1,1 |
cut -d/ -f2- | # remove the extra first field (could be combined with awk below)
awk -F / '{
if ($NF == name) {
if (previous != "") {print previous; previous = ""}
print
} else {
previous = $0
name = $NF
}
'
(Note that I assume that none of your file names contain newline characters.)
| Use basename to parse a list of paths held in a file |
1,326,322,412,000 |
I have a massive music library (all mp3), but I some of the music is almost the same but:
Maybe one or two second longer
About 97% the same as another song
Or another bitrate.
Is there a way to find these duplicates? As mentioned they don't have the same size, name, or SHA1-hash.
|
There's an open source acoustic fingerprinting system called Echoprint, you might want to check I want to deduplicate a big collection. I haven't used it before (just stumbled across it), but it sounds awesome to be able to do this locally.
| Remove duplicate mp3 with different name, size, and hash |
1,326,322,412,000 |
I've got a directory tree created by rsnapshot, which contains multiple snapshots of the same directory structure with all identical files replaced by hardlinks.
I would like to delete all those hardlink duplicates and keep only a single copy of every file (so I can later move all files into a sorted archive without having to touch identical files twice).
Is there a tool that does that?
So far I've only found tools that find duplicates and create hardlinks to replace them…
I guess I could list all files and their inode numbers and implement the deduplicating and deleting myself, but I don't want to reinvent the wheel here.
|
In the end it wasn't too hard to do this manually, based on Stéphane's and xenoid's hints and some prior experience with find.
I had to adapt a few commands to work with FreeBSD's non-GNU tools — GNU find has the -printf option that could have replaced the -exec stat, but FreeBSD's find doesn't have that.
# create a list of "<inode number> <tab> <full file path>"
find rsnapshots -type f -links +1 -exec stat -f '%i%t%R' {} + > inodes.txt
# sort the list by inode number (to have consecutive blocks of duplicate files)
sort -n inodes.txt > inodes.sorted.txt
# remove the first file from each block (we want to keep one link per inode)
awk -F'\t' 'BEGIN {lastinode = 0} {inode = 0+$1; if (inode == lastinode) {print $2}; lastinode = inode}' inodes.sorted.txt > inodes.to-delete.txt
# delete duplicates (watch out for special characters in the filename, and possibly adjust the read command and double quotes accordingly)
cat inodes.to-delete.txt | while read line; do rm -f "$line"; done
| How to delete all duplicate hardlinks to a file? |
1,326,322,412,000 |
I have a large music collection stored on my hard drive; and browsing through it, I found that I have a lot of duplicate files in some album directories. Usually the duplicates exist alongside the original in the same directory.
Usually the format is filename.mp3 and duplicate file is filename 1.mp3. Sometimes there may be more than one duplicate file, and I have no idea if there are duplicate files across folders (for example duplicates of album directories).
Is there any way I can scan for these duplicate files (for example by comparing filesize, or comparing the entire files to check if they are identical), review the results, and then delete the duplicates? The ones that have a longer name, or the ones that have a more recent modified/created date would usually be the targets of deletion.
Is there a program out there that can do this on Linux?
|
There is such a program, and it's called rdfind:
SYNOPSIS
rdfind [ options ] directory1 | file1 [ directory2 | file2 ] ...
DESCRIPTION
rdfind finds duplicate files across and/or within several directories.
It calculates checksum only if necessary. rdfind runs in O(Nlog(N))
time with N being the number of files.
If two (or more) equal files are found, the program decides which of
them is the original and the rest are considered duplicates. This is
done by ranking the files to each other and deciding which has the
highest rank. See section RANKING for details.
It can delete the duplicates, or replace them with symbolic or hard links.
| Search and Delete duplicate files with different names |
1,326,322,412,000 |
This question/answer has some good solutions for deleting identical lines in a file, but won't work in my case since the otherwise duplicate lines have a timestamp.
Is it possible to tell awk to ignore the first 26 characters of a line in determining duplicates?
Example:
[Fri Oct 31 20:27:05 2014] The Brown Cow Jumped Over The Moon
[Fri Oct 31 20:27:10 2014] The Brown Cow Jumped Over The Moon
[Fri Oct 31 20:27:13 2014] The Brown Cow Jumped Over The Moon
[Fri Oct 31 20:27:16 2014] The Brown Cow Jumped Over The Moon
[Fri Oct 31 20:27:21 2014] The Brown Cow Jumped Over The Moon
[Fri Oct 31 20:27:22 2014] The Brown Cow Jumped Over The Moon
[Fri Oct 31 20:27:23 2014] The Brown Cow Jumped Over The Moon
[Fri Oct 31 20:27:24 2014] The Brown Cow Jumped Over The Moon
Would become
[Fri Oct 31 20:27:24 2014] The Brown Cow Jumped Over The Moon
(keeping the most recent timestamp)
|
You can just use uniq with its -f option:
uniq -f 4 input.txt
From man uniq:
-f, --skip-fields=N
avoid comparing the first N fields
Actually this will display the first line:
[Fri Oct 31 20:27:05 2014] The Brown Cow Jumped Over The Moon
If that is a problem you can do:
tac input.txt | uniq -f 4
or if you don't have tac but your tail supports -r:
tail -r input.txt | uniq -f 4
| Remove duplicate lines from a file that contains a timestamp |
1,326,322,412,000 |
Say, I have two commands that return some text. For example:
$ ./c1
/usr/bin/foo
/usr/bin/bar
/usr/bin/baz
$ ./c2
/usr/bin/foo
/usr/bin/qux
/usr/bin/buzz
/usr/bin/bar
I want to remove the duplicate lines; i.e. the output will be (order isn't important):
/usr/bin/baz
/usr/bin/qux
/usr/bin/buzz
How would I go about doing this?
|
With comm from GNU coreutils:
$ comm -3 <(sort -u <(./c1)) <(sort -u <(./c2)) | tr -d '\t'
/usr/bin/baz
/usr/bin/buzz
/usr/bin/qux
From man comm:
Compare sorted files FILE1 and FILE2 line by line.
With no options, produce three-column output. Column one contains
lines unique to FILE1, column two contains lines unique to FILE2, and
column three contains lines common to both files.
-1 suppress column 1 (lines unique to FILE1)
-2 suppress column 2 (lines unique to FILE2)
-3 suppress column 3 (lines that appear in both files)
| Removing lines that are common to the outputs produced by two commands |
1,326,322,412,000 |
I have a file with multiple columns and have identified lines where specific column values (cols 3-6) have been duplicated using a bash script.
Example input:
A B C D E F G
1 2 T TACA A 3 2 Q
3 4 I R 8 2 Q
9 3 A C 9 3 P
8 3 I R 8 2 Q
I can display both instances of the repeated values. The other column values (cols 1, 2 and 7+) can be different between the 2 lines hence the need for me to view both instances.
I want to save the unique records and the first instance of the duplicated records after sorting these dups have been sorted on col 5 (any order will do) then col 1 (descending order --> largest value first).
Desired ouput:
A B C D E F G
1 2 T TACA A 3 2 Q
9 3 A C 9 3 P
8 3 I R 8 2 Q
NB: The ordering on final output is not important as it will be resorted later. Making sure the desired rows are present is what matters.
My code so far is:
tot=$(awk 'n=x[$3,$6]{print n"\n"$0;} {x[$3,$6]=$0;}' oldfilename | wc -l) #counts duplicated records and saves overall count as $tot
if [ $tot == "0" ]
then
awk '{print}' oldfilename >> newfilename #if no dups found, all lines saved in new file
else if
awk '(!(n=x[$3,$6]{print n"\n"$0;} {x[$3,$6]=$0;})' oldfilename >> newfilename #if dups found, unique lines in old file saved in new file
else
awk 'n=x[$3,$6]{print n"\n"$0;} {x[$3,$6]=$0;}' oldfilename > tempfile #save dups in tempfile
sort -k1,1, -k5,5 tempfile #sort tempfile on cols 1 then 5 (want descending order)
fi
What I am unable to do is take the first instance of each duplicate and save it in newfile and I still have errors in the above code.
Please help.
|
sort itself should suffice. First sort such that rows are "grouped" by field range 3-6, records within each group further ordered by fields 5 and 1. Pipe this to sort -u on 3-6, this disables last-resort comparison and returns the first record from each 3-6 group. Finally, pipe this to sort, this time by fields 5 and 1
sort -k3,6 -k5,5r -k1,1r file | sort -k3,6 -u | sort -k5,5r -k1,1r
A B C D E F G
1 2 T TACA A 3 2 Q
9 3 A C 9 3 P
8 3 I R 8 2 Q
| Keeping first instance of duplicates |
1,326,322,412,000 |
I'm using the following code to find the duplicate username. However, it gives an error.
#!/bin/bash
cat /etc/passwd | cut -f1 -d":" | /bin/sort -n | /usr/bin/uniq -c |\
while read x; do [ -z "${x}" ] && break set - $x
if [ $1 -gt 1 ]; then
uids=`/bin/gawk -F: '($1 == n) { print $3 }' n=$2 \
/etc/passwd | xargs`
echo "Duplicate User Name ($2): ${uids}"
fi
done
I'm facing a syntax error near the token 'done' and numeric error. How can I fix this error?
|
$ cut -d: -f1 /etc/passwd | sort | uniq -d
This will extract the first field (the usernames) of the :-delimited /etc/passwd-file, sort the result and report any duplicates.
To also get the UID and the rest of the duplicated passwd entries:
cut -d: -f1 /etc/passwd | sort | uniq -d |
while read -r username; do
grep "^$username:" /etc/passwd
done
To only get the duplicate usernames and their UID:
cut -d: -f1 /etc/passwd | sort | uniq -d |
while read -r username; do
awk -F: -vu="$username" '$1 == u { print $1, $3 }' /etc/passwd
done
A short note on your script. The syntax looks mostly ok, but you need ; after break and there is a space after both \ (this may be a cut-and-paste error (now removed by an edit)). Also, I'd avoid giving full paths to standard utilities if there is no good reason for it, and the awk program does not require GNU awk so just awk will do.
| Finding duplicate users on CentOS |
1,326,322,412,000 |
I'm searching for a short snippet to find, count and merge consecutive duplicates using standard tools or a common scripting language.
Say our input is:
1 2 2 2 7 22 a b b c c c c c d dd 2 2 c c
And as output we would like to have something similar to:
1 3*2 7 22 a 2*b 5*c d dd 2*2 2*c
It is important to keep the order and to merge only consecutive patterns.
|
How about this:
printf '%s\n' 1 2 2 2 7 22 a b b c c c c c d dd 2 2 c c | uniq -c
Output:
1 1
3 2
1 7
1 22
1 a
2 b
5 c
1 d
1 dd
2 2
2 c
It's simple and easy (and similar).
To get your format:
printf '%s\n' 1 2 2 2 7 22 a b b c c c c c d dd 2 2 c c |
uniq -c | sed 's/^ *//;s/^1 //;s/ /*/' | paste -sd' ' -
| Count and merge consecutive patterns |
1,326,322,412,000 |
I have a marathon file from which I want to print the names of the runners, who have made multiple runs. Something like:
M, 2:08:58.0, John Lukas, USA, 1997-07-25, Paris, France
F, 2:15:04:0, Abebbe Boukari, KEN, 2000-10-01, London, UK
and so on
I have tried with uniq but it just doesn`t happen:
uniq -d marathon | grep "[[:alpha:]]\+[ ]\+[[:alpha:]]"
|
Another simple, alternative(for someone who dont want/know awk) script will be:
#!/bin/bash
sort -t',' -k 3 marathon | cut -d',' -f 3 | uniq -d
if someone wants to print whole line instead of just names:
#!/bin/bash
sort -t',' -k 3 marathon | cut -d',' -f 3 | uniq -d | grep -f - marathon
in over scripts:
sort takes third field to sort, using , as separator from -t option and 3rd field from -k option
cut command just cuts out third field using , as separator
-d option for uniq just prints duplicate lines, which is what the author of the question wanted - "Print repeating pattern"
-f option takes input from pipe(i.e. names) and searches it in marathon file to give whole line instead of just names
| Print repeating pattern |
1,326,322,412,000 |
Two interfaces, eth0 and eth1 are part of a network bonding bond0 on CentOS 6.
All worked well under CentOS 5, but after the upgrade to CentOS 6.6, keeping the same configuration, the network works fine but
despite setting /etc/modprobe.d/bonding.conf with options mode=1 or even mode=active-backup, the status from /proc/net/bonding/bond0 always shows load balancing (round-robin), not active-backup as it should.
doing a ping to a LAN address (that belongs to bond0 network) for the first time after a reboot, the first frame is DUP! (duplicated), the DUP doesn't happen anymore on further pings. Likely due to round-robin instead of active-backup
/etc/modprobe.d/bonding.conf:
alias bond0 bonding
options bond0 mode=1 miimon=100
ifcfg-bond0:
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
NETWORK=10.1.1.0
NETMASK=255.255.255.0
IPADDR=10.1.1.11
USERCTL=no
NM_CONTROLLED=no
ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:22:35:12:26:18
UUID=12fa32c2-e421-47f6-8d25-11414a664318
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes
USERCTL=no
ifcfg-eth1:
DEVICE=eth1
BOOTPROTO=none
HWADDR=00:22:35:12:26:19
UUID=12fa32c2-e421-47f6-8d25-11414a664319
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=no
MASTER=bond0
SLAVE=yes
USERCTL=no
All updates have been applied. NetworkManager is disabled.
The main problem seems now to be the mode, round-robin instead of active-backup.
|
After some deeper investigation, found the problem for the round-robin and DUP problems. They are actually related.
round robin (0) instead of active-backup (1)
On CentOS 5+, and seemingly especially 6.6, it recommended / preferred to use the BONDING_OPTS parameter directly in ifcfg-bond0 (and not in the bonding module options, that makes sense)
DEVICE=bond0
...
BONDING_OPTS="mode=1 miimon=100"
(mode may be specified as '1' or as 'active-backup')
After adding the line, everything worked as expected.
duplicated ping frames
In round-robin mode, both interfaces are used. And when the interfaces are connected to two different switches, the early ping replies may be duplicated
It is not uncommon to observe a short burst of duplicated traffic when
the bonding device is first used, or after it has been idle for some
period of time. This is most easily observed by issuing a "ping" to
some other host on the network, and noticing that the output from ping
flags duplicates (typically one per slave).
For example, on a bond in active-backup mode with five slaves all
connected to one switch, the output may appear as follows:
# ping -n 10.0.4.2
PING 10.0.4.2 (10.0.4.2) from 10.0.3.10 : 56(84) bytes of data.
64 bytes from 10.0.4.2: icmp_seq=1 ttl=64 time=13.7 ms
64 bytes from 10.0.4.2: icmp_seq=1 ttl=64 time=13.8 ms (DUP!)
This is not due to an error in the bonding driver, rather, it is a
side effect of how many switches update their MAC forwarding tables.
After switching to active-backup, no more DUPs were observed.
This is explained in details in this invaluably knowledgeable documentation
https://www.kernel.org/doc/Documentation/networking/bonding.txt
| CentOS 6 interfaces bonding, round-robin instead of active-backup, duplicates frames |
1,326,322,412,000 |
I'm looking for a way to remove one specific line from a bunch of files, but only if it occurs more than once in that file. Other lines should be kept, even if they are duplicates.
For example, a file like this where I would like to remove the duplicates of AAA
AAA
BBB
AAA
BBB
CCC
should become
AAA
BBB
BBB
CCC
I guess I should use sed but I have no idea how to write the command.
|
With GNU sed:
sed '0,/^AAA$/b;//d'
That is, let everything through (b branches off like a continue) up to the first AAA (from the 0th line (that is even before the first line) and the first one matching /^AAA$/ (which could be the first line)), and then for the remaining lines, delete every occurrence of AAA (an empty // pattern reuses the last pattern).
GNU sed is needed for the 0 address (and the ability to have other commands after the b one in the same expression, though that could be easily worked around in other implementations by using two -e expressions)
With awk:
awk '$0 != "AAA" || !n++'
(or for a regexp pattern: awk '!/^AAA$/ || !n++')
a shorthand for:
awk '! (&0 == "AAA" && count > 0) {print; count++}'
| How to remove a specific, duplicated line within a file? |
1,326,322,412,000 |
I have a file with multiple columns and want to identify those where specific column values (cols 3-6) have been duplicated.
The following code finds the duplicates but I want to display both instances, not just the second. The other column values (cols 1, 2 and 7+) can be different between the 2 lines hence the need for me to view both instances.
awk 'seen[$3, $4, $5, $6]++ == 1' filename
|
uniq is the correct tool for that:
uniq -D -f2 file
Where:
-D - prints all duplicates
-f2 - avoid comparing the first 2 fields
Edit: If the fields 7 and above are not to be compared, you need awk:
awk 'n=x[$3,$4,$5,$6]{print n"\n"$0;} {x[$3,$4,$5,$6]=$0;}' file
The array item x[] (columns 3-6) is checked. If it's already set run the part in {...} (in the same statement the n variable is set to the value of that array item)
In the brackets {...}: The n variable and the current line $0 are printed.
Then we set the x[] array item for the next iteration to the current line contents, for later comparsion.
| Identifying duplicate fields and print both with awk |
1,326,322,412,000 |
Yesterday I add a SSD to my PC configuration and I make on it a fresh installation. At the moment of installation I replace my old HDD and there was only the SSD. When the installation finish I make a manually shutdown to attach the HDD with cables and then turn on the pc. After that I can't open my information on the HDD but in BIOS everything seems fine. From second HDD I can mount only boot partition which is 524MB from 500GB HDD.
When I check with fdisk -l what is the situation the answer looks fine:
Disk /dev/sda: 128.0 GB, 128035676160 bytes
255 heads, 63 sectors/track, 15566 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000d66f4
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 15567 124521472 8e Linux LVM
Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x16481d17
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sdb2 64 60802 487873536 8e Linux LVM
Disk /dev/mapper/vg_andromeda-lv_root: 53.7 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_andromeda-lv_swap: 8136 MB, 8136949760 bytes
255 heads, 63 sectors/track, 989 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/vg_andromeda-lv_home: 65.7 GB, 65682800640 bytes
255 heads, 63 sectors/track, 7985 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Here is a screenshot of computer:///
When I execute mount /dev/sdb2 /storage as root
I get the following error:
mount: unknown filesystem type 'LVM2_member'
When I run vgs here is the answer:
WARNING: Duplicate VG name vg_andromeda: Existing gc5zhX-vrW9-mEDA-mzNN-kZxf-9nON-1aWwGY (created here) takes precedence over bwQkRq-mgph-9BYf-9WPF-cKz0-FLFq-0Qxs73
WARNING: Duplicate VG name vg_andromeda: Existing gc5zhX-vrW9-mEDA-mzNN-kZxf-9nON-1aWwGY (created here) takes precedence over bwQkRq-mgph-9BYf-9WPF-cKz0-FLFq-0Qxs73
WARNING: Duplicate VG name vg_andromeda: gc5zhX-vrW9-mEDA-mzNN-kZxf-9nON-1aWwGY (created here) takes precedence over bwQkRq-mgph-9BYf-9WPF-cKz0-FLFq-0Qxs73
WARNING: Duplicate VG name vg_andromeda: gc5zhX-vrW9-mEDA-mzNN-kZxf-9nON-1aWwGY (created here) takes precedence over bwQkRq-mgph-9BYf-9WPF-cKz0-FLFq-0Qxs73
So can anyone helps me because I can't open my information from the HDD. I've tried to mount /dev/sdb and /dev/sdb2 (there is no problem with /dev/sdb1 because there is the boot partition).
On the fresh installation I use the same username and hostname as on the old. Also on the old HDD there is a other CentOS installation but there is a lot of information and I want copy it first to the SSD and then I'll format the HDD.
Best regards,
Georgi!
|
Volume group name should be unique on system, by design. Problem occurs when a disk is moved from one system to another.
So you have few options (detailed below)
Rename the VG externally [not mounted] disk(s).
Rename the VG of your system (not realistic)
Merge both volume group into a single one (probably needs to rename first)
Option 1 - Rename the VG externally on the unmounted disk(s)
Use the command vgrename. You need to use vgdisplay or vgs,to retrieve the volume group UUID.
$ vgs -o vg_name,vg_attr,vg_uuid
VG Attr VG UUID
vg_andromeda wz--n- gc5zhX-vrW9-mEDA-mzNN-kZxf-9nON-1aWwGY
???? ?????? bwQkRq-mgph-9BYf-9WPF-cKz0-FLFq-0Qxs73
$ vgrename bwQkRq-mgph-9BYf-9WPF-cKz0-FLFq-0Qxs73 vg_andromeda_old
$ vgchange -ay vg_andromeda_old
(please, edit/update this post with the actual ouput of the command vgs)
Option 2 - Rename the VG of your system
This is not realistic. You can't rename an active volume group, so you would have to boot on a CD/DVD, rename the VG, and fix your system configuration in various places (fstab, bootloader)...
However, since your installation is fresh, you could reinstall your system with another name.
Option 3 - Merge both volume group into a single one
You could merge both VGs, but it has a few caveats;
It only makes sense if both drives are meant to remain on the system.
You can't have two LVs with the same name in a single VG.
You have an SSD and an HDD, It's recommended to keep them on distinct VG for clarity.
The vgmerge command seems to only merge two VGs by Name (not UUID), so you have to rename the duplicate VG anyway.
| Can't mount second hard drive on CentOS 6.6 - Duplicate VG name |
1,326,322,412,000 |
[user@notebook foobar]$ ls *.jpg|wc -l
1959
[user@notebook foobar]$ cksum * | cut -d' ' -f-2 | sort | uniq -di | wc -l
698
[user@notebook foobar]$
There are many jpg files in a directory.
Many of the files are duplicates, but I can spot them out if the cksum is the same for them.
Sometimes there are 2 or 3 file of the same picture.
Q: How can I delete the unneeded duplicates?
I need to leave 1 from every picture, so if there are 3 exactly same pictures with different filenames, only one of them should remain, so there will be no duplicates of the picture, how to do this?
|
Use fdupes:
fdupes -dN .
man fdupes:
-d --delete
prompt user for files to preserve, deleting all others (see
CAVEATS below)
-N --noprompt
when used together with --delete, preserve the first file in
each set of duplicates and delete the others without prompting
the user
| Deduplicate image files |
1,326,322,412,000 |
I need to duplicate the stdout of a producer and feed it to two consumer in a synchronized fashion.
consumer 1
producer | duplicator |
consumer 2
This can easily be accomplished for example via tee:
((cat f.txt | tee /dev/stderr | ./cons1.py >&3) 2>&1 | ./cons2.py) 3>&1
or via named pipes:
mkfifo fifo1 fifo2
cat f.txt | tee fifo1 fifo2 >/dev/null &
< fifo1 ./cons1.py &
< fifo2 ./cons2.py
or finally you can write a dup.c program doing the same job:
#include <stdio.h>
int main()
{
char *line = NULL;
size_t size;
while (getline(&line, &size, stdin) != -1) {
fprintf(stdout, "%s", line);
fprintf(stderr, "%s", line);
}
return 0;
}
and then:
((cat f.txt | ./dup | ./cons1.py >&3) 2>&1 | ./cons2.py) 3>&1
However, if consumer 1 is faster than consumer 2 we have a problem. E.g., consumer 1 is already at line 50,000 while consumer 2 is at line 17,000.
For my system I need that both consumers are at the same line, hence the faster consumer needs to be restricted. I know that this might be impossible via Linux standard tools. However, at least if we use that dup.c approach, it should be somehow possible. Any suggestions how to accomplish this? Thanks!
|
There is no general way to accomplish what you want.
The basic problem is that a pipe is a one-way thing, and the producer has absolutely no knowledge about the consumer's current state, and whether the data sent to the pipe has already been consumed or not.
So, there are two ways to work around this limitation, and both require a priori knowledge about the data and the consumers:
you make the production (or the transportation from the original producer to the consumers' pipes) so slow that the consumers are always in sync, ie after each line to be sent for consumption you wait so much that the consumers 100% surely have already finished processing by the time the next line gets sent (something similar to what was suggested by TiberiusKirk),
you check the progress of the processing in the consumers to see if they have already consumed the input lines (this needs feedback or output from the consumers, which may or may not exist, and may or may not be feasible processed).
The first workaround needs a proper lower bound for the time estimate of the processing of the input data, the second workaround needs some kind of feedback from the consumers.
| Duplicate stdin to stdout and stderr, but in a synchronized way |
1,326,322,412,000 |
I had a question about removing duplicate lines in multiple files and was provided with a useful script here: Remove duplicate lines from multiple JSON files while preserving file structure.
The problem is that my folder has 10000 files and each is 1.5 MB in size. The script has been running for days and is nowhere near done. My folder looks like this:
file.1424-417982.json
file.1424-417995.json
file.1424-418013.json
file.1424-418015.json
file.1424-418019.json
file.1424-418027.json
(9994 more files)
I have determined that the duplicate lines are only in files within a specified range. There may be duplicate lines in the first four files above, but those lines won't be in any other files in the folder. Likewise, there may be duplicates in files 2-5, but not in the other files.
How do I modify the shell/bash script to only look for duplicates within a range of 4 files and do this sequentially almost 10000 times shifting the range from 1-4, 2-5, 3-6... 9996-10000?
Here is the code I was provided for looking for duplicates. I tested it on a test folder with only 6 files and it was fast enough.
#!/bin/bash
temp=$(mktemp)
for file_to_dedupe in $(echo *.json|sort)
do
for file_to_strip in *.json
do
[ "$file_to_dedupe" == "$file_to_strip" ] && continue
grep -w -Ff ${file_to_dedupe} -v ${file_to_strip} > ${temp}
mv ${temp} ${file_to_strip}
done
done
|
I modified the script to loop the files 4 by 4 - tested on like 20 files, looks like it's working. The script will store the filenames in an array and then it will loop them 4 by 4 :
temp=$(mktemp)
declare -a files=($(echo *.json|sort))
length=$(echo ${#files[@]})
for ((i=0;i<length;i++))
do
for ((j=0;j<=3;j++))
do
[ "${files[i]}" == "${files[i+j]}" ] && continue
[ "$((i+j))" -ge "$length" ] && continue
echo ${files[i]} ${files[i+j]}
#grep -w -Ff ${files[i]} -v ${files[i+j]} > ${temp}
#mv ${temp} ${files[i+j]}
done
done
I only echo the output here, if you think it's working fine, then remove the comments.
| Remove duplicate lines from multiple files in a folder: Check only files within a range |
1,326,322,412,000 |
I use gedit to modify/create files in my system, and sometimes I see that after editing, a duplicate file is created by the name of samename~
Just that ~ is extra. Why does this happen? Is there any significance of this file or is it okay if I delete it (I usually do)?
|
Some editors backs up the original file with a suffix, usually ~ but sometimes .bak, when saving the new file.
Vim, for example, does this if the backup option is enabled. With Vim, you may also modify the suffix used for the backup files:
set backup
set backupext=.bak
See also :help backup in Vim.
Refer to the documentation for your particular text editor.
| Why is a duplicate file sometimes created after editing a file? [duplicate] |
1,326,322,412,000 |
I am looking for a way in Linux shell, preferably bash to find duplicates of files based on first few letters of the filenames.
Where this would be useful:
I build mod packs for Minecraft. As of 1.14.4 Forge no longer errors if there are duplicate mods in a pack of higher versions. It simply stops the oldest versions from running. A script to help find these duplicates would be very advantageous.
Example listing:
minecolonies-0.13.312-beta-universal.jar
minecolonies-0.13.386-alpha-universal.jar
by quickly being able to identify the dupes i can keep the client pack small.
More information as requested
There is no specific format. However as you can see there at least 2 prevailing formats. Further there is no standard in community about what kind of characters to use or not use. Some use spaces (ick), some use [] (also ick), some use _'s (more ick), some use -'s (preferred but what can you do).
https://gist.github.com/be3cc9a77150194476b2000cb8ee16e5 for sample mods list of the filenames. Has been cleaned so no dupes in it.
https://gist.github.com/b0ac1e03145e893e880da45cf08ebd7a contains a sample where I deliberately made duplicates. It is an over-exaggeration of happens from time to time.
Deeper Explanation
I realize this might be resource heavy to do.
I would like to arbitrarily specify a slice range start to finish of all filenames to sample. Find duplicates based on that slice, and then hilight the duplicates. I don't need the script to actually delete them.
Extra Credit
The script would present a menu for files that it suspects match the duplication criterion allowing for easy deleting or renaming.
|
Filter possible duplicates
You could use some script to filter these files for possible duplicates. You can move into a new directory all files matching with at least another one, case insensitively, on the part before the first dash, underscore or space in their names. cd into your jars directory to run it.
#!/bin/bash
mkdir -p possible_dups
awk -F'[-_ ]' '
NR==FNR {seen[tolower($1)]++; next}
seen[tolower($1)] > 1
' <(printf "%s\n" *.jar) <(printf "%s\n" *.jar) |\
xargs -r -d'\n' mv -t possible_dups/ --
Note: -r is a GNU extension to avoid running mv once with no file arguments when no possible duplicates are found. Also GNU parameter -d'\n' separates filenames by newlines, that means spaces and other usual characters are handled in the above command but not newlines.
You can edit the field separator assignment, -F'[-_ ]' to add or remove characters to define the end of the part we test for duplication. Now it means "dash or undescore or the space". It's generally good to catch more than the real duplication cases, like I probably do here.
Now you can inspect these files. You could also do directly the next step, on all files, without filtering, if you feel their number is not very large.
Visual inspection of possible duplicates
I suggest you to use a visual shell for this task, like mc, the Midnight Commander. You can easily install mc with the package management tool of your linux distribution.
You invoke mc into the directory you have these files, or you can navigate there. Using an X-terminal you can also have the mouse support but there are handy shortcuts for anything.
For example, follow the menu Left -> Sorting... -> untick "case sensitive" will give you the sorted view you want.
Navigate over the files using the arrows, and you can select many of them with Insert and then you can copy (F5), move (F6) or delete (F8) the hightlighted selections. Here is a screenshot of how it looks on your test data filtered:
| Find duplicate files based on first few characters of filename |
1,326,322,412,000 |
I have a question about my code. I'm writing a Bourne shell script that get a user list from server by who command then put it into a file then, it will check the name by read line and if the script found a duplicate name it will print out a warning msg with the username, otherwise it will print out that no duplication found. Everything working as it should when the script found the duplicate name, but when the script can not find any duplicate name it will not print anything, I know it is something to do with the last if statement but I try so many solutions but still stuck. If anyone have any suggestion please help me out. Really appreciated and answer in advance. ( see the code below )
#!/bin/sh
#who -u | sort -k1,5 > test3
log=~/Desktop/test3
while [ -f test ]; do
while IFS= read line; do
user=( $line )
if [ "$olduser" = "${user[0]}" ]; then
printf '\nThe user %s duplicated' "$olduser"
fi
olduser="${user[0]}"
done<"$log"
if [[ "$olduser" != "${user[0]}" ]]; then
printf '\nNo duplication found.\n';
fi
#Testing store value
#printf '\nolduser value = %s\n' "$olduser"
printf '\n=================================================================\n'
sleep 3
done
|
Your code uses at least two things that standard sh does not support:
[[ ... ]], this is an extension to the POSIX grammar that e.g. bash uses to introduce its own conditional expressions.
user=( $line ), this creates an array, which is another extension to the POSIX sh.
To find the duplicated lines in a text file:
sort file | uniq -d
sort will sort the input file and uniq -d will only output lines that occur multiple times in succession.
To use this on the output of who and only care about the user column (the first column):
who | awk '{ print $1 }' | sort | uniq -d
Using this in a script:
who | awk '{ print $1 }' | sort | uniq -d >duplicates.txt
if [ -s duplicates.txt ]; then
echo 'The following dupes were found:'
cat duplicates.txt
else
echo 'No dupes'
fi
The -s test will be true for a non-empty file.
To do it manually in the shell, set a flag when you've found a duplicate:
dupe=0
who | awk '{ print $1 }' | sort -o users.txt
while IFS= read -r user; do
if [ -n "$prev_user" ] && [ "$user" = "$prev_user" ]; then
printf 'Duplication for "%s"\n' "$user"
dupe=1
fi
prev_user=$user
done <users.txt
if [ "$dupe" -ne 1 ]; then
echo 'No dupes'
fi
| check duplicate login from file |
1,326,322,412,000 |
I am trying to copy lines from source.txt to target.txt. I would like this bash script to check each line on target.txt if there is duplicate entry before copy.
source.txt contains:
a$$a$$a
b**b**
c%%cc%%
d##d##d##
e^^e^^e^^
target.txt contains:
a$$a$$a
ee$$ee$$
ff__ff__
gg@@gg@@
zzxxzzxx
bb..bb..bb
e^^e^^e^^
hh;;hh;;hh
on this scenario, I assuming that there only 3 entries will be copied to target.txt which are:
b**b**
c%%cc%%
d##d##d##
My test code is:
#!/bin/bash
echo "started"
programpath=/home/mysite/www/copyfiles
var str input ; cat "$programpath/source.txt" > $input
var str target ; cat "$programpath/target.txt" > $target
cat $input >> $target
uniq -u "$target"
echo "finished"
exit 1
fi
|
Why using bash? The grep command can do the job clean.
grep -Fxvf target.txt source.txt #>> target.txt
This will return those lines which are exist only in source.txt, then you can append these lines to your target.txt with just uncomment #>> target.txt.
You may also needs to unique the source.txt before, to prevent appending duplicated entries if in source.txt file which awk also does the same at next.
grep -Fxvf target.txt <(sort -u source.txt) #>> target.txt
The -F option is telling grep that match pattern as a string instead of regex.
With -x option we are telling whole line is my pattern.
The -v is the reverse match that if you miss it, that will output the lines which are exist in the both files.
And -f is telling grep read my patterns from a file which is target.txt here.
Or you could use awk instead.
awk 'NR==FNR{seen[$0]=1;next} !seen[$0]++' target.txt source.txt #>> target.txt
Add whole target.txt file into the array called seen with the key of whole line seen[$0], and do next to read next line.
With !seen[$0]++ we are looking a line from source.txt which is not exist in array, then print it. Also add source.txt file lines into the array to prevent printing duplicated lines if exist in source.txt_.
| Check target file for duplicate entry before copy data from source file [duplicate] |
1,326,322,412,000 |
There is a file with a couple of identical and repetitive entries, which looks something like this:
123 abc nhjk
123 abc cftr
123 abc xdrt
123 def nhjk
123 def cftr
123 def xdrt
If the combination of (coloumns) Field1 and Field2 match, then only the first occurrence where they both match needs to be retained. So since 123 and abc of the first line match with 123 and abc of the second line, only the first line is to be retained. On further comparision, since the match is true for the first and third line too, again only the first line is to be retained.
However,
For the first and fourth line 123 and 123 matches but abc and def do not match, so both lines are to be retained.
So the final output should look like this:
123 abc nhjk
123 def nhjk
|
One way to do it is with the -u flag to sort although this may end up not preserving original file order:
sort -k1,1 -k2,2 -u file
If you need the de-duping done with file order preserved
awk '!a[$1, $2]++' file
| Remove repetitive entries from a file |
1,326,322,412,000 |
I get the following error after running sudo apt-get update (Linux Mint 12):
W: Duplicate sources.list entry http://www.duinsoft.nl/pkg/ debs/all i386 Packages
(/var/lib/apt/lists/www.duinsoft.nl_pkg_dists_debs_all_binary-i386_Packages)
W: You may want to run apt-get update to correct these problems
FSlint doesn't find duplicates in /var/lib/apt/lists. I found these files by browsing /var/lib/apt/lists:
www.duinsoft.nl_pkg_dists_debs_all_binary-i386_Packages, Size: 3.3 kB
www.duinsoft.nl_pkg_dists_debs_release, Size: 2.9 kB
www.duinsoft.nl_pkg_dists_debs_release.gpg, Size: 490 Bytes.
This is somehow connected to a Java installation. Would deleting any of these files help fixing the error?
|
You don't have duplicate packages.
As it says you have a duplicate entry in your sources.list (located in /etc/apt). How you fix this can depend on the package manager(s) you use. If you want to go straight to the sources.list, open a Terminal and type the following command.
gksudo gedit /etc/apt/sources.list
Look for the duplicate. You can disable entries by putting a # at the beginning of the line or by removing duplicate lines.
http://www.duinsoft.nl/pkg debs/all
| Do I have duplicate packages? |
1,326,322,412,000 |
I have a folder with some files (snippet of the contents of the folder)
PAT1.URGRSVP.50.WR786842JOB11632.WRS20140.FILE0005.DAT
PAT1.URGRSVP.50.WR786842JOB11643.WRS20140.FILE0003.DAT
PAT1.URGRSVP.51.WR786842JOB11643.WRS29232.FILE0003.DAT
PAT1.URGRSVP.50.WR786842JOB11694.WRS20140.FILE0002.DAT
...
...
...
My focus is on the 3rd (50,50,51,50) and the 5th (WRS20140,WRS20140,WRS29232,WRS20140) blocks.
How can I write a script that displays the duplicate filenames with the same 3rd block AND 5th block (The duplicates of the combination of the 3rd and the 5th block strings)?
So the output should list the following in the above example
PAT1.URGRSVP.50.WR786842JOB11643.WRS20140.FILE0003.DAT
PAT1.URGRSVP.50.WR786842JOB11694.WRS20140.FILE0002.DAT
|
ls *.DAT | awk -F. '{ if (c[$3$5]) print $0 ; c[$3$5]=$0}'
In the above, awk looks at each file name using . as a field separator. If it has seen the combination of the third and fifth fields before, it prints the file name. With your file names as input, the above produces:
PAT1.URGRSVP.50.WR786842JOB11643.WRS20140.FILE0003.DAT
PAT1.URGRSVP.50.WR786842JOB11694.WRS20140.FILE0002.DAT
MORE: Let's examine the awk commands in more detail:
if (c[$3$5]) print $0 ; c[$3$5]=$0
The above consists of two statements: one "if" statement and one assignment. The "if" statement is:
if (c[$3$5]) print $0
In this statement, c is an "associative array". This means that that you give it a key and it gives you back a value. We are using $3$5 as the key where $3 is the third "block" (what awk would call the third "field") and $5 is the fifth block. If that key was previously unassigned, then c[$3$5] returns an empty (false) value. So, if this combination of third and fifth blocks was seen before, then print $0 is executed, meaning that the whole of the file name is printed. If not, the print statement is skipped.
The second statement is:
c[$3$5]=$0
This assigns the name of the file ($0) to the associative array under the key of the third and fifth fields: $3$5. Thus, the next time that those fields are seen in the "if" statement, the print statement will execute.
| Find duplicate file names with specific matching pattern |
1,361,651,451,000 |
I started using dwm today and am trying to wrap my head around it, as OpenBox is my only other exposure to window managers.
As suggested in the official tutorial, I first opened couple of terminals and they all got tiled, with the first terminal being pushed to left, which I understand is the master.
I played with the default keybindings and opened and closed many windows and programs. I spent quite a bit of time trying to get what tags are and how to use them.
After a while came back to tag 1 and see that the windows, though in tiled mode, somehow changed to a horizontal split like this:
Any and all new windows are added horizontally.
I don't see any specific keybinding for changing layout of existing windows (like in tmux).
So, how can I get back the default tiling mode where master is on left and stacks are on right?
|
You have (inadvertently) incremented the windows in master, the default keybind for which is Modi, so that all of your clients in that selected tag are in master.
You can decrement the number of clients in master with Modd. Each press will decrement the clients in master by 1.
It may also be worth pointing out that dwm doesn't use the "desktop" paradigm; whatever layout is applied to the currently visible tag(s) is applied to all tags—hence the "dynamic" in dwm.
This is a powerful concept as it allows you to tag multiple clients, and manipulate those tags (and the associated views) on the fly. Combined with some rules in your config.h, it provides for an incredibly versatile model for managing clients.
See this archived post for an explanation of dwm's tagging/client model.
| How do I get rid of horizontal split in dwm |
1,361,651,451,000 |
I've just got dwm configured to my liking in terms of colors and tags. I'm just looking for one more thing: the ability to have certain applications automatically start with dwm on certain tags.
For example, I have a irc tag, I would like irssi to be run in that tag when I start my machine up. Is this possible? What would it look like in config.h?
|
dwm is a minimalist window manager that just manages windows. What you are asking requires a bit of a workaround. There are two separate, but related steps.
First, set up your rules for irrsi in config.h - specifying the tag in which you would like it to appear and whether it should be floating or not. Something like this will open irssi in the first tag:
{ NULL, NULL, "irssi", 1 << 0, False, -1 },
(explanation of what 1 << 0 means)
If you would like to specify the layout of this tag when dwm opens, you would need to apply the pertag patch and recompile.
The second step is to start the application when you login to X. If you are not using a login manager, you could add an entry to your ~/.xinitrc - something like:
(sleep 5 && xterm -title "irssi" -e irssi ) &
The sleep is to allow X to start and dwm to load: 5 is ample, you can experiment how little you need...
If you are using a login manager, you will have a .desktop file that you can put the commands in.
I prefer a simpler approach using rules and keybinds. So once dwm is open, I just hit, for example, CtrlAltm and mutt opens in tag 3.
You can see my config.h to get a better idea of how this works:
https://bitbucket.org/jasonwryan/dwm-patchset/src/tip/base.config.customizations
| Configure dwm to automatically open applications |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.