歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux系統入門學習:修復 Rasbian 上的 “Encountered a section with no Package: h

Linux系統入門學習:修復 Rasbian 上的 “Encountered a section with no Package: h

日期:2017/2/28 14:00:48   编辑:Linux教程

問題: 我在樹莓派上安裝新版的 Rasbian。但當我使用 sudo apt-get update 命令更新 APT 軟件包索引的時候,它拋出下面的錯誤:

E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/dpkg/status
E: The package lists or status file could not be parsed or opened.

之後我不能在 Raspbian 上安裝任何軟件包。我怎樣才能解決這個錯誤?

這個錯誤說 "Problem with MergeList /var/lib/dpkg/status" 表示由於某些原因狀態文件損壞了,因此無法解析。這個狀態文件包括了已經安裝的 deb 軟件包的信息,因此需要小心備份。

在這種情況下,由於這是新安裝的 Raspbian,你可以安全地刪除狀態文件,然後用下面的命令重新生成。

  1. $ sudo rm /var/lib/dpkg/status
  2. $ sudo touch /var/lib/dpkg/status
  3. $ sudo apt-get update

在(Raspberry Pi)樹莓派上安裝NodeJS http://www.linuxidc.com/Linux/2015-01/111714.htm

Raspberry Pi 樹莓派上安裝Weston http://www.linuxidc.com/Linux/2013-06/86685.htm

用於Raspberry Pi 的Linux 操作系統已經可用 http://www.linuxidc.com/Linux/2012-03/56058.htm

Raspberry Pi(樹莓派)試用小記 http://www.linuxidc.com/Linux/2013-10/91008.htm

Raspberry Pi(樹莓派)的安裝、配置IP及軟件源等入門 http://www.linuxidc.com/Linux/2013-10/91009.htm


via: http://ask.xmodulo.com/encountered-section-with-no-package-header-error.html

作者:Dan Nanni 譯者:ictlyh 校對:wxy

本文由 LCTT 原創翻譯,Linux中國 榮譽推出

Copyright © Linux教程網 All Rights Reserved