我对 Linux 还很陌生。我在 vmware 上使用 Xubuntu 14.10,并尝试制作一个可执行文件。我make
在终端中输入了以下内容,但由于以下错误,该过程停止了:
flex -Pfct_pddl lex-fct_pddl.l
make: flex: Command not found
makefile:66: recipe for target 'lex.fct_pddl.c' failed
make: *** [lex.fct_pddl.c] Error 127
据我所知,我需要安装 flex。我尝试这样做:
sudo apt-get install flex
但我得到了这个:
Package flex is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'flex' has no installation candidate
你知道我该怎么做吗?谢谢。
答案1
尝试这个:
打开终端,
按Ctrl++AltT
运行:
sudo -i
nano /etc/apt/sources.list
在打开的文件中,删除其内容并输入以下内容:
deb http://old-releases.ubuntu.com/ubuntu/ utopic main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ utopic main restricted
deb http://old-releases.ubuntu.com/ubuntu/ utopic-updates main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ utopic-updates main restricted
deb http://old-releases.ubuntu.com/ubuntu/ utopic universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ utopic universe multiverse
deb http://old-releases.ubuntu.com/ubuntu utopic-security main restricted
deb-src http://old-releases.ubuntu.com/ubuntu utopic-security main restricted
deb http://old-releases.ubuntu.com/ubuntu/ utopic-backports main restricted universe multiverse
Ctrl+O 保存文件
Ctrl+X 关闭 Nano
继续运行:
apt-get update
apt-get dist-upgrade
apt-get install flex