零、根据官网提示,先更新吧。需要几分钟时间。
sudo apt-get update;sudo apt-get dist-upgrade
一、安装下列依赖包:直接复制运行,如果报错,
运行:sudo apt-get -f install,然后再运行下面命令的安装过程
sudo apt-get install python3-pyqt5 -y;sudo apt-get install python3-xlib -y;sudo apt-get install tesseract-ocr -y;sudo apt-get install tesseract-ocr-eng -y;sudo apt-get install tesseract-ocr-chi-sim -y;sudo apt-get install tesseract-ocr-chi-tra -y;sudo apt-get install ttf-wqy-microhei -y;sudo apt-get install python3-pyqt5.qtmultimedia -y;sudo apt-get install python3-pyqt5.qtquick -y;sudo apt-get install python3-pyqt5.qtwebkit -y;sudo apt-get install qtdeclarative5-controls-plugin -y;sudo apt-get install libqt5multimedia5-plugins -y
这是已经制作好的有道词典,下载该软件包可跳过第二步,直接执行第三步最后一行安装即可,
二、官网下载deb包,选择Ubuntu版
Ubuntu-64位 官网有道词典 下载地址
三、下载完后对安装包的控制文件编辑,也就是删除该文件中的依赖关系,因为新版Ubuntu已经没有了,官网说明可以删除不影响功能,可能官网人员懒得为linux版的软件修改了(上一次发布是15年了)
解压deb包:
dpkg -X ./youdao-dict_1.1.0-0-ubuntu_amd64.deb youdao
解压deb包中的control信息(包的依赖就写在这个文件里面):
dpkg -e ./youdao-dict_1.1.0-0-ubuntu_amd64.deb youdao/DEBIAN
进入youdao/DEBIAN目录下,编辑control文件,删除Depends里面的gstreamer0.10-plugins-ugly(包括该项前面的逗号,)
重新打包:
dpkg-deb -b youdao youdao.deb
开始安装该软件包:
sudo dpkg -i youdao.deb
四、输入youdao-dict即可运行有道词典
================================================
补丁:
--- a/youdao-original/DEBIAN/control
+++ b/youdaoDict/DEBIAN/control
@@ -3,7 +3,7 @@ Version: 1.1.0-0~ubuntu
Architecture: amd64
Maintainer: 宋文武
Installed-Size: 13161
-Depends: python3, python3-pyqt5, python3-requests, python3-xlib, tesseract-ocr, tesseract-ocr-eng, tesseract-ocr-chi-sim, tesseract-ocr-chi-tra, python3-pil, ttf-wqy-microhei, python3-lxml, python3-xdg, python3-pyqt5.qtmultimedia, python3-pyqt5.qtquick, python3-pyqt5.qtwebkit, gir1.2-appindicator3-0.1, python3-dbus, qtdeclarative5-controls-plugin, libqt5multimedia5-plugins, gstreamer0.10-plugins-ugly
+Depends: python3, python3-pyqt5, python3-requests, python3-xlib, tesseract-ocr, tesseract-ocr-eng, tesseract-ocr-chi-sim, tesseract-ocr-chi-tra, python3-pil, ttf-wqy-microhei, python3-lxml, python3-xdg, python3-pyqt5.qtmultimedia, python3-pyqt5.qtquick, python3-pyqt5.qtwebkit, gir1.2-appindicator3-0.1, python3-dbus, qtdeclarative5-controls-plugin, libqt5multimedia5-plugins
Section: misc
Priority: extra
Description: Youdao Dict for Linux