Невозможно установить какие-либо пакеты Ubuntu 18.04 - proUbuntu
Винтажный Клуб для гитаристов
1 голос
/

Я новичок в Ubuntu и уже несколько дней не могу устанавливать новые пакеты. Мне нужно было установить пакет python-tkinter, чтобы я запустил

sudo apt-get install python-tk

и ошибка, которую я получил:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  linux-modules-4.15.0-20-generic
Use 'sudo apt autoremove' to remove it.
Suggested packages:
  tix python-tk-dbg
The following packages will be REMOVED:
  linux-image-4.15.0-20-generic
The following NEW packages will be installed:
  python-tk
0 upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/25.9 kB of archives.
After this operation, 8,183 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 282610 files and directories currently installed.)
Removing linux-image-4.15.0-20-generic (4.15.0-20.21) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-20-generic
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-23-generic
Found initrd image: /boot/initrd.img-4.15.0-23-generic
Found linux image: /boot/vmlinuz-4.15.0-22-generic
Found initrd image: /boot/initrd.img-4.15.0-22-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 8 on /dev/sda2
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 310
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-4.15.0-20-generic (--remove):
 installed linux-image-4.15.0-20-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-4.15.0-20-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Я искал несколько ответов, и результаты были получены с помощью нескольких команд, таких как:

sudo apt-get install -f

и другие подобные команды Затем я наткнулся на эту команду, а также выполнил ее

sudo apt install --reinstall linux-modules-4.15.0-22-generic linux-image-4.15.0-22-generic linux-modules-extra-4.15.0-22-generic

однако на этот раз ошибка была:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  linux-modules-4.15.0-20-generic
Use 'sudo apt autoremove' to remove it.
The following packages will be REMOVED:
  linux-image-4.15.0-20-generic
0 upgraded, 0 newly installed, 3 reinstalled, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 53.6 MB of archives.
After this operation, 8,278 kB disk space will be freed.
Do you want to continue? [Y/n] y
Get:1 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-image-4.15.0-22-generic amd64 4.15.0-22.24 [7,875 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-modules-4.15.0-22-generic amd64 4.15.0-22.24 [12.9 MB]
27% [2 linux-modules-4.15.0-22-generic 5,801 kB/12.9 MB 45%]sudo apt install --reinstall linux-modules-4.15.0-22-generic linux-image-4.15.0-22-generGet:3 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 linux-modules-extra-4.15.0-22-generic amd64 4.15.0-22.24 [32.8 MB]
Fetched 53.6 MB in 58s (923 kB/s)                                        
(Reading database ... 282610 files and directories currently installed.)
Removing linux-image-4.15.0-20-generic (4.15.0-20.21) ...
/etc/kernel/postrm.d/initramfs-tools:
update-initramfs: Deleting /boot/initrd.img-4.15.0-20-generic
/etc/kernel/postrm.d/zz-update-grub:
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.15.0-23-generic
Found initrd image: /boot/initrd.img-4.15.0-23-generic
Found linux image: /boot/vmlinuz-4.15.0-22-generic
Found initrd image: /boot/initrd.img-4.15.0-22-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Found Windows 8 on /dev/sda2
error: out of memory.
error: syntax error.
error: Incorrect command.
error: syntax error.
Syntax error at line 310
Syntax errors are detected in generated GRUB config file.
Ensure that there are no errors in /etc/default/grub
and /etc/grub.d/* files or please file a bug report with
/boot/grub/grub.cfg.new file attached.
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-4.15.0-20-generic (--remove):
 installed linux-image-4.15.0-20-generic package post-removal script subprocess returned error exit status 1
Errors were encountered while processing:
 linux-image-4.15.0-20-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Может кто-нибудь помочь мне? спасибо

Добро пожаловать на сайт proUbuntu, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...