我正在尝试安装apache:
sudo apt-get install apache2
我收到了这个错误:
Setting up google-cloud-sdk (132.0.0-0) ... dpkg: error processing
package google-cloud-sdk (--configure): subprocess installed
post-installation script returned error exit status 1 Errors were
encountered while processing: google-cloud-sdk E: Sub-process
/usr/bin/dpkg returned an error code (1)
同样,当我运行sudo dpkg --configure -a
时,我得到以下输出:
Setting up google-cloud-sdk (132.0.0-0) ...
dpkg: error processing package google-cloud-sdk (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
google-cloud-sdk
我该如何解决这个问题?
答案 0 :(得分:1)
相当原始的解决方案,可能会忽略实际问题,但您可以通过添加
跳过安装后脚本exit 0
在文件的第二行
/var/lib/dpkg/info/google-cloud-sdk.postinst
然后重新运行
dpkg --configure -a
答案 1 :(得分:0)
如果您未能安装Java并发现此错误,请使用以下说明:
~$ java -version
~$ javac
~$ sudo dpkg --list | grep -i jdk
~$ sudo apt-get purge oracle-java9-installer
~$ sudo dpkg --list | grep -i jdk
~$ sudo dpkg --list | grep -i pakage_name
~$ sudo apt-get purge package_name
~$ sudo dpkg --list | grep -i package_name