我需要解决以下问题
我没有linux的经验,所以请给我简单的解释和代码,以便在命令行中键入并解决问题!
我检查了其他线程,发现了类似的问题,但不尽相同。
问题
manolis@manolis-300-0xx:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
netplan.io
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up grub-efi-amd64-signed (1.93.8+2.02-2ubuntu8.7) ...
Installing for x86_64-efi platform.
Could not prepare Boot variable: No space left on device
grub-install: error: efibootmgr failed to register the boot entry: Input/output error.
dpkg: error processing package grub-efi-amd64-signed (--configure):
installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent processing triggers for shim-signed:
shim-signed depends on grub-efi-amd64-signed; however:
Package grub-efi-amd64-signed is not configured yet.
dpkg: error processing package shim-signed (--configure):
dependency problems - leaving triggers unprocessed
Errors were encountered while processing:
grub-efi-amd64-signed
shim-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)
背景信息
NAME="Ubuntu"
VERSION="18.04.1 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.1 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
manolis@manolis-300-0xx:~$ echo ${BASH_VERSION%%[^0-9.]*}
4.4.19
manolis@manolis-300-0xx:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 1,9G 0 1,9G 0% /dev
tmpfs 387M 2,0M 385M 1% /run
/dev/sda2 916G 207G 663G 24% /
tmpfs 1,9G 61M 1,9G 4% /dev/shm
tmpfs 5,0M 4,0K 5,0M 1% /run/lock
tmpfs 1,9G 0 1,9G 0% /sys/fs/cgroup
/dev/loop0 3,8M 3,8M 0 100% /snap/gnome-system-monitor/51
/dev/loop2 88M 88M 0 100% /snap/core/5742
/dev/loop1 15M 15M 0 100% /snap/gnome-logs/45
/dev/loop4 141M 141M 0 100% /snap/gnome-3-26-1604/70
/dev/loop6 13M 13M 0 100% /snap/gnome-characters/117
/dev/loop7 13M 13M 0 100% /snap/gnome-characters/124
/dev/loop9 140M 140M 0 100% /snap/gnome-3-26-1604/64
/dev/loop10 35M 35M 0 100% /snap/gtk-common-themes/319
/dev/loop8 2,3M 2,3M 0 100% /snap/gnome-calculator/238
/dev/loop5 128K 128K 0 100% /snap/tree/15
/dev/loop11 3,8M 3,8M 0 100% /snap/gnome-system-monitor/54
/dev/loop12 13M 13M 0 100% /snap/gnome-characters/139
/dev/loop13 88M 88M 0 100% /snap/core/5662
/dev/loop3 2,3M 2,3M 0 100% /snap/gnome-calculator/260
/dev/loop14 43M 43M 0 100% /snap/gtk-common-themes/701
/dev/loop15 15M 15M 0 100% /snap/gnome-logs/43
/dev/loop16 15M 15M 0 100% /snap/gnome-logs/40
/dev/loop17 141M 141M 0 100% /snap/gnome-3-26-1604/74
/dev/loop18 88M 88M 0 100% /snap/core/5548
/dev/loop19 2,3M 2,3M 0 100% /snap/gnome-calculator/222
/dev/loop20 3,8M 3,8M 0 100% /snap/gnome-system-monitor/57
/dev/sda1 511M 6,1M 505M 2% /boot/efi
tmpfs 387M 40K 387M 1% /run/user/1000
/dev/sdb1 1,9T 108G 1,8T 6% /media/manolis/Maxtor
tmpfs 387M 16K 387M 1% /run/user/120
manolis@manolis-300-0xx:~$ sudo apt install udo
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
udo
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
1 not fully installed or removed.
Need to get 205 kB of archives.
After this operation, 598 kB of additional disk space will be used.
Get:1 http://it.archive.ubuntu.com/ubuntu bionic/universe amd64 udo amd64 6.4.1-4 [205 kB]
Fetched 205 kB in 0s (1.520 kB/s)
Selecting previously unselected package udo.
(Reading database ... 168775 files and directories currently installed.)
Preparing to unpack .../archives/udo_6.4.1-4_amd64.deb ...
Unpacking udo (6.4.1-4) ...
Setting up udo (6.4.1-4) ...
Setting up grub-efi-amd64-signed (1.93.8+2.02-2ubuntu8.7) ...
Installing for x86_64-efi platform.
Could not prepare Boot variable: No space left on device
grub-install: error: efibootmgr failed to register the boot entry: Input/output error.
dpkg: error processing package grub-efi-amd64-signed (--configure):
installed grub-efi-amd64-signed package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
dpkg: dependency problems prevent processing triggers for shim-signed:
shim-signed depends on grub-efi-amd64-signed; however:
Package grub-efi-amd64-signed is not configured yet.
dpkg: error processing package shim-signed (--configure):
dependency problems - leaving triggers unprocessed
Errors were encountered while processing:
grub-efi-amd64-signed
shim-signed
E: Sub-process /usr/bin/dpkg returned an error code (1)
为什么我拥有所有这些“ / dev / loop”? 如何清理和增加空间:“无法准备启动变量:设备上没有剩余空间”
做对了还是危险的:
rm -r / dev / loop *
祝一切顺利!
答案 0 :(得分:2)
就我而言,Ubuntu 18.04 安装在裸机服务器上,我必须执行以下命令:
apt-get install -y grub-pc 'grub-efi*-'
产生了这种变化:
The following additional packages will be installed:
grub-gfxpayload-lists grub-pc-bin
Suggested packages:
desktop-base
The following packages will be REMOVED:
grub-efi-amd64 grub-efi-amd64-bin grub-efi-amd64-signed shim-signed
The following NEW packages will be installed:
grub-gfxpayload-lists grub-pc grub-pc-bin
此后,错误消失了。
答案 1 :(得分:1)
以下内容在Ubuntu 18.04LTS上对我来说很有效
使用以下命令:使用sudo或以root身份运行
# sudo apt-get purge grub\*
# sudo apt-get install grub-efi
# sudo apt-get autoremove
# sudo update-grub
-或-
# sudo su
输入密码,然后运行
# apt-get purge grub\*
# apt-get install grub-efi
# apt-get autoremove
# update-grub
答案 2 :(得分:1)
我遇到问题
dpkg: error processing package grub-efi-amd64-signed (--configure):
installed grub-efi-amd64-signed package post-installation script subprocess ret
urned error exit status 127
我发现这是由于可以解决安装mokutil
sudo apt-get install -y mokutil
答案 3 :(得分:1)
以上尝试对我没有用。
我遇到类似的错误,不确定发生了什么,但是我的/ etc / default / grub文件在最近的更新中添加了额外的一行:
“ / etc / default / grub” 34L,1279C
在该文件的底部,我将其注释掉,然后一切又对我有用!
答案 4 :(得分:0)
我没有足够的代表来添加评论,但是“ AAA SSS”的回答对我有用。我在AskUbuntu论坛中找到了相同的答案。通过将其粘贴到Google搜索中,我被定向到那里。
Package grub-efi-amd64-signed is not configured yet.
我的情况是从全新安装到18.04 ,然后从升级到18.04,由apt和引导打印的相同错误失败。 “ dpkg -l”报告了这些错误。
iF grub-efi-amd64-signed (1.93.13+2.02-2ubuntu8.12)
iU shim-signed (1.37~18.04.3+15+1533136590.3beb971-0ubuntu1)
答案 5 :(得分:0)
将其作为一个命令运行,并在出现提示时回答y(是):
sudo apt-get purge grub\* ; sudo apt-get install grub-efi ; sudo apt-get autoremove ; sudo update-grub
这是基于AAA SSS给出的答案的更快方法。这对我有用。
答案 6 :(得分:0)
您似乎已在禁用secure boot
的情况下安装了操作系统,但现在已启用它。
确保在BIOS中仍禁用了secure boot
选项。