安装多个版本gcc又卸载一个后,gcc -g选项编译出错:/tmp/cctQ99Ig.s: Assembler messages, ld returned 2 exit status

TP-X200:~$ gcc -g -o abc abc.c
/tmp/cctQ99Ig.s: Assembler messages:
/tmp/cctQ99Ig.s:155: Error: junk at end of line, first unrecognized character is `i'
/tmp/cctQ99Ig.s:164: Error: junk at end of line, first unrecognized character is `i'
/tmp/cctQ99Ig.s:185: Error: junk at end of line, first unrecognized character is `i'
/tmp/cctQ99Ig.s:194: Error: junk at end of line, first unrecognized character is `i'
/tmp/cctQ99Ig.s:443: Error: junk at end of line, first unrecognized character is `d'
/tmp/cctQ99Ig.s:451: Error: junk at end of line, first unrecognized character is `d'


/tmp/cctQ99Ig.s:454: Error: junk at end of line, first unrecognized character is `i'


/tmp/cctQ99Ig.s:457: Error: junk at end of line, first unrecognized character is `i'


工具键冲突,解决方法:把/usr/local/bin里相关的工具删除或改名,如:


sudo mv /usr/local/bin/as /usr/local/bin/as.bak


sudo mv /usr/local/bin/ld /usr/local/bin/ld.bak

你可能感兴趣的:(安装多个版本gcc又卸载一个后,gcc -g选项编译出错:/tmp/cctQ99Ig.s: Assembler messages, ld returned 2 exit status)