Web Hosting Talk







View Full Version : RedHat is hiding something?


Ahmad
06-16-2002, 05:45 AM
When I type 'python' in the command line, red hat tries to specifically call '/usr/bin/python'

It seems that redhat is hiding a bash script somewhere that is named python that calls that script, but I can't find that shell script!

I also heared that redhat have scripts in place to modify the calls to some commands, like a script that will call 'rm' with the '-i'. I thought this might be the same, and I want to know where these scripts are.

This is a snippet from my command line that might be useful:


[root@linux root]# pwd
/root
[root@linux root]# echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin:/root/bin
[root@linux root]# python
bash: /usr/bin/python: No such file or directory
[root@linux root]# s
bash: s: command not found
[root@linux root]#

terrastudios
06-16-2002, 05:47 AM
Not 100% on this one, but what springs to mind is a broken symbolic link

dandanfirema
06-16-2002, 06:30 AM
Not sure if this helps, but try typing

which python

it should tell you what python is being run

Ahmad
06-16-2002, 06:33 AM
Hi terra,

I assume that the broken file/shell is in either /bin , /sbin or /usr/sbin

the problem is I can't find anything called 'python' in any of these directories or in any directory in my path :confused:

Ahmad
06-16-2002, 06:36 AM
Originally posted by dandanfirema
Not sure if this helps, but try typing

which python

it should tell you what python is being run

Thanks dandan,

I checked it out, it can find it in the right place. but when i type 'ptyhon' i get an error message:


[root@linux root]# which python
/usr/local/bin/python
[root@linux root]# python
bash: /usr/bin/python: No such file or directory
[root@linux root]#

dandanfirema
06-16-2002, 06:40 AM
Ok. now type

ls -lah /usr/local/bin/python

it will either look like most other files in the dir or something like

python -> /usr/bin/python

if it is the former, it is probably a broken script
if it is the later, it may be a broken link

Ahmad
06-16-2002, 07:27 AM
Originally posted by dandanfirema
Ok. now type

ls -lah /usr/local/bin/python

it will either look like most other files in the dir or something like

python -> /usr/bin/python

if it is the former, it is probably a broken script
if it is the later, it may be a broken link

/usr/local/bin/python is the actual python binary. When I type is as a full path, it works. The problem is when I type 'python' alone. Eventhough /usr/local/bin is in my path, it keeps telling me that '/usr/bin/python' is not a valid script. There is no '/usr/bin/python' on my box!

ffeingol
06-16-2002, 08:53 AM
Is it possible that you have an alias setup to point to /usr/bin/python? Try typing "alias" and see if it shows up as an alias.

Frank

priyadi
06-16-2002, 10:03 AM
This might sound obvious, but try restarting your shell. :)

admin0
06-16-2002, 12:51 PM
Why not link /usr/local/bin/python to /usr/bin/python ?


That will solve your problem !