天天看點

ubuntu16.04 安裝jdk 錯誤解決

錯誤

$ apt-get install openjdk-9-jdk

Errors were encountered while processing:

/var/cache/apt/archives/openjdk-9-jdk_9~b114-0ubuntu1_amd64.deb

E: Sub-process /usr/bin/dpkg returned an error code (1)

原因

$ sudo dpkg --configure -a

依賴問題

解決

$ sudo dpkg -i --force-overwrite /var/cache/apt/archives/openjdk-9-jdk_9~b114-0ubuntu1_amd64.deb

$ sudo apt-get -f install