|
|
系统是Debian sid的,系统应该安装gcc的
ubuntu:~# whereis gcc
gcc: /usr/bin/gcc /usr/lib/gcc
查看PATH
ubuntu:~# echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
但是无论是root或一般user,编译文件
都说command not found
后来添加PATH
export PATH=/usr/bin/ PATH
普通用户编译
ubuntu:~$ gcc -o hello hello.c
/usr/bin/ld: cannot open output file hello: Permission denied
collect2: ld returned 1 exit status
root编译,就成功的
我不知道这是为何,何况/usr/bin早已在原来的PATH中了,为何提示not found?
谢谢! |
|