problem with commands

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
subzero

problem with commands

Post 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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
overthetop

Re: problem with commands

Post 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']
subzero

Re: problem with commands

Post 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
overthetop

Re: problem with commands

Post by overthetop »

What about

Code: Select all

echo $PATH
subzero

Re: problem with commands

Post 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
User avatar
xenopeek
Level 25
Level 25
Posts: 29509
Joined: Wed Jul 06, 2011 3:58 am

Re: problem with commands

Post 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"
Image
subzero

Re: problem with commands

Post by subzero »

Thanks all ^_^
Locked

Return to “Other topics”