openjdk-7-jdk_7u181-2.6.14-1~deb8u1_amd64
1、下载上面网盘中的三个文件至win10硬盘中,如G:\BaiduNetdiskDownload\openjdk7
2、打开ubuntu18.04终端界面,进入/mnt/g/BaiduNetdiskDownload\openjdk7,执行
sudo dpkg -i *.deb
由于子系统精简厉害,所以很多依赖没有安装,上面指令报错后,可执行下面指令安装
sudo apt --fix-broken install
(不推荐单个安装,太慢,单个安装指令:sudo apt-get install libgif4)
3、下载不了老的依赖,可使用下面的源
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# 这个是旧依赖使用
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ trusty main
4、加了上面最后一个源以后,执行sudo apt-cache search openjdk时,发现了openjdk7下载目标了,没有尝试下载,因为我经过上面的步骤已经安装完成了
|