【发布时间】:2017-04-07 12:57:38
【问题描述】:
gcc 6.3.0 版的 Using the GNU Compiler Collection 手册在第 28 页(pdf 的第 42 页)上表明支持语言选项 -x java。在 debian 上尝试这个:
$ gcc -x java HelloWorld.java
gcc: error trying to exec 'ecj1': execvp: No such file or directory
安装似乎是所需的包:
$ sudo apt-get install ecj1
Reading package lists... Done
...
Unpacking ecj1 (3.11.1-1) ...
Setting up ecj1 (3.11.1-1) ...
....
Reading state information... Done
但是,在此之后运行 gcc 时,我收到相同的错误消息。事实上查看/usr/bin,没有安装任何可执行的ecj1,并且运行apt-cache search ecj1 并没有建议任何其他包,而不是我安装的包。
$ gcc --version
gcc (Debian 6.3.0-11) 6.3.0 20170321
$ uname -a
Linux right 4.8.0-1-amd64 #1 SMP Debian 4.8.5-1 (2016-10-28) x86_64 GNU/Linux
关于我还可以尝试什么来让它运行的任何建议?
【问题讨论】: