/usr/bin/ld:cannot open output file a.out: Permission denied collect2: ld returned 1 exit status

来源:互联网 发布:android 数据缓存框架 编辑:程序博客网 时间:2024/06/05 20:03

今天运行多进程间通信之消息队列的可执行程序时,遇到了段错误,然后我想再次编译源码时就报错:

/usr/bin/ld: cannot open output file a.out: Permission denied
collect2: ld returned 1 exit status


我的可执行程序文件名加a.out,这是因为什么原因呢?翻译过来是这样的:

/ usr/bin/ld:不能打开输出文件a。:拒绝访问

collect2:ld返回1退出状态


这是因为我运行的是个多进程的程序,发生了错误,只退出了一个进程,还有一个进程在执行,所以用ps命令查看你的进程号ID,用kill命令杀死即可。


阅读全文
0 0
原创粉丝点击