Page 1 of 1

problem with commands

Posted: Wed Dec 12, 2012 11:57 am
by subzero
Hi

I don't know where i can write this topic ..

I have problem on mint 14

all commands not working

Example :-
subzero@subzero-N53SV ~ $ cat log.txt
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 21, in <module>
os.execvp("python3", [sys.argv[0]] + sys.argv)
File "/usr/lib/python2.7/os.py", line 344, in execvp
_execvpe(file, args)
File "/usr/lib/python2.7/os.py", line 380, in _execvpe
func(fullname, *argrest)
OSError: [Errno 13] Permission denied


sorry for bad English

Re: problem with commands

Posted: Wed Dec 12, 2012 12:20 pm
by overthetop
Your problem seems to be a python problem. command-not-found is a python program that runs when a command is not found on the system.
Have you installed python manually? What does the command which python return?

Try running the following in the python interpreter:

Code: Select all

me@my-pc ~ $ python
Python 2.7.3 (default, Sep 26 2012, 21:51:14) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-linux2', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/PIL', '/usr/lib/python2.7/dist-packages/gst-0.10', '/usr/lib/python2.7/dist-packages/gtk-2.0', '/usr/lib/python2.7/dist-packages/ubuntu-sso-client']

Re: problem with commands

Posted: Wed Dec 12, 2012 12:22 pm
by subzero
thanks for your answer

same problem

Code: Select all

subzero@subzero-N53SV ~ $ python
Traceback (most recent call last):
  File "/usr/lib/command-not-found", line 21, in <module>
    os.execvp("python3", [sys.argv[0]] + sys.argv)
  File "/usr/lib/python2.7/os.py", line 344, in execvp
    _execvpe(file, args)
  File "/usr/lib/python2.7/os.py", line 380, in _execvpe
    func(fullname, *argrest)
OSError: [Errno 13] Permission denied

Re: problem with commands

Posted: Wed Dec 12, 2012 12:35 pm
by overthetop
What about

Code: Select all

echo $PATH

Re: problem with commands

Posted: Wed Dec 12, 2012 12:55 pm
by subzero

Code: Select all

subzero@subzero-N53SV ~ $ echo $PATH
$PATH:/opt/android-sdk-linux/tools:/opt/android-sdk-linux/platforms:/opt/android-sdk-linux/platform-tools

Re: problem with commands

Posted: Wed Dec 12, 2012 1:01 pm
by xenopeek
So the problem is you have set your PATH to only include these android directories. Hence system commands like cat and python can no longer be found, as you have excluded them from your path. Normally your path would be:

Code: Select all

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
Can you recall what you did, e.g. where did you change the PATH settings. Revert that change.

You can correct the path at least for your terminal with:

Code: Select all

export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"

Re: problem with commands

Posted: Wed Dec 12, 2012 1:03 pm
by subzero
Thanks all ^_^