如何解决这个依赖性错误?

如何解决这个依赖性错误?

我正在尝试安装google-cloud-sdk,但出现异常:

(base) jinggu@jinggu-MS-7B79:~$ sudo apt-get install google-cloud-sdk
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:
 google-cloud-sdk : Depends: python2.7 but it is not going to be installed
                    Recommends: python-crcmod but it is not going to be installed
 linux-image-generic-hwe-18.04 : Depends: linux-image-5.0.0-32-generic but it is not going to be installed
 linux-modules-extra-5.0.0-32-generic : Depends: linux-image-5.0.0-32-generic but it is not going to be installed or
                                                 linux-image-unsigned-5.0.0-32-generic but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

我试过了apt --fix-broken install,但还是不起作用。

可能的原因是/boot分区存储空间不足。我该怎么办/boot?如果直接删除,我应该删除哪些文件?以下是/boot

(base) jinggu@jinggu-MS-7B79:/boot$ ls
config-4.18.0-15-generic  grub                          lost+found      memtest86+_multiboot.bin      vmlinuz-4.18.0-15-generic
config-5.0.0-31-generic   initrd.img-4.18.0-15-generic  memtest86+.bin  System.map-4.18.0-15-generic  vmlinuz-5.0.0-31-generic
efi                       initrd.img-5.0.0-31-generic   memtest86+.elf  System.map-5.0.0-31-generic

谢谢您的任何建议。

答案1

将 google 软件包源添加到你的源列表中

echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list

相关内容