广告

本站里的文章大部分经过自行整理与测试

2016年5月6日星期五

Fedora 23 - 有道词典

1. 安装 rpmfusion-free 和 rpmfusion-nofree (可以跳过, 不过建议安装这软件库)
http://rpmfusion.org/Configuration

$ su -c 'dnf install http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm'


2. 下载与解压

http://cidian.youdao.com/index-linux.html
http://codown.youdao.com/cidian/linux/youdao-dict_1.1.0-0~amd64.tar.gz
http://codown.youdao.com/cidian/linux/youdao-dict_1.1.0-0~i386.tar.gz

$ cd ~/Downloads
$ wget http://codown.youdao.com/cidian/linux/youdao-dict_1.1.0-0~amd64.tar.gz
$ mkdir youdao
$ mv youdao-dict_1.1.0-0~amd64.tar.gz youdao
$ cd youdao
$ tar zxvf youdao-dict_1.1.0-0~amd64.tar.gz
 

3. 修改源码 (不改也行, 没影响)
 

$ gedit ~/Downloads/youdao/src/dae/daeclient.py

第 31 行:
from PyQt5.Qt import QApplication
改为
from PyQt5.QtWidgets import QApplication


这会安装到 /usr/share/youdao-dict/dae/daeclient.py

4. 安装依赖软件包

$ su

$ dnf install python python3

$ dnf install python-xlib
$ dnf install python3-pip -y


$ pip3 install --upgrade pip
$ pip3 install python3-xlib


$ dnf install python3-requests python3-lxml python3-pillow python3-qt5 python3-qt5-devel
$ dnf install tesseract-langpack-chi_sim tesseract-langpack-chi_tra tesseract-langpack-enm tesseract-devel

$ dnf install qt5-qtgraphicaleffects qt5-qtquickcontrols

5. 安装 youdao

$ su
$ cd ~/Downloads/youdao
$ chmod +x install.sh
$ sh ./install.sh


6. python3-qt5 和 qt5-qtbase 降级到 5.5

$ dnf downgrade python3-qt5-devel --allowerasing
$ dnf downgrade qt5-qtbase-devel --allowerasing
 

$ dnf list installed | grep python3-qt5
python3-qt5.x86_64                     5.5-1.fc23               @fedora        
python3-qt5-devel.x86_64           5.5-1.fc23               @fedora
  
 

$ dnf list installed | grep qt5-qtbase
qt5-qtbase.x86_64                      5.5.0-18.fc23            @fedora        
qt5-qtbase-common.noarch        5.5.0-18.fc23            @fedora        
qt5-qtbase-devel.x86_64            5.5.0-18.fc23            @fedora        
qt5-qtbase-gui.x86_64                5.5.0-18.fc23            @fedora
 


7. 重启后运行 (不要用 root 户口)
$ youdao-dict  

没有评论:

发表评论