这个星期五,我看到我因为运行原因出于某种原因保留了2个软件包apt-get upgrade
,所以自然地我做了所有没有经验的sysadmin都会做的事情,并卸载了软件包,希望我可以简单地重新安装它们并解决问题。
我不知道,我只是使情况变得更糟。当我尝试重新安装时openjdk-8-jre-headless
,我得到了:
$ apt-get install openjdk-8-jre-headless
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
openjdk-8-jre-headless : Depends: ca-certificates-java but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
我尝试手动升级提到的软件包,但无济于事。
$ apt-get upgrade ca-certificates-java
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... ca-certificates-java is already the newest version.
Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
环顾四周,我在任何地方都没有提到该确切错误的解决方案。
我在重新启动的服务器上使用ElasticSearch,但我应该期望它不会在此时启动。所以现在我没有Java了,我的用户也没有搜索了。这是怎么回事,我该如何解决?