Linux Mint(Ubuntu)上 安裝 效率神器 utools
我的 Windows 系統的筆記本只有 256G 固態,磁盤已經快用滿了,最近想裝個 Linux 玩玩,1 選擇了 Linux Mint,然後就在閒置的移動硬盤上安裝了 Linux Mint 21 cinnamon
。
剛切換到 Linux 還是很不習慣的,還好想起了一直使用的 utools 效率神器,就準備安裝一下。
下面就把踩坑經驗分享出來,希望其他小夥伴少踩坑。
系統信息:
$ cat /etc/linuxmint/info
RELEASE=21
CODENAME=vanessa
EDITION="Cinnamon"
DESCRIPTION="Linux Mint 21 Vanessa"
DESKTOP=Gnome
TOOLKIT=GTK
NEW_FEATURES_URL=https://www.linuxmint.com/rel_vanessa_cinnamon_whatsnew.php
RELEASE_NOTES_URL=https://www.linuxmint.com/rel_vanessa_cinnamon.php
USER_GUIDE_URL=https://www.linuxmint.com/documentation.php
GRUB_TITLE=Linux Mint 21 Cinnamon
$ uname -a
Linux ss-lm 5.15.0-41-generic #44-Ubuntu SMP Wed Jun 22 14:20:53 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
下載 utools 安裝包:
wget https://res.u-tools.cn/version2/utools_3.1.0_amd64.deb
下載之後雙擊文件安裝。
但安裝之後雙擊打開沒有反應。
在終端輸出 utools 命令打開報錯如下:
A JavaScript error occurred in the main process
Uncaught Exception:
Error: libcrypto.so.1.1: æ æ³æ å¼å
±äº«å¯¹è±¡æ件: 没æ é£ä¸ªæ件æç
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1812)
at Module._extensions..node (node:internal/modules/cjs/loader:1205:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:2039)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load (node:electron/js2c/asar_bundle:5:13343)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/opt/uTools/resources/app.asar/node_modules/addon/index.js:18:62)
at Module._compile (node:internal/modules/cjs/loader:1120:14)
意思是缺少 libcrypto.so.1.1
庫文件。
遇到這種問題一般就是谷歌一下,檢索到以下解決方法:
ubuntu 22.04 無法打開 utools
方法有兩種:
- 編譯 openssl-1.1.0,獲取 libcrypto.so.1.1,複製到 /opt/uTools/ 目錄下;
- 安裝 wps 後,用 sudo cp /opt/kingsoft/wps-office/office6/libcrypto.so.1.1 /opt/uTools/命令;
本來 utools 應該自帶這個文件的,現在還得手動去搞,就有點兒 😒。。
第一種還是可以嘗試,第二種直接安裝個 wps 好幾百 M 大小的東西,未免有點兒脫褲子放氣的感覺了。
不過下面我先給出第三種解決方案。
最終解決方式 👍
嘗試系統中哪些目錄有 libcrypto.so.1.1
:
$ sudo find / -name "libcrypto.so.1.1"
/data/software/WindTerm_2.5.0/lib/libcrypto.so.1.1
驚喜的發現,開源終端 WindTerm 2.5.0 安裝包 中包含了這個文件。最近正好將終端切換到 WindTerm,真的香。
需要說明的是,有些同名的
libcrypto.so.1.1
文件,可能用不了,就像下面的踩坑章節所說的:k3s 集羣中鏡像 layer 中的這個文件,拷貝到 utools 目錄下就用不了。
將 WindTerm 安裝包中 WindTerm_2.5.0/lib/libcrypto.so.1.1
的文件拷貝到 /opt/uTools
目錄下:
$ sudo cp /data/software/WindTerm_2.5.0/lib/libcrypto.so.1.1 /opt/uTools/
拷貝完成之後,utools 即可以打開了。
對於終端方案 WindTerm,關鍵時刻還能幫我解決 utools 安裝的棘手問題,真是越用越香了!!😋
🙈 踩坑經驗(可以不看 🙈)
安裝 Wps 太雞肋了,我們安裝低版本 openssl 的方式。
系統自帶的 openssl 版本如下:
$ openssl version
OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
下面進行安裝 openssl 1.1.0。
openssl 1.1.0
先下載安裝包:
$ wget https://www.openssl.org/source/openssl-1.1.0g.tar.gz
執行下面命令又報錯了:
$ ./config -Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)'
Operating system: x86_64-whatever-linux2
"glob" is not exported by the File::Glob module
Can't continue after import errors at ./Configure line 17.
BEGIN failed--compilation aborted at ./Configure line 17.
"glob" is not exported by the File::Glob module
Can't continue after import errors at ./Configure line 17.
BEGIN failed--compilation aborted at ./Configure line 17.
This system (linux-x86_64) is not supported. See file INSTALL for details.
解決方案參考:GmSSL Linux 編譯, 環境搭建
這是由於 Perl package 導致,修改 Configure 文件 參考鏈接
修改後再次嘗試,又出現另一個錯誤:
$ ./config -Wl,--enable-new-dtags,-rpath,'$(LIBRPATH)'
Operating system: x86_64-whatever-linux2
Configuring for linux-x86_64
Configuring OpenSSL version 1.1.0g (0x1010007fL)
no-asan [default] OPENSSL_NO_ASAN
no-crypto-mdebug [default] OPENSSL_NO_CRYPTO_MDEBUG
no-crypto-mdebug-backtrace [default] OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE
no-ec_nistp_64_gcc_128 [default] OPENSSL_NO_EC_NISTP_64_GCC_128
no-egd [default] OPENSSL_NO_EGD
no-fuzz-afl [default] OPENSSL_NO_FUZZ_AFL
no-fuzz-libfuzzer [default] OPENSSL_NO_FUZZ_LIBFUZZER
no-heartbeats [default] OPENSSL_NO_HEARTBEATS
no-md2 [default] OPENSSL_NO_MD2 (skip dir)
no-msan [default] OPENSSL_NO_MSAN
no-rc5 [default] OPENSSL_NO_RC5 (skip dir)
no-sctp [default] OPENSSL_NO_SCTP
no-ssl-trace [default] OPENSSL_NO_SSL_TRACE
no-ssl3 [default] OPENSSL_NO_SSL3
no-ssl3-method [default] OPENSSL_NO_SSL3_METHOD
no-ubsan [default] OPENSSL_NO_UBSAN
no-unit-test [default] OPENSSL_NO_UNIT_TEST
no-weak-ssl-ciphers [default] OPENSSL_NO_WEAK_SSL_CIPHERS
no-zlib [default]
no-zlib-dynamic [default]
Configuring for linux-x86_64
Something wrong with this line:
Program fragment delivered error ``"glob" is not exported by the File::Glob module
at /home/ss/openssl-1.1.0/openssl-1.1.0g/test/build.info at ./Configure line 1613.
原因同上,修改 test/build.info
中, 查找 File::Glob
修改後再次嘗試,又報其他錯誤:
crypto/aes/aes_ecb.c:10:10: fatal error: assert.h: No such file or directory
到這裏心態已經炸,還好 WindTerm 拯救了我。。😄
其他嘗試(可以不看 🙈🙈)
find 查找系統中的 libcrypto.so.1.1
庫文件,發現有些鏡像層中包含這個文件:
$ sudo find / -name libcrypto.so.1.1*
/run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/d98e0f596532d8c123db79487daed96db4f9f97416ca7c9df59c1259717fb07a/rootfs/lib/libcrypto.so.1.1
$ sudo cp /run/k3s/containerd/io.containerd.runtime.v2.task/k8s.io/d98e0f596532d8c123db79487daed96db4f9f97416ca7c9df59c1259717fb07a/rootfs/lib/libcrypto.so.1.1 /opt/uTools/
然後滿心歡喜 😋 將她 拷貝到 utools
目錄下,結果還是不行,又缺少了其他庫文件 😱:
$ utools
A JavaScript error occurred in the main process
Uncaught Exception:
Error: libc.musl-x86_64.so.1: æ æ³æ å¼å
±äº«å¯¹è±¡æ件: 没æ é£ä¸ªæ件æç
at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1812)
at Module._extensions..node (node:internal/modules/cjs/loader:1205:18)
at Object.func [as .node] (node:electron/js2c/asar_bundle:5:2039)
at Module.load (node:internal/modules/cjs/loader:988:32)
at Module._load (node:internal/modules/cjs/loader:829:12)
at c._load (node:electron/js2c/asar_bundle:5:13343)
at Module.require (node:internal/modules/cjs/loader:1012:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/opt/uTools/resources/app.asar/node_modules/addon/index.js:18:62)
at Module._compile (node:internal/modules/cjs/loader:1120:14)
😘 到這裏有了 WindTerm 拯救了我。。😄
交流
請關注 WX 公衆號【進擊雲原生】,瞭解更多諮詢,更有免費資源供您學習
本文由mdnice多平臺發佈