LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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, 02: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, 02:33 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Can you tell me how you are getting this error? What are you exactly doing to get this?
 
Old 03-10-2011, 02:35 PM   #3
camorri
LQ Guru
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 14.1, 14.2
Posts: 5,118

Rep: Reputation: 494Reputation: 494Reputation: 494Reputation: 494Reputation: 494
"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, 03:39 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156Reputation: 3156
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 03:45 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:37 AM
Cygwin problem: lex: Command not found EasyLife Linux - Distributions 1 07-28-2008 11:19 AM
lex: command not found PankajDS Linux - General 5 02-14-2008 04:03 PM
bash: rpm: command not found && sudo: alien: command not found Java_Code Ubuntu 7 07-28-2006 12:57 AM
Compiing php 5 Lex: command not found 1kyle SUSE / openSUSE 1 03-27-2006 08:47 AM


All times are GMT -5. The time now is 11:25 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration