LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-11-2013, 10:33 PM   #1
dluco
LQ Newbie
 
Registered: Aug 2013
Location: British Columbia, Canada
Distribution: Crunchbang, Ubuntu, Slackware
Posts: 14

Rep: Reputation: Disabled
/usr/bin/env does not exist


Hi,
I've noticed that even though I have GNU-coreutils installed and the man-page for env exists, I do not actually have the binary.
Has this happened to anyone else, and what can I do to fix this?

Thank you in advance!

NOTE: I am using arch linux
 
Old 09-11-2013, 10:49 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 15,889
Blog Entries: 27

Rep: Reputation: 4669Reputation: 4669Reputation: 4669Reputation: 4669Reputation: 4669Reputation: 4669Reputation: 4669Reputation: 4669Reputation: 4669Reputation: 4669Reputation: 4669
env is not a binary. It's a command for setting an environment or environment variables.

http://www.cyberciti.biz/faq/set-env...ariable-linux/

man pages address more than just programs.

Last edited by frankbell; 09-11-2013 at 10:50 PM.
 
Old 09-11-2013, 11:25 PM   #3
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,361

Rep: Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001
Quote:
Originally Posted by frankbell View Post
env is not a binary. It's a command for setting an environment or environment variables.

http://www.cyberciti.biz/faq/set-env...ariable-linux/
Excuse me, but /usr/bin/env is a binary and should be part of the coreutils package. I would advise reinstalling coreutils.
 
1 members found this post helpful.
Old 09-12-2013, 01:12 AM   #4
SAbhi
Member
 
Registered: Aug 2009
Location: Bangaluru, India
Distribution: CentOS 6.5, SuSE SLED/ SLES 10.2 SP2 /11.2, Fedora 11/16
Posts: 665

Rep: Reputation: Disabled
It should be in /bin/env

coreutils provides two utilities to print environmental properties:

pintenv and env
.

printenv to print the names and value of each
env to run something under a odifies environment.

so do not confuse with them being not listed under /usr/bin/env but it should be inside /bin/env.
 
Old 09-12-2013, 03:06 AM   #5
Berhanie
Senior Member
 
Registered: Dec 2003
Location: phnom penh
Distribution: Fedora
Posts: 1,625

Rep: Reputation: 165Reputation: 165
run which to find out where it is:
Code:
$ which env
/usr/bin/env
 
Old 09-12-2013, 03:16 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394Reputation: 2394
Quote:
Originally Posted by SAbhi View Post
It should be in /bin/env

coreutils provides two utilities to print environmental properties

so do not confuse with them being not listed under /usr/bin/env but it should be inside /bin/env.
Env is part of coreutils but the location depends on the distro you are using.

On both LFS and Debian env is found in /usr/bin, RHEL (6) has env in /bin.

I don't use Arch myself, but a little search shows that env should be in /usr/bin (they use prefix=/usr: arch coreutils diffstat)
 
1 members found this post helpful.
Old 09-12-2013, 10:21 AM   #7
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: CentOS
Posts: 4,361

Rep: Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001Reputation: 2001
Quote:
Originally Posted by druuna View Post
On both LFS and Debian env is found in /usr/bin, RHEL (6) has env in /bin.
In RHEL-6 there should be a symlink: /usr/bin/env -> ../../bin/env

The long standing recommendation for scripting is to begin with the line:
Code:
#!/usr/bin/env xxxx
when the path to the interpreter (xxxx) is not known. Any such scripts would break if env could not be found in /usr/bin.
 
Old 09-12-2013, 10:33 PM   #8
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 15,889
Blog Entries: 27

Rep: Reputation: 4669Reputation: 4669Reputation: 4669Reputation: 4669Reputation: 4669Reputation: 4669Reputation: 4669Reputation: 4669Reputation: 4669Reputation: 4669Reputation: 4669
That you all for straightening me out.
 
Old 10-11-2013, 05:05 PM   #9
dluco
LQ Newbie
 
Registered: Aug 2013
Location: British Columbia, Canada
Distribution: Crunchbang, Ubuntu, Slackware
Posts: 14

Original Poster
Rep: Reputation: Disabled
It turned out that coreutils wasn't installed correctly, but a quick reinstall of that fixed everything. Thank you all for the help and tips!
 
  


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
/usr/bin/env: bad interpreter: Permission denied Master Fox Linux - Software 8 02-09-2012 09:25 AM
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 09:33 AM
RPM dependency failure: /usr/bin/env instead of /bin/env anoosh3000 Linux - Software 1 04-10-2009 06:34 AM
/tools/bin/env ...does not exist! mediolanum Linux From Scratch 12 11-05-2006 02:44 PM
Cannot Enter chroot /usr/bin/env directory not found Zero-0-Effect Linux From Scratch 2 03-13-2004 01:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration