Merge pull request #2795 from ictlyh/master

翻译完成 tech/20150518 Linux FAQs with Answers--How to fix 'Encountered a…
This commit is contained in:
geekpi 2015-05-19 17:19:42 +08:00
commit a4803474d0
2 changed files with 14 additions and 14 deletions

View File

@ -1,18 +1,18 @@
Linux FAQs with Answers--How to fix “Encountered a section with no Package: header” error on Raspbian
Linux 有问必答--如何修复 Raspbian 上的 “Encountered a section with no Package: header” 错误
================================================================================
> **Question**: I installed fresh Rasbian on Raspberry Pi. But when I tried to update APT package index by running sudo apt-get update, it throws the following error:
> **问题**: 我在 Raspberry Pi 上安装新版的 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.
> I then cannot install any package on Raspbian. How can I solve this error?
> 之后我不能在 Raspbian 上安装任何软件包。我怎样才能解决这个错误?
![](https://farm8.staticflickr.com/7704/17445484636_05ba81722f_c.jpg)
The error saying "Problem with MergeList /var/lib/dpkg/status" indicates that the status file got corrupted for some reason, and so cannot be parsed. This status file contains information about installed deb packages, and thus needs to be carefully backed up.
错误说 "Problem with MergeList /var/lib/dpkg/status" 表示由于某些原因状态文件损坏了,因此无法解释。这个状态文件包括了已经安装的 deb 软件包的信息,因此需要小心备份。
In this case, since this is freshly installed Raspbian, you can safely remove the status file, and re-generate it as follows.
在这种情况下,由于这是新安装的 Raspbian你可以安全地删除状态文件然后用下面的命令重新生成。
$ sudo rm /var/lib/dpkg/status
$ sudo touch /var/lib/dpkg/status
@ -23,7 +23,7 @@ In this case, since this is freshly installed Raspbian, you can safely remove th
via: http://ask.xmodulo.com/encountered-section-with-no-package-header-error.html
作者:[Dan Nanni][a]
译者:[译者ID](https://github.com/译者ID)
译者:[ictlyh](https://github.com/ictlyh)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出

View File

@ -1,22 +1,22 @@
Linux FAQs with Answers--How to fix “fatal error: security/pam_modules.h: No such file or directory”
Linux 有问必答--如何修复 “fatal error: security/pam_modules.h: No such file or directory”
================================================================================
> **Question**: I was trying to compile a program on [insert your Linux distro], but was getting the following compile error:
> **问题**: 我尝试在 [插入你的 Linux 发行版] 上编译程序,但是出现下面的编译错误:
>
> "pam_otpw.c:27:34: fatal error: security/pam_modules.h: No such file or directory"
>
> How can I fix this error?
> 我怎样才能修复这个错误?
The missing header file 'security/pam_modules.h' is part of development files for libpam, a PAM (Pluggable Authentication Modules) library. Thus to fix this error, you need to install libpam development package, as described below.
缺失的头文件 'security/pam_modules.h' 是 libpam 开发版的一部分,一个 PAM(Pluggable Authentication Modules:插入式验证模块)库。因此要修复这个错误,你需要安装 libpam 开发包,如下所示。
On Debian, Ubuntu or Linux Mint:
对于 Debian、 Ubuntu 或者 Linux Mint:
$ sudo apt-get install libpam0g-dev
On CentOS, Fedora or RHEL:
对与 CentOS、 Fedora 或者 RHEL:
$ sudo yum install gcc pam-devel
Now verify that the missing header file is installed under /usr/include/security.
现在验证缺失的头文件是否安装到了 /usr/include/security。
![](https://farm8.staticflickr.com/7751/16819069693_fa961f0d40_b.jpg)
@ -25,7 +25,7 @@ Now verify that the missing header file is installed under /usr/include/security
via: http://ask.xmodulo.com/fatal-error-security-pam-modules.html
作者:[Dan Nanni][a]
译者:[译者ID](https://github.com/译者ID)
译者:[ictlyh](https://github.com/ictlyh)
校对:[校对者ID](https://github.com/校对者ID)
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](https://linux.cn/) 荣誉推出