直接從軟件源中安裝startdic總是失敗。安裝日誌顯示有些依賴庫的版本有問題。於是自己嘗試下從源碼直接編譯。
我的操作系統版本
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
從官網下載3.0.6源碼
http://stardict-4.sourceforge.net/
解壓,然後進入源代碼目錄。
安裝依賴庫
運行 ./configure ,此時肯定會議提示某些庫找不到。
經過一番的嘗試,湊齊了在我的系統上編譯所需要的庫
sudo apt-get install libgtkspell3-3-0 libgtkspell3-3-dev
sudo apt-get install libmysqlclient-dev
sudo apt-get install libespeak1 libespeak-dev
編譯
參考源代碼目錄下的 INSTALL 文件。
./configure --disable-gucharmap --disable-dictdotcn --disable-festival
make -j 4
sudo make install
如果沒出錯的話應該安裝成功了,可以打開終端運行 stardict 看一下是否安裝成功了。
安裝詞典
詞典存放的目錄是: /usr/share/stardict/dic/
如果這個目錄不存在,需要手動創建。
下載詞典:
http://download.huzheng.org/zh_CN/
將下載的詞典解壓後,直接拷貝到詞典存放目錄即可
效果
參考
找不到 mysql_config:
星際譯王官網:
http://stardict-4.sourceforge.net/
Github: https://github.com/huzheng001/stardict-3
還有的更牛比的: https://github.com/goldendict/goldendict
安裝詞典目錄:
https://wiki.ubuntu.org.cn/Stardict