小编Joh*_*ohn的帖子

如何修复“sudo:无法打开...只读文件系统”?

标题可能不像我希望的那样具有描述性,但想不出更好的。

我服务器的文件系统进入只读状态。我不明白它为什么这样做以及如何解决它。

我可以通过 SSH 连接到服务器,例如在尝试启动 apache2 时,我得到以下信息:

username@srv1:~$ sudo service apache2 start
[sudo] password for username:
sudo: unable to open /var/lib/sudo/username/1: Read-only file system
 * Starting web server apache2                                                                                                                                                                                                               (30)Read-only file system: apache2: could not open error log file /var/log/apache2/error.log.
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
Run Code Online (Sandbox Code Playgroud)

当我尝试重新启动服务器时,我得到:

username@srv1:~$ sudo shutdown -r now
[sudo] password for username:
sudo: unable to open /var/lib/sudo/username/1: Read-only file system
Run Code Online (Sandbox Code Playgroud)

一旦我手动重新启动它,它就会启动而没有任何警告或消息说有问题。

我希望有人能指出我解决这个问题的正确方向。

filesystem restart read-only

193
推荐指数
9
解决办法
100万
查看次数

apt 不安装大多数已知的软件包

我安装了一个全新的 Ubuntu 14.04.03,但遇到了一个我以前从未遇到过的问题。

登录新安装时我做的第一件事是 apt-get update 和 upgrade。然后我想安装 apache2,但我收到一个错误,说我损坏了软件包。 损坏的依赖项/包

我什至不知道我应该从哪里开始寻找,因为我以前从未发生过这种情况。我试过了apt-get autocleanapt-get -f install但它什么也没做。

任何帮助深表感谢!

编辑:

sync-s@sync-s:~$ apt-cache policy apache2 apache2-bin ssl-cert
apache2:
  Installed: (none)
  Candidate: 2.4.7-1ubuntu4.5
  Version table:
     2.4.7-1ubuntu4.5 0
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
apache2-bin:
  Installed: (none)
  Candidate: 2.4.7-1ubuntu4.5
  Version table:
     2.4.7-1ubuntu4.5 0
        500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
ssl-cert:
  Installed: (none)
  Candidate: (none)
  Version table:
Run Code Online (Sandbox Code Playgroud)

尝试安装php5:

sync-s@sync-s:~$ sudo apt-get install php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could …
Run Code Online (Sandbox Code Playgroud)

package-management apt dependencies apache2

2
推荐指数
1
解决办法
5144
查看次数