Ubuntu- Reading package lists... Error! 解决方案

Reading package lists... Error!

E: Encountered a section with no Package: header

E: Problem with MergeList /var/lib/apt/lists/AZ.archive.ubuntu.com_ubuntu_dists_natty_main_i18n _Translation-en

E: The package lists or status file could not be parsed or opened.

遇到该问题一般是Ubuntu安装源的问题,需要输入以下2个命令:
sudo rm /var/lib/apt/lists/* -vf
sudo apt-get update

具体解决:
run these two commands and it should get you fixed up.
Code:
sudo rm /var/lib/apt/lists/* -vf
The first command will remove the damaged list and when you run the second command it will replace it with a new list.

Code:
sudo apt-get update
(base) unitree@ubuntu:~$ sudo apt-get install ffmpeg Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: apt-clone archdetect-deb bogl-bterm busybox-static cryptsetup-bin dctrl-tools dpkg-repack gir1.2-timezonemap-1.0 gir1.2-xkl-1.0 grub-common libavresample-dev libavresample4 libdc1394-22-dev libdebian-installer4 libexif-dev libgdcm-dev libgphoto2-dev libgtsam4 libilmbase-dev libmetis-dev libmetis5 libopencv4.2-java libopencv4.2-jni libopenexr-dev libraw1394-dev libtimezonemap-data libtimezonemap1 os-prober python3-icu python3-pam rdate tasksel tasksel-data Use 'sudo apt autoremove' to remove them. The following NEW packages will be installed: ffmpeg 0 upgraded, 1 newly installed, 0 to remove and 156 not upgraded. 1 not fully installed or removed. Need to get 0 B/14.3 MB of archives. After this operation, 52.4 MB of additional disk space will be used. debconf: delaying package configuration, since apt-utils is not installed (Reading database ... 264161 files and directories currently installed.) Preparing to unpack .../ffmpeg_7%3a4.2.7-nvidia_arm64.deb ... Unpacking ffmpeg (7:4.2.7-nvidia) ... Replacing files in old package libavcodec-dev:arm64 (7:4.2.7-0ubuntu0.1) ... Replacing files in old package libavdevice-dev:arm64 (7:4.2.7-0ubuntu0.1) ... Replacing files in old package libavfilter-dev:arm64 (7:4.2.7-0ubuntu0.1) ... Replacing files in old package libavformat-dev:arm64 (7:4.2.7-0ubuntu0.1) ... Replacing files in old package libavresample-dev:arm64 (7:4.2.7-0ubuntu0.1) ... Replacing files in old package libavutil-dev:arm64 (7:4.2.7-0ubuntu0.1) ... dpkg: error processing archive /var/cache/apt/archives/ffmpeg_7%3a4.2.7-nvidia_arm64.deb (--unpack): trying to overwrite '/usr/include/aarch64-linux-gnu/libpostproc/postprocess.h', which is also in package libpostproc-dev:arm64 7:4.2.7-0ubuntu0.1 怎么解决
04-01
The error message you're encountering is from a Linux package manager, typically APT (Advanced Package Tool) which is used by Ubuntu and its derivatives, while `yum` is commonly associated with the RPM (Red Hat Package Manager) system found in CentOS, Fedora, or RHEL. The error "E: Unable to locate package yum" indicates that the system is looking for a package called `yum`, but it can't find it in the repository. Here's what's happening: - `Reading package lists... Done` means APT is gathering information about available packages. - `Building dependency tree... Done` follows by constructing the list of dependencies for the requested package(s). - `Reading state information... Done` checks if the necessary packages are installed or if there are any issues. The problem arises because `yum` is not a package managed by APT; it's a separate package manager used mainly on Red Hat-based systems. To resolve this issue on an Ubuntu system: 1. **Identify the appropriate package manager:** Since you're using APT, you need to install software through it, not `yum`. 2. **Install missing package (if applicable):** If you're trying to install something that should be installed via APT, make sure you're using apt-get or apt instead. 3. **Update the repositories:** Run `sudo apt update` to ensure your package list is up-to-date. 4. **Install a Red Hat package manager (optional):** If you actually need `yum`, consider installing `apt-transport-https` and `epel-release` for accessing the Extra Packages for Enterprise Linux (EPEL) repository, which may have `yum`. Then use `sudo apt install yum` or `sudo yum install yum`.
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值