我正在尝试根据https://docs.openiam.com/docs-4.2.1.3/appendix/2-openssl我停留在最后一步。
我必须重新加载环境变量,但它不起作用:
letho@ubuntu:/$ source /etc/environment
bash: :/usr/local/ssl/bin: No such file or directory
letho@ubuntu:/$ sudo source /etc/environment
sudo: source: command not found
letho@ubuntu:/$ sudo -s
root@ubuntu:/# source /etc/environment
bash: :/usr/local/ssl/bin: No such file or directory
我担心我在尝试解决这个问题时可能会碰到一些错误的事情:libssl.so.3: cannot open shared object file: No such file or directory
答案1
cat /etc/environment
检查...的输出:/usr/local/ssl/bin
似乎单独悬在该文件中的环境变量的引用赋值字符串之外PATH
,但它不应该......例如这样的:
$ cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin" :/usr/local/ssl/bin
编辑该文件并将内容放入:/usr/local/ssl/bin
引号中,如下所示:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/local/ssl/bin"
然后,保存文件,它就可以工作了。