LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-10-2011, 01:10 PM   #1
being_dragunov
LQ Newbie
 
Registered: Mar 2011
Posts: 2

Rep: Reputation: 0
bash:lex:command not found..


Can somebody please tell me what does error message signify and what should be done to rectify it...
 
Old 03-10-2011, 01:33 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
Can you tell me how you are getting this error? What are you exactly doing to get this?
 
Old 03-10-2011, 01:35 PM   #3
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
"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.
 
Old 03-10-2011, 02:39 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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

..

Last edited by knudfl; 03-10-2011 at 02:45 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
lex command not found vincis8 Linux - Newbie 1 10-07-2008 01:37 AM
Cygwin problem: lex: Command not found EasyLife Linux - Distributions 1 07-28-2008 10:19 AM
lex: command not found PankajDS Linux - General 5 02-14-2008 03:03 PM
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-27-2006 11:57 PM
Compiing php 5 Lex: command not found 1kyle SUSE / openSUSE 1 03-27-2006 07:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:54 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration