警告
本文最后更新于 2023-09-22,文中内容可能已过时。
报错
1
2
3
|
crontab -e [08:40:07]
vim: error while loading shared libraries: libpython3.9.so.1.0: cannot open shared object file: No such file or directory
crontab: "vim" exited with status 127
|
这是因为 vim
编译的时候使用了动态库 libpython3.9.so.1.0
,需要拷贝一份到
1
2
|
cp /home/ops/vim9/local/lib/libpython3.9.so.1.0 /usr/lib
cp /home/ops/vim9/local/lib/libpython3.9.so.1.0 /usr/lib64
|
如果没有 root
权限,则可以通过 alias
来设置 crontab
命令
1
2
|
alias crontab="export VISUAL='export VIMRUNTIME=$HOME/vim9/local/share/vim/vim90; LD_LIBRARY_PATH=$HOME/vim9/local/lib:$LD_LIBRARY_PATH PATH=$HOME/vim9/local/bin:$HOME/vim9/local/node-v16.20.0-linux-x64/bin:$PATH $HOME/vim9/local/bin/vim -u $HOME/vim9/.vimrc'; crontab"
alias crontab="export VISUAL=nvim; crontab"
|