AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / user-849049

HippoMan's questions

Martin Hope
HippoMan
Asked: 2022-06-23 16:58:17 +0800 CST

apt:为了保护我的“apt”配置,我应该备份哪些目录?

  • 0

我目前正在运行Ubuntu 20.04.4 LTS。

在过去的一两年里,我的数据库有四次apt不知何故搞砸了(我不知道是怎么回事),下次我运行apt时apt-get,aptitude我被告知我有超过 1,000 个包被设置为删除。如果我这样做是autoremove为了稍后尝试重新安装,我的整个系统将变得无法使用,因为大多数正常的日常程序将在此期间被删除autoremove。

我没有(!!!)删除顶级桌面包,也没有删除任何顶级包。发生此错误的原因是(???我不知道是什么)以某种方式破坏了apt我机器上数据库的完整性。

我每次都可以通过执行我在“答案”中概述的程序来解决这个问题:修复损坏的 apt **without** 通过“apt autoremove”破坏我的系统

然而,这种情况已经多次发生的事实意味着任何导致这种情况的原因都可能导致它再次发生。如果/当它再次发生时,为了帮助解决这种情况,我想知道以下...

apt如果我想在任何给定时间保留整个系统的状态,我应该备份系统上的哪些目录?我想对所有这些apt相关目录进行定期备份,以便下次发生此错误时,我可以apt通过将所有这些目录恢复到它们上次备份的版本来快速恢复我的环境。

感谢您提供有关我应该备份哪些目录以保持整个apt环境的完整性的任何指示和建议。

apt
  • 2 个回答
  • 67 Views
Martin Hope
HippoMan
Asked: 2022-05-05 16:57:58 +0800 CST

通过“apt autoremove”修复损坏的 apt **无需**破坏我的系统

  • 0

不知何故,我的apt系统在我的 Ubuntu 20.04.4 系统上被淹没了,现在有超过 1,800 个软件包被标记为需要卸载。

这是来自Xubuntu安装,这意味着我正在运行xfce桌面。

我知道解决此类apt问题的推荐方法是apt autoremove重新安装软件包。但是,如果我这样做,我的系统将在 之后完全无法使用apt autoremove,因为我系统的大部分软件包都已被卸载。

我正在寻找一种替代方法来修复我的apt数据库,这样我就不必apt autoremove为了更正apt.

为了说明apt我系统上的状态,这里是我运行的一些东西......

% sudo apt-get install -f
[returns a list of the names of the 1,800 packages]

% sudo dpkg configure -a
[no output]

% sudo aptitude search ?broken
[no output]

% sudo cat /var/log/apt/history.log
Start-Date: 2022-05-04  18:01:54
Requested-By: [MYUSERID] (1000)
Upgrade: networkd-dispatcher:amd64 (2.1-2~ubuntu20.04.2, 2.1-2~ubuntu20.04.3), libvirt-daemon-system-systemd:amd64 (6.0.0-0ubuntu8.15, 6.0.0-0ubuntu8.16), openssl:amd64 (1.1.1f-1ubuntu2.12, 1.1.1f-1ubuntu2.13), librbd1:amd64 (15.2.14-0ubuntu0.20.04.2, 15.2.16-0ubuntu0.20.04.1), google-chrome-stable:amd64 (101.0.4951.41-1, 101.0.4951.54-1), libvirt-clients:amd64 (6.0.0-0ubuntu8.15, 6.0.0-0ubuntu8.16), iio-sensor-proxy:amd64 (2.8-1ubuntu1, 2.8-1ubuntu2), libvirt-daemon-driver-storage-rbd:amd64 (6.0.0-0ubuntu8.15, 6.0.0-0ubuntu8.16), libpq5:amd64 (12.9-0ubuntu0.20.04.1, 12.10-0ubuntu0.20.04.1), ubuntu-drivers-common:amd64 (1:0.9.0~0.20.04.6, 1:0.9.0~0.20.04.7), libvirt-daemon-driver-qemu:amd64 (6.0.0-0ubuntu8.15, 6.0.0-0ubuntu8.16), libvirt-daemon-system:amd64 (6.0.0-0ubuntu8.15, 6.0.0-0ubuntu8.16), libssl-dev:amd64 (1.1.1f-1ubuntu2.12, 1.1.1f-1ubuntu2.13), libssl-doc:amd64 (1.1.1f-1ubuntu2.12, 1.1.1f-1ubuntu2.13), libmysqlclient21:amd64 (8.0.28-0ubuntu0.20.04.3, 8.0.29-0ubuntu0.20.04.2), libmysqlclient21:i386 (8.0.28-0ubuntu0.20.04.3, 8.0.29-0ubuntu0.20.04.2), libvirt0:amd64 (6.0.0-0ubuntu8.15, 6.0.0-0ubuntu8.16), lm-sensors:amd64 (1:3.6.0-2ubuntu1, 1:3.6.0-2ubuntu1.1), libsensors-config:amd64 (1:3.6.0-2ubuntu1, 1:3.6.0-2ubuntu1.1), libssl1.1:amd64 (1.1.1f-1ubuntu2.12, 1.1.1f-1ubuntu2.13), libssl1.1:i386 (1.1.1f-1ubuntu2.12, 1.1.1f-1ubuntu2.13), libsensors5:amd64 (1:3.6.0-2ubuntu1, 1:3.6.0-2ubuntu1.1), libsensors5:i386 (1:3.6.0-2ubuntu1, 1:3.6.0-2ubuntu1.1), librados2:amd64 (15.2.14-0ubuntu0.20.04.2, 15.2.16-0ubuntu0.20.04.1), libvirt-daemon:amd64 (6.0.0-0ubuntu8.15, 6.0.0-0ubuntu8.16)
End-Date: 2022-05-04  18:02:47

% sudo ls -l /etc/apt/sources.list
4 -rw-r--r-- 1 root root 3280 Jan 19 17:24 /etc/apt/sources.list
[note that the file hasn't changed in a few months]

% sudo ls -l /etc/apt/sources.list.d 
total 16
4 -rw-r--r-- 1 root root 190 Jan 19 17:24 google-chrome.list
4 -rw-r--r-- 1 root root 190 Jan 19 17:24 google-chrome.list.save
4 -rw-r--r-- 1 root root  56 Apr 14 11:06 skype-stable.list
4 -rw-r--r-- 1 root root  56 Jan 19 17:24 skype-stable.list.save
[note that none of this has changed recently]

% sudo apt update
Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease                                                                                             
Get:2 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]                                                                            
Hit:3 http://dl.winehq.org/wine-builds/ubuntu focal InRelease                                                                                         
Get:4 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]                                                                          
Get:5 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]                                                                          
Hit:6 http://archive.canonical.com/ubuntu focal InRelease                                                                                             
Hit:7 https://dl.google.com/linux/chrome/deb stable InRelease                                                                 
Get:8 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [278 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [391 kB]      
Get:10 http://us.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [940 B]                     
Get:11 http://us.archive.ubuntu.com/ubuntu focal-backports/main amd64 DEP-11 Metadata [9,568 B]
Get:12 http://us.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [30.8 kB]
Hit:13 https://repo.skype.com/deb stable InRelease                                              
Get:14 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [40.6 kB]
Get:15 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [66.3 kB]
Get:16 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 DEP-11 Metadata [2,464 B]
Fetched 1,155 kB in 2s (555 kB/s)                       
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.

% sudo grep -r "^deb" /etc/apt/ --include=*.list
/etc/apt/sources.list.d/google-chrome.list:deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/skype-stable.list:deb [arch=amd64] https://repo.skype.com/deb stable main
/etc/apt/sources.list.d.save/alex-p-ubuntu-aegisub-focal.list:deb http://ppa.launchpad.net/alex-p/aegisub/ubuntu focal main
/etc/apt/sources.list.d.save/teamviewer.list:deb https://linux.teamviewer.com/deb stable main
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted
/etc/apt/sources.list:deb-src http://us.archive.ubuntu.com/ubuntu/ focal main restricted
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted
/etc/apt/sources.list:deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal universe
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal-updates universe
/etc/apt/sources.list:deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates universe
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal multiverse
/etc/apt/sources.list:deb-src http://us.archive.ubuntu.com/ubuntu/ focal multiverse
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse
/etc/apt/sources.list:deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
/etc/apt/sources.list:deb-src http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://archive.canonical.com/ubuntu focal partner
/etc/apt/sources.list:deb-src http://archive.canonical.com/ubuntu focal partner
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security main restricted
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security universe
/etc/apt/sources.list:deb-src http://security.ubuntu.com/ubuntu focal-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security multiverse
/etc/apt/sources.list:deb-src http://security.ubuntu.com/ubuntu focal-security multiverse
/etc/apt/sources.list:deb http://dl.winehq.org/wine-builds/ubuntu/ focal main

过去我遇到过类似的问题,我在以下帖子的“答案”部分中描述了该问题:apt忘记了超过 1,000 个软件包,并且我无法重新安装……答案以“我想出了如何解决这个问题......”

但是,这似乎是解决此问题的一种 hack-y 方法,我不确定如果我现在运行它会有多可靠。

任何人都可以建议任何其他方法来解决这个问题,sudo apt autoremove而无需我过去使用的那种 hack-y 方法?

非常感谢您提前。

PS:我每天对我的系统进行备份。是否有任何文件或目录可以从我的最新备份中恢复,其中包含apt数据库的非损坏版本?

PPS:我尝试xubuntu-desktop按照以下评论中的说明进行安装。可悲的是,它没有帮助......

% sudo apt install xubuntu-desktop
Reading package lists... Done
Building dependency tree       
Reading state information... Done
xubuntu-desktop is already the newest version (2.233).
xubuntu-desktop set to manually installed.
The following packages were automatically installed and are no longer required:
[list of 1,800 package names, followed by ...]
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

并且所有这些软件包仍然标记为需要卸载。

apt
  • 1 个回答
  • 135 Views
Martin Hope
HippoMan
Asked: 2022-01-13 19:58:55 +0800 CST

Xubuntu:“desktop-file-utils”停止安装

  • -1

在进行了一些软件包安装后,该desktop-file-utils软件包现在无法通过apt和安装aptitude。这是为了Xubuntu 20.04.2.

运行时apt,我现在总是收到此错误:

dpkg: error processing package desktop-file-utils (--configure):
 installed desktop-file-utils package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 desktop-file-utils

我知道我可以清除这个包,但是它的很多依赖项也将被卸载,我的系统很可能变得无法使用。

我不明白是什么导致了这个问题,因为我不知道我可以做些什么来影响这个包。

desktop-file-utils除了清除并使我的系统无法使用之外,还有其他方法可以解决此问题吗?另外,有什么方法可以让我获得有关安装后脚本究竟是如何失败的更详细信息?如果是这样,也许我可以调试它。

提前感谢您的任何建议。

apt
  • 2 个回答
  • 180 Views
Martin Hope
HippoMan
Asked: 2021-07-28 19:19:04 +0800 CST

apt 忘记了超过 1,000 个软件包,我无法重新安装

  • 3

我在跑20.04.2 LTS (Focal Fossa)

aptitude我已经有几天没有跑步了。它总是运行良好,但是当我现在尝试它时,每次运行它时它都会开始给我“e 检查”对话框。当我输入“e”时,它会运行 10-20 分钟,页面顶部会显示以下内容:

open: aaa; closed: bbb; defer: ccc; conflict: ddd

其中 'aaa', 'bbb', 'ccc', 'ddd' 是递增的数值……而 'aaa' 和 'bbb' 快速增加,高达 50,000 以上。

过了一会儿,aptitude简单地退出。

此时,如果我运行dpkg --configure -a,它会快速返回命令提示符,没有错误。但是,当我运行时apt-get install -f,我会得到一个包含 1,000 多个包名称的列表,然后是这个......

Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

这些包中的大多数(实际上可能是所有包)都是我日常使用的物品,它们不应该被删除。

哦,另外,如果我捕获了当我这样做时显示的大量包列表apt-get install -f,并且如果我为每个包名称生成一千个左右apt install PKG的命令然后运行它,我只会得到相同千或-so 为每个命令打包,然后在每次apt install PKG运行后显示相同的“使用 sudo apt autoremove”消息。

不知何故,我的apt缓存似乎已经被冲洗掉了。我不知道是什么原因造成的。

但是,我真的不想花时间去弄清楚为什么会发生这种情况。我只想修复它,以便所有这些软件包再次正确安装并通过apt.

任何人都可以向我指出可以帮助我的文档,或者提出解决方案吗?

非常感谢您提前。

PS:我/etc/apt/sources.list的几个星期没有改变,也没有任何文件在/etc/apt/source.list.d很长一段时间内改变。实际上,/etc/apt自几个月前以来,似乎没有任何变化。

PPS *:这是最后十几行/var/log/apt/history.log...

Start-Date: 2021-07-24  20:01:24
Requested-By: ljz (1000)
Install: linux-headers-5.4.0-80-generic:amd64 (5.4.0-80.90, automatic), linux-modules-5.4.0-80-generic:amd64 (5.4.0-80.90, automatic), linux-headers-5.4.0-80:amd64 (5.4.0-80.90, automatic), linux-image-5.4.0-80-generic:amd64 (5.4.0-80.90, automatic), linux-modules-extra-5.4.0-80-generic:amd64 (5.4.0-80.90, automatic)
Upgrade: networkd-dispatcher:amd64 (2.0.1-1, 2.1-2~ubuntu20.04.1), linux-headers-generic:amd64 (5.4.0.77.80, 5.4.0.80.84), linux-libc-dev:amd64 (5.4.0-77.86, 5.4.0-80.90), libcurl4:amd64 (7.68.0-1ubuntu2.5, 7.68.0-1ubuntu2.6), ruby2.7:amd64 (2.7.0-5ubuntu1.4, 2.7.0-5ubuntu1.5), libsystemd0:amd64 (245.4-4ubuntu3.7, 245.4-4ubuntu3.11), linux-image-generic:amd64 (5.4.0.77.80, 5.4.0.80.84), libsystemd-dev:amd64 (245.4-4ubuntu3.7, 245.4-4ubuntu3.11), python3-pip:amd64 (20.0.2-5ubuntu1.5, 20.0.2-5ubuntu1.6), udev:amd64 (245.4-4ubuntu3.7, 245.4-4ubuntu3.11), ruby2.7-dev:amd64 (2.7.0-5ubuntu1.4, 2.7.0-5ubuntu1.5), ruby2.7-doc:amd64 (2.7.0-5ubuntu1.4, 2.7.0-5ubuntu1.5), libudev1:amd64 (245.4-4ubuntu3.7, 245.4-4ubuntu3.11), systemd-timesyncd:amd64 (245.4-4ubuntu3.7, 245.4-4ubuntu3.11), libxnvctrl0:amd64 (460.73.01-0ubuntu0.20.04.1, 470.57.01-0ubuntu0.20.04.1), libglib2.0-dev-bin:amd64 (2.64.6-1~ubuntu20.04.3, 2.64.6-1~ubuntu20.04.4), libruby2.7:amd64 (2.7.0-5ubuntu1.4, 2.7.0-5ubuntu1.5), systemd-sysv:amd64 (245.4-4ubuntu3.7, 245.4-4ubuntu3.11), libglib2.0-bin:amd64 (2.64.6-1~ubuntu20.04.3, 2.64.6-1~ubuntu20.04.4), libpam-systemd:amd64 (245.4-4ubuntu3.7, 245.4-4ubuntu3.11), libglib2.0-dev:amd64 (2.64.6-1~ubuntu20.04.3, 2.64.6-1~ubuntu20.04.4), libglib2.0-doc:amd64 (2.64.6-1~ubuntu20.04.3, 2.64.6-1~ubuntu20.04.4), systemd:amd64 (245.4-4ubuntu3.7, 245.4-4ubuntu3.11), libnss-systemd:amd64 (245.4-4ubuntu3.7, 245.4-4ubuntu3.11), libglib2.0-data:amd64 (2.64.6-1~ubuntu20.04.3, 2.64.6-1~ubuntu20.04.4), curl:amd64 (7.68.0-1ubuntu2.5, 7.68.0-1ubuntu2.6), linux-generic:amd64 (5.4.0.77.80, 5.4.0.80.84), python-pip-whl:amd64 (20.0.2-5ubuntu1.5, 20.0.2-5ubuntu1.6), libglib2.0-0:amd64 (2.64.6-1~ubuntu20.04.3, 2.64.6-1~ubuntu20.04.4), libcurl3-gnutls:amd64 (7.68.0-1ubuntu2.5, 7.68.0-1ubuntu2.6)
End-Date: 2021-07-24  20:02:46

Start-Date: 2021-07-25  19:31:25
Requested-By: ljz (1000)
Remove: linux-modules-extra-5.4.0-74-generic:amd64 (5.4.0-74.83), linux-modules-extra-5.4.0-73-generic:amd64 (5.4.0-73.82)
End-Date: 2021-07-25  19:31:28

Start-Date: 2021-07-27  18:56:53
Requested-By: ljz (1000)
Upgrade: libaspell15:amd64 (0.60.8-1build1, 0.60.8-1ubuntu0.1), aspell:amd64 (0.60.8-1build1, 0.60.8-1ubuntu0.1), libmysqlclient21:amd64 (8.0.25-0ubuntu0.20.04.1, 8.0.26-0ubuntu0.20.04.2), teamviewer:amd64 (15.19.3, 15.20.3)
End-Date: 2021-07-27  18:57:05

aptitude在 2021 年 7 月 24 日左右工作正常,所以在那之后必须发生任何破坏我的设置的事情。

的输出sudo aptitude search ?broken

iB  anydesk                                                 - The fastest remote desktop software on the market.                
iBA apt                                                     - commandline package manager                                       
iBA aptitude                                                - terminal-based package manager                                    
iBA base-files                                              - Debian base system miscellaneous files                            
iBA base-passwd                                             - Debian base system master password and group files                
iBA bash                                                    - GNU Bourne Again SHell                                            
iBA bsdutils                                                - basic utilities from 4.4BSD-Lite                                  
iB  chromium-common                                         - web browser - common resources used by the chromium packages      
iB  chromium-sandbox                                        - web browser - setuid security sandbox for chromium                
iB  containerd.io                                           - An open and reliable container runtime                            
iBA coreutils                                               - GNU core utilities                                                
iBA dash                                                    - POSIX-compliant shell                                             
iBA debianutils                                             - Miscellaneous utilities specific to Debian                        
iBA diffutils                                               - File comparison utilities                                         
iBA dpkg                                                    - Debian package management system                                  
iBA e2fsprogs                                               - ext2/ext3/ext4 file system utilities                              
iBA fdisk                                                   - collection of partitioning utilities                              
iBA findutils                                               - utilities for finding files--find, xargs                          
iB  google-chrome-stable                                    - The web browser from Google                                       
iBA grep                                                    - GNU grep, egrep and fgrep                                         
iBA gzip                                                    - GNU compression utilities                                         
iBA hostname                                                - utility to set/show the host name or domain name                  
iBA libc-bin                                                - GNU C Library: Binaries                                           
iBA libcurl3-gnutls                                         - easy-to-use client-side URL transfer library (GnuTLS flavour)     
iBA libglib2.0-0                                            - GLib library of C routines                                        
iBA libnss-systemd                                          - nss module providing dynamic user and group name resolution       
iBA libpam-systemd                                          - system and service manager - PAM module                           
iBA libsystemd0                                             - systemd utility library                                           
iBA libudev1                                                - libudev shared library                                            
iBA linux-base                                              - Linux image base package                                          
iBA linux-headers-5.4.0-80-generic                          - Linux kernel headers for version 5.4.0 on 64 bit x86 SMP          
iBA linux-image-5.4.0-80-generic                            - Signed kernel image generic                                       
iBA linux-image-generic                                     - Generic Linux kernel image                                        
iBA linux-modules-extra-5.4.0-80-generic                    - Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP    
iBA login                                                   - system login tools                                                
iBA mount                                                   - tools for mounting and manipulating filesystems                   
iBA ncurses-bin                                             - terminal-related programs and man pages                           
iB  net.downloadhelper.coapp                                - Video DownloadHelper companion app                                
iBA networkd-dispatcher                                     - Dispatcher service for systemd-networkd connection status changes 
iB  ocenaudio                                               - Ocenaudio is a fast, cross-platform audio editor.                 
iB  palemoon                                                - Firefox-based, efficient and easy to use web browser              
iBA perl-base                                               - minimal Perl system                                               
iB  rpi-imager                                              - Raspberry Pi imaging utility                                      
iBA sed                                                     - GNU stream editor for filtering/transforming text                 
iB  signal-desktop                                          - Private messaging from your desktop                               
iB  signal-desktop-beta                                     - Private messaging from your desktop                               
iBA systemd                                                 - system and service manager                                        
iBA systemd-timesyncd                                       - minimalistic service to synchronize local time with NTP servers   
iBA sysvinit-utils                                          - System-V-like utilities                                           
iBA tar                                                     - GNU version of the tar archiving utility                          
iBA util-linux                                              - miscellaneous system utilities                                    
iB  vdpau-va-driver                                         - VDPAU-based backend for VA API                                    
iB  zoom                                                    - Zoom, #1 Video Conferencing and Web Conferencing Service          

还有更多:

% sudo apt update
Hit:1 https://linux.teamviewer.com/deb stable InRelease
Hit:2 https://updates.signal.org/desktop/apt xenial InRelease                                     
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB]                         
Hit:4 http://us.archive.ubuntu.com/ubuntu focal InRelease                                                    
Hit:5 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease                                            
Get:6 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]
Hit:7 http://archive.canonical.com/ubuntu focal InRelease                                
Fetched 214 kB in 1s (178 kB/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.

% sudo apt list --upgradeable
Listing... Done
signal-desktop-beta/xenial 5.11.0-beta.3 amd64 [upgradable from: 5.8.0-beta.1]
signal-desktop/xenial 5.10.0 amd64 [upgradable from: 5.9.0]
ubuntu-advantage-tools/focal-updates 27.2.2~20.04.1 amd64 [upgradable from: 27.1~20.0

% sudo apt-get install -f
Reading package lists...
Building dependency tree...
Reading state information...
The following packages were automatically installed and are no longer required:
  fonts-ubuntu fonts-uralic fotoxx fotoxx-common friendly-recovery ftp gdal-data gegl genisoimage geoclue-2.0 geoip-database
  [ ... more than 100 lines containing more package names ... ]
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.

还有更多...

grep -r "^deb" /etc/apt/ --include=*.list
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted
/etc/apt/sources.list:deb-src http://us.archive.ubuntu.com/ubuntu/ focal restricted main universe multiverse
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal-updates main restricted
/etc/apt/sources.list:deb-src http://us.archive.ubuntu.com/ubuntu/ focal-updates restricted main universe multiverse
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal universe
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal-updates universe
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal multiverse
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal-updates multiverse
/etc/apt/sources.list:deb http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
/etc/apt/sources.list:deb-src http://us.archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
/etc/apt/sources.list:deb http://archive.canonical.com/ubuntu focal partner
/etc/apt/sources.list:deb-src http://archive.canonical.com/ubuntu focal partner
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security main restricted
/etc/apt/sources.list:deb-src http://security.ubuntu.com/ubuntu focal-security restricted main universe multiverse
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security universe
/etc/apt/sources.list:deb http://security.ubuntu.com/ubuntu focal-security multiverse
/etc/apt/sources.list.d/teamviewer.list:deb https://linux.teamviewer.com/deb stable main
/etc/apt/sources.list.d/signal-xenial.list:deb [arch=amd64 signed-by=/usr/share/keyrings/signal-desktop-keyring.gpg] https://updates.signal.org/desktop/apt xenial main

可能的解决方案...

如果我执行以下操作怎么办?...

  1. 跑sudo apt-get install -f >apt-installs
  2. 编辑该文件,删除包名称前后的行,并将“sudo apt install”放在每行的开头
  3. 运行“sudo apt autoremove”
  4. 运行“bash apt-installs”重新安装每个包。

这是第 2 步之后“apt-installs”文件的样子...

sudo apt install accountsservice acpi-support acpid adb alsa-base android-libadb android-libbase android-libboringssl android-libcrypto-utils
sudo apt install android-libcutils android-liblog android-sdk-platform-tools-common apt-rdepends aptdaemon aptdaemon-data apturl apturl-common
sudo apt install aria2 audacious audacious-plugins audacious-plugins-data bind9-dnsutils blueman bluez bluez-cups brltty brltty-x11 brotli
sudo apt install busybox-static byobu catdoc catfish cheese-common cinnamon-desktop-data cinnamon-l10n clang-format-11 clang-tidy-11
sudo apt install clang-tools-11 command-not-found cppcheck cvs dc dctrl-tools debhelper debtree devilspie devilspie2 dh-autoreconf
sudo apt install dh-elpa-helper dh-strip-nondeterminism diffstat distro-info dmz-cursor-theme doc-base docbook-xml dwz efibootmgr elfutils
[ ... etc. ... for more than 100 lines ]

你们怎么想?这可以解决我的问题吗?

更多后续...

经过更多调查后apt,我现在看到sudo apt autoremove确实会卸载所有这些包。那是1000多个包,之后我的系统确实会变得无法使用。而且我不清楚运行所有这些sudo apt install ...命令是否会起作用,因为会卸载很多其他软件。

所以,我还是卡住了。:(

我不想卸载任何软件。我只想让apt缓存恢复可用状态,而不更改任何现有的软件安装。

apt
  • 2 个回答
  • 240 Views
Martin Hope
HippoMan
Asked: 2020-10-25 13:21:49 +0800 CST

如何让基于 snap 的 chromium 访问单独安装的文件系统?

  • 4

我最近从 18.04 版本升级到 Ubuntu 20.04。从那时起,20.04 附带的snap基于- 的浏览器无法访问我单独安装在系统上的分区中的任何项目。chromium/opt

如果我去安装一个非snap基础版本的麻烦chromium,我在 20.04 下没有这个问题。

我不确定,但我认为访问运行 snap 程序的文件系统之外的文件系统的问题可能存在于所有snap基于软件的软件中,而不仅仅是chromium.

如何让chromium所有其他snap基于程序的程序查看我已安装的所有文件系统?

非常感谢。

PS:在我的系统上,/opt通过以下行安装在/etc/fstab...

UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx /opt ext4 defaults,auto 0 0

... x 代替实际有效的 UUID。

PPS:我系统上的所有非基于软件的软件在访问此分区snap上的任何内容时都没有任何问题。/opt

PPPS:参考文章中建议的解决方案并不能解决我的问题,因为我必须改变我的系统(改变安装、路径、脚本等),只是为了让这个残废的,-snap基于chromium它像以前一样工作以前工作。我的目标是完全不改变我长期使用的系统设置,而是简单地安装一个chromium可以以我多年来运行它的方式运行的版本。我现在发布的答案显示了我学会如何做到这一点的方式。发现那个方法去掉snap-based chromium,换成传统的版本后,我用了不超过10分钟就换掉chromium了,让一切都像往常一样运行。

filesystem snap restricted-access 20.04
  • 4 个回答
  • 2118 Views
Martin Hope
HippoMan
Asked: 2020-05-02 07:29:32 +0800 CST

ubuntu-18.4 - 通过 NetworkManager 的多个 IP 地址失败

  • 0

我在 ubuntu-18.4 上,我有 5 个静态 IP 可供我使用。它们具有以下形式...

a.b.c.34
a.b.c.35
a.b.c.36
a.b.c.37
a.b.c.38

我通过指定“手动”在 NetworkManager 小程序中设置了它们,并尝试在 IPV4 屏幕中输入它们中的每一个,如下所示:

Address     Netmask   Gateway
a.b.c.34         24   a.b.c.1
a.b.c.35         24   a.b.c.1
a.b.c.36         24   a.b.c.1
a.b.c.37         24   a.b.c.1
a.b.c.38         24   a.b.c.1

但是,在保存设置然后返回 IPV4 屏幕后,第 2 到第 5 个条目的“网关”值被清除,重新启动我的网络后,只有第一个 IP 地址 (abc34) 处于活动状态。

为了让我的机器响应所有 5 个 IP 地址,我缺少什么?

先感谢您。

PS:我知道 IP 地址是有效且活动的,因为我以前在运行 Ubuntu-16.x 的同一台机器上使用它们。无论我在那台机器上做什么,所有 IP 都在工作(但我忘记了我所做的细节)。但是在将我的机器升级到 ubuntu-18.4 并尝试使用 NetworkManager 后,无法识别第 2 到第 5 个 IP。

后续...

这是一台笔记本电脑,它被用作我的台式机和服务器。这是要求的信息...

# cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
# cat /etc/netplan/*.yaml
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager
# ls -al /etc/systemd/network/
total 8
4 drwxr-xr-x 2 root root 4096 Apr 20  2018 ./
4 drwxr-xr-x 5 root root 4096 Apr 17 00:52 ../

进一步跟进...

该连接称为“Hippo-Wired”。我在这里将高位 IP 八位字节更改为“abc”,并且还匿名化了 uuid、Mac 地址和 DNS 条目。请注意,只有一个 IP 地址。小程序中的第 2 到第 5 个地址未显示。由于某种原因,小程序不接受它们......

# cat Hippo-Wired 
[connection]
id=Hippo-Wired
uuid=tttttttt-uuuu-uuuu-iiii-dddddddddddd
type=ethernet
autoconnect-priority=-999
permissions=
timestamp=1588347775

[ethernet]
mac-address=nn.nn.nn.nn.nn.nn
mac-address-blacklist=

[ipv4]
address1=a.b.c.34/24,a.b.c.1
dns=sss.ttt.uuu.vvv;www.xxx.yyy.zzz;
dns-search=
method=manual

[ipv6]
addr-gen-mode=stable-privacy
dns-search=
ip6-privacy=0
method=auto

会不会是小程序不允许多个 IP 地址使用同一个网关?

network-manager ip
  • 1 个回答
  • 1531 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve