make: flex: Comando não encontrado

1

Sou muito novo no Linux. Eu estou usando o Xubuntu 14.10 no VMware e estou tentando fazer um executável. Eu digitei make no terminal, mas o processo parou por causa do erro:

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

Pelo que entendi, preciso instalar o flex. Eu tentei ir com isso:

sudo apt-get install flex

mas eu tenho isso:

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

Alguma ideia do que devo fazer? Obrigado.

    
por Gianluca Massimiani 10.12.2016 / 15:04

1 resposta

1

Tente isto:

Abra um terminal

Pressione Ctrl + Alt + T

Execute:

sudo -i
nano /etc/apt/sources.list

No arquivo aberto, exclua seu conteúdo e coloque isso:

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 Salvar arquivo

Ctrl + X Fechar o Nano

Continue em execução:

apt-get update
apt-get dist-upgrade
apt-get install flex
    
por kyodake 10.12.2016 / 15:19