실행하면 # apt-get dist-upgrade
다음과 같은 경고/오류가 발생합니다.
WARNING: missing /lib/modules/uname
depmod: ERROR: Bad version passed uname
(2회)
dpkg: warning: version 'uname' has bad syntax: version number does not start with digit
(4회)
모든 것은 인쇄한 후 dist-upgrade 단계에서 발생하므로 Processing triggers for initramfs-tools (0.130ubuntu3.8) ...
그것과 관련이 있는 것 같습니다...
무엇이 잘못되었고 어떻게 해결할 수 있는지 아는 사람이 있나요? 감사해요!
전체 출력은 다음과 같습니다.
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) ...
고쳐 쓰다, "시스템에 있는 /var/lib/initramfs-tools의 내용은 무엇입니까?"라는 의견의 질문에 대한 답변입니다.
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
답변1
문제가 시작되기 며칠 전에 apt-get dist-upgrade를 여러 번 실행했습니다 update-initramfs -k <version> -c
.
uname
어떤 경우에는 (대신) 매개변수로 잘못 사용한 기억이 납니다 `uname -r`
. 이 명령이 경고 및 오류 메시지를 생성하더라도 여전히 uname
작동하는지 모르겠습니다 /var/lib/initramfs-tools
. initramfs-tools를 트리거하는 후속 apt-get dist-upgrade
이벤트에서 잘못된 update-initramfs 명령이 다시 실행됩니다.
그래서 해결책은 2개의 잘못된 uname 관련 항목을 삭제하는 것이라고 생각합니다 /var/lib/initramfs-tools
.