共计 1207 个字符,预计需要花费 4 分钟才能阅读完成。
报错内容
● tomcat8.service – LSB: Start Tomcat.
Loaded: loaded (/etc/init.d/tomcat8; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since 五 2018-07-13 11:14:17 CST; 7ms ago
Docs: man:systemd-sysv-generator(8)
Process: 24050 ExecStart=/etc/init.d/tomcat8 start (code=exited, status=1/FAILURE)
7 月 13 11:14:12 kilig systemd[1]: Starting LSB: Start Tomcat….
7 月 13 11:14:12 kilig tomcat8[24050]: * Starting Tomcat servlet engine tomcat8
7 月 13 11:14:17 kilig tomcat8[24050]: …fail!
7 月 13 11:14:17 kilig systemd[1]: tomcat8.service: Control process exited,…=1
7 月 13 11:14:17 kilig systemd[1]: Failed to start LSB: Start Tomcat..
7 月 13 11:14:17 kilig systemd[1]: tomcat8.service: Unit entered failed state.
7 月 13 11:14:17 kilig systemd[1]: tomcat8.service: Failed with result ‘exi…’.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: 处理软件包 tomcat8 (–configure) 时出错:
子进程 已安装 post-installation 脚本 返回错误状态 1
在处理时有错误发生:
tomcat8
E: Sub-process /usr/bin/dpkg returned an error code (1)
解决办法
#解决这个问题需要备份 dpkg 下的 info, 然后自己创建一个新的 info,然后更新,再把新的 info 里的内容拷贝到旧的里面,旧的再改成 info, 在删除
790 sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_old
791 sudo mkdir /var/lib/dpkg/info
792 sudo apt-get update
793 sudo apt-get -f install
794 sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old
795 sudo rm -rf /var/lib/dpkg/info
796 sudo mv /var/lib/dpkg/info_old /var/lib/dpkg/info