bash: scp: command not found
2017-12-29 01:16
302 查看
不知道为什么突然之间就变成这样了。不管是往remote server传还是拉,都不行。据说是因为remote server的环境变量里没有scp。
最后发现原来是我在remote server的
当时只是为了加上
然后删掉最后一行
参考:
https://superuser.com/questions/1208028/bash-scp-command-not-found-while-i-do-have-scp-in-path
https://www.linuxquestions.org/questions/linux-newbie-8/bash-scp-command-not-found-920513/
最后发现原来是我在remote server的
/etc/environment加了这么一行:
JAVA_HOME="/usr/lib/jvm/java-8-oracle" PATH=$JAVA_HOME:$PATH
当时只是为了加上
JAVA_HOME环境变量。
然后删掉最后一行
PATH=$JAVA_HOME:$PATH,然后
source /etc/environment即可,scp又可以用了。果然是环境变量的问题。
参考:
https://superuser.com/questions/1208028/bash-scp-command-not-found-while-i-do-have-scp-in-path
https://www.linuxquestions.org/questions/linux-newbie-8/bash-scp-command-not-found-920513/
相关文章推荐
- -bash: scp: command not found
- -bash: scp: command not found问题解决
- scp报错 -bash: scp: command not found
- bash: scp: command not found
- bash: scp: command not found
- bash scp command not found的解决方法
- bash scp command not found的解决方法
- -bash: scp: command not found问题解决
- -bash: scp: command not found 解决方法
- scp报错 -bash: scp: command not found
- bash: scp: command not found问题的解决
- bash: scp: command not found
- scp拷贝文件报错-bash: scp: command not found
- scp拷贝文件报错-bash: scp: command not found
- bash: scp: command not found的原因及解决办法
- -bash: scp: command not found问题解决
- scp命令报错-bash: scp: command not found
- -bash: scp: command not found问题解决
- bash:chkconfig:command not found
- -bash: nginx: command not found