-
Download the packages intended for your architecture:
(for most users, this means amd64 if 64bit, or i386 if 32bit Ubuntu is installed) -
(Attempt to) install the packages using
dpkg
:sudo dpkg -i openjdk-7-* libjpeg62-turbo* libfontconfig1* fontconfig-config*
3. Use following command, it will install openjdk-11. Then run command in step 2.
sudo apt --fix-broken install
4. Set openjdk-7 as default
update-java-alternatives --list
sudo update-java-alternatives -s java-1.7.0-openjdk-amd64
5. sudo update-alternatives --config java 选择正确的java
内容转自:https://blog.csdn.net/wanghuasn911/article/details/80155648