LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash:lex:command not found.. (https://www.linuxquestions.org/questions/linux-newbie-8/bash-lex-command-not-found-867755/)

being_dragunov 03-10-2011 01:10 PM

bash:lex:command not found..
 
Can somebody please tell me what does error message signify and what should be done to rectify it...

corp769 03-10-2011 01:33 PM

Can you tell me how you are getting this error? What are you exactly doing to get this?

camorri 03-10-2011 01:35 PM

"Command not found" means the command you tried to run was not found in your path. The path is the directories the system will look through to find the command code, or program, you are asking it to execute. Here is an example, I'll use the command lsusb to illustrate the 'how to fix' part.

Quote:

lsusb
bash: lsusb: command not found
I ran the command lsusb, and got 'command not found'.

Next, i ran the command 'locate' to find the command code.

Quote:

locate lsusb
/usr/sbin/lsusb
/usr/share/man/man8/lsusb.8.lzma
I get two things, the first is the binary code, the second is the man page for the command.

Now I try it again, this time I supply the path to the binary.

Quote:

/usr/sbin/lsusb
Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 04f9:0028 Brother Industries, Ltd Printer
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
This time it runs. I get the expected output.

To find out what your path is, at a command prompt, type 'echo $PATH' without the quotes. The system will print out to your screen ( standard out ) the value stored for path.

Here is mine.

Quote:

echo $PATH
/usr/bin:/bin:/usr/local/bin:/usr/X11R6/bin/:/usr/games:/usr/lib/qt4/bin:/home/cliff/bin:/sbin:/usr/share/xmltv
If you look through the output, /usr/sbin/ is not listed. So the system gave me 'command not found'. It worked when I told it where to look.

knudfl 03-10-2011 02:39 PM

Quote:

.. lex:command not found ..
Probably install the package 'flex'.

"flex" will provide /usr/bin/lex


Please read 'LQ Rules' https://www.linuxquestions.org/linux/rules.html
> > You have a duplicate thread
https://www.linuxquestions.org/quest...6/#post4285848

..


All times are GMT -5. The time now is 12:21 PM.