Getting error: /usr/bin/env: ruby: No such file or directory


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Getting error: /usr/bin/env: ruby: No such file or directory
# 8  
Old 09-06-2017
AFAIK: sudo does not allow PATH or any other variables to be inherited from the calling process. It is supposed to execute the login script(s) for that user - in this case root.

Anything else (e.g., LD_LIBRARY_PATH) would compromise security.
# 9  
Old 09-06-2017
RedHat

Quote:
Originally Posted by apmcd47
Is your PATH variable exported? Try
Code:
export PATH

and try again.

Andrew
export PATH was missing which was the problem. This has fixed the problems. Thank you.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Discussion: use "/usr/bin/env" or not

Hi. In thread https://www.unix.com/shell-programming-and-scripting/265878-date-format-problem.html , Aia and I were discussing the usefulness of using #!/usr/bin/env bash (or ksh, or perl, or ...) as the shebang line. The exchange was good, but it was getting beyond the scope or the thread, so I... (4 Replies)
Discussion started by: drl
4 Replies

2. Shell Programming and Scripting

/usr/bin/scp error

I have this scp script running, /usr/bin/scp -r /cerner/mgr --exclude-from=/atg/move_exclude.dat 102.126.112.68:/cerner but am getting an error: --exclude-from=/atg/move_exclude.dat: No such file or directory I am wondering if the syntax is incorrect... I also have additional... (3 Replies)
Discussion started by: Daniel Gate
3 Replies

3. UNIX and Linux Applications

/usr/bin/ld: cannot find -lz error

I am installing lxml module for python on redhat I have installed libxml2 already. When I run for libxslt: ./configure --prefix=libxslt_folder --with-libxml-prefix=libxml2_folder It is ok the I run : make I have error: /usr/bin/ld: cannot find -lz collect2: ld returned 1 exit status I... (4 Replies)
Discussion started by: AIX_30
4 Replies

4. OS X (Apple)

When to use /Users/m/bin instead of /usr/local/bin (& whats the diff?)?

Q1. I understand that /usr/local/bin means I can install/uninstall stuff in here and have any chance of messing up my original system files or effecting any other users. I created this directory myself. But what about the directory I didn't create, namely /Users/m/bin? How is that directory... (1 Reply)
Discussion started by: michellepace
1 Replies

5. Shell Programming and Scripting

!/usr/bin/ksh error

Usually we use !/usr/bin/ksh at the start of the script.But if I am having this stuff in the scripts and calling one script from other its not working.What may be the reason behind it ? xyz.ksh #!/usr/bin/ksh echo "Hi" abc.ksh #!/usr/bin/ksh echo "I am fine" ksh xyz.ksh Its... (4 Replies)
Discussion started by: dr46014
4 Replies

6. UNIX for Advanced & Expert Users

#!/usr/bin/env : perl no such file or directory

hi i have some perl scripts with shebang line as (#! /usr/bin/env perl ) instead of actual absolute path of perl ( i know why its that way ) everything works fine from command line , the problem is when i am trying to run those scripts from web ( local web tool ) it throws error as /usr/bin/env :... (6 Replies)
Discussion started by: zedex
6 Replies

7. AIX

losing /usr/bin directory

I need help figuring out why I lose /usr/bin directory sometimes it goes down 3-4 times a day and I have to link them back using ln - /usr/bin bin I cannot figure out why this is happenning (23 Replies)
Discussion started by: smatherly
23 Replies

8. AIX

nim mksysb error :/usr/bin/savevg[33]: 1016,07: syntax error

-------------------------------------------------------------------------------- Hello, help me please. I am trying to create a mksysb bakup using nim. I am geting this error, how to correct it ? : Command : failed stdout: yes stderr: no... (9 Replies)
Discussion started by: astjen
9 Replies

9. UNIX for Dummies Questions & Answers

/bin/sh: /usr/bin/vi: No such file or directory when doing crontab

I just set up an ftp server with Red Hat 5.2. I am doing the work, I'm baby stepping, but it seems like every step I get stuck. Currently, I'm trying to set up a crontab job, but I'm getting the following message: /bin/sh: /usr/bin/vi: No such file or directory. I see that vi exists in /bin/vi,... (3 Replies)
Discussion started by: kwalter
3 Replies
Login or Register to Ask a Question