我使用 snap 安装了 alacrrity,除了依赖 ncurses 的程序外,一切运行正常。
这是尝试运行 ranger 时出现的错误:
Traceback (most recent call last):
File "/usr/bin/ranger", line 37, in <module>
sys.exit(ranger.main()) # pylint: disable=no-member
File "/usr/lib/python3/dist-packages/ranger/core/main.py", line 32, in main
from ranger.container.settings import Settings
File "/usr/lib/python3/dist-packages/ranger/container/settings.py", line 13, in <module>
from ranger.gui.colorscheme import _colorscheme_name_to_class
File "/usr/lib/python3/dist-packages/ranger/gui/colorscheme.py", line 30, in <module>
from curses import color_pair
File "/usr/lib/python3.9/curses/__init__.py", line 13, in <module>
from _curses import *
ImportError: /snap/alacritty/46/lib/x86_64-linux-gnu/libtinfo.so.6: version `NCURSES6_TINFO_6.2.current' not found (required by /lib/x86_64-linux-gnu/libncursesw.so.6)
尝试的解决方案
我尝试通过卸载 snap 版本并使用 cargo 安装 alacritty 来解决问题,但尝试通过 cargo 安装时仍然收到错误。
通过 Cargo 安装产生的错误(详细)
= note: /usr/bin/ld: cannot find -lxcb-render
/usr/bin/ld: cannot find -lxcb-shape
/usr/bin/ld: cannot find -lxcb-xfixes
/usr/bin/ld: cannot find -lxkbcommon
collect2: error: ld returned 1 exit status
error: aborting due to previous error
error: failed to compile `alacritty v0.8.0`, intermediate artifacts can be found at `/tmp/cargo-installM4whW6`
Caused by:
could not compile `alacritty`
Caused by:
process didn't exit successfully: `rustc --crate-name alacritty --edition=2018 /home/satoshi/.cargo/registry/src/github.com-1ecc6299db9ec823/alacritty-0.8.0/src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C opt-level=3 -C embed-bitcode=no --cfg 'feature="default"' --cfg 'feature="png"' --cfg 'feature="wayland"' --cfg 'feature="wayland-client"' --cfg 'feature="x11"' --cfg 'feature="x11-dl"' -C metadata=ab8b0d0d1cdd2397 -C extra-filename=-ab8b0d0d1cdd2397 --out-dir /tmp/cargo-installM4whW6/release/deps -L dependency=/tmp/cargo-installM4whW6/release/deps --extern alacritty_config_derive=/tmp/cargo-installM4whW6/release/deps/libalacritty_config_derive-17c14b6ea44434f3.so --extern alacritty_terminal=/tmp/cargo-installM4whW6/release/deps/libalacritty_terminal-4034ba1acc4cb727.rlib --extern bitflags=/tmp/cargo-installM4whW6/release/deps/libbitflags-fbcda053a6bfac89.rlib --extern clap=/tmp/cargo-installM4whW6/release/deps/libclap-460408498e5607b0.rlib --extern copypasta=/tmp/cargo-installM4whW6/release/deps/libcopypasta-06916eb0c874bae2.rlib --extern crossfont=/tmp/cargo-installM4whW6/release/deps/libcrossfont-609597ed06f107d1.rlib --extern dirs=/tmp/cargo-installM4whW6/release/deps/libdirs-a07bba51b33e83a4.rlib --extern fnv=/tmp/cargo-installM4whW6/release/deps/libfnv-a28619bfdf66f6a5.rlib --extern glutin=/tmp/cargo-installM4whW6/release/deps/libglutin-150b7fe9e604710e.rlib --extern libc=/tmp/cargo-installM4whW6/release/deps/liblibc-ddb97e927a42fc60.rlib --extern log=/tmp/cargo-installM4whW6/release/deps/liblog-0396ac74d8458426.rlib --extern notify=/tmp/cargo-installM4whW6/release/deps/libnotify-b26688ee6bd3141c.rlib --extern parking_lot=/tmp/cargo-installM4whW6/release/deps/libparking_lot-cdc77522c28cfb76.rlib --extern png=/tmp/cargo-installM4whW6/release/deps/libpng-eadb368740353f40.rlib --extern serde=/tmp/cargo-installM4whW6/release/deps/libserde-cac1b218644f4a38.rlib --extern serde_json=/tmp/cargo-installM4whW6/release/deps/libserde_json-d9e606a5fcd7b63f.rlib --extern serde_yaml=/tmp/cargo-installM4whW6/release/deps/libserde_yaml-d95a414cc3a6b12e.rlib --extern time=/tmp/cargo-installM4whW6/release/deps/libtime-b2ff8f649c4201a0.rlib --extern unicode_width=/tmp/cargo-installM4whW6/release/deps/libunicode_width-31494655baff8077.rlib --extern wayland_client=/tmp/cargo-installM4whW6/release/deps/libwayland_client-46ab79f816b9d90c.rlib --extern x11_dl=/tmp/cargo-installM4whW6/release/deps/libx11_dl-235bf2e1daba7849.rlib --extern xdg=/tmp/cargo-installM4whW6/release/deps/libxdg-a784dc4d550ca394.rlib --cap-lints allow -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu -L native=/usr/lib/x86_64-linux-gnu` (exit code: 1)