Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un.x-like operating systems. It only takes a minute to sign up. This is a common stumbling block when editing shell files. I would remove any.bashrc and.bashprofile entries you know you don't need and then get a package manager to.
Find the virtualenvwrapper.sh on your hard drive, and instead of /usr/local/bin/, specify the correct directory name. Share improve this answer answered Jun 29 '14 at 13:21. The script reports /usr/bin/env: php: No such file or directory at command. The command= to be command='/bin/sh /path/to. Uc handler app.
Usr Local Bin Virtualenvwrapper.sh No Such File Or Directory Search
Apologies if this is a basic question: I have been trying to setup Python on my laptop by following the tutorial here. Under PIP, VIRTUALENV + VIRTUALENVWRAPPER subtitle, it says And now setup. You are trying to run virtualenv in a directory that has been removed. Youcam 3. Recreate the directory, or use cd to go to an existing directory instead. Share improve this answer.
I've had many properly working virtualenvs, but from today, they give me an error. I've tried reinstalling pip and virtualenvwrapper with easy_install -U, but the error remained.
@klanomath thank you for acknowledging me about the help vampire. See i was just tired of getting homebrew installed in my mac after trying it for 5 days to work on my project. And i'm new to linux/mac. Also never used terminal very extensively to install packages or creating virtual environments.
It can only contain empty lines, comment lines (that start with '#'), and assignment lines of the form name=value. The file should be writable only by the user; it need not be readable by directory becomes accessible.
I believe this was introduced in when this was replaced: RUN apt-get purge -y python.* I believe that command would have left /usr/bin/python in place, but when it effectively replaced with dpkg-divert --rename /usr/bin/py* that scooped up /usr/bin/python which used to be untouched. I don't have any background on the reasoning behind that change so I don't feel confident suggesting what the 'correct' behavior is. Unrelated to the python issue, for 's I suggest just replacing the call to the nodesource installation script with the in your Dockerfile. Thanks for the tip,! About node, I did exactly that to make my build run again.
I'm a bit of a newbie to Python and definitely to virtual environments and Django. I want to install Django but it first recommends a virtualenv / virtualenvwrapper. A video I am watching recommends installing virtualenvwrapper so I just tried this, following these instructions: and I first ran pip install virtualenvwrapper which seemed to work fine. You have a mix of pythons on your machine.
And here is where the things get tricky. The script reports /usr/bin/env: php: No such file or directory at command /bin/composer install (using ). Things are more weird the more I look on that script.
So when i cannot do it, i thought some ppl (who are experts) here might had same issue like me and fixed them, and was just in a small hope to tell me how to fix it. But it looks like i'm a help vampire. THANK YOU, sorry for the troubles. – Sep 19 '17 at 18:47.
Open up the script using the following command: sudo nano /etc/bash_completion.d/virtualenvwrapper This is where the non-existent file is being referenced. Simply replace /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh with /usr/local/bin/virtualenvwrapper_lazy.sh and you should be good to go!
First thing to do to confirm you have a PATH issue is to update your deploy script to log the output of env or at least echo $PATH. I am guessing that the way your deploy script is called, $PATH is not set as you would expect. This debug output will confirm/deny my theory.
They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own. To receive this Complete Guide absolutely free.
I tried to install OpenCV through Homebrew by following the steps given in but after installing virtualenv and virtualenvwrapper I updated the path as given. When I source it I get the following -bash: /usr/local/bin/virtualenvwrapper.sh: No such file or directory I have macOS Sierra 10.12.6, Xcode 8.3.3. Then I closed the Terminal and reopened it. Since then whenever I open the Terminal I see the same line in the second line of the terminal.
See i was just tired of getting homebrew installed in my mac after trying it for 5 days to work on my project. And i'm new to linux/mac. Also never used terminal very extensively to install packages or creating virtual environments.
I can't figure out where the shell is trying to run /usr/bin/virtualenvwrapper.sh upon server login. I want virtualenvwrapper permanently uninstalled, not just removed from the shell instance. I thought I uninstalled it with pip uninstall virtualenvwrapper, but every time I log into the server I get the error -bash: /usr/bin/virtualenvwrapper.sh: No such file or directory, as if there is some sort of leftover artifact. Yesterday I did a lot of tinkering and I can't remember all the changes I made or how I made this happen. Where is it executing the search for virtualenvwrapper.sh? SUPPLEMENTARY INFO $ echo $PATH /usr/lib64/qt-3.3/bin /usr/local/bin/ibm/lsf/9.1/linux2.6-glibc2.3-x86_64/etc /usr/local/bin/ibm/lsf/9.1/linux2.6-glibc2.3-x86_64/bin /usr/local/bin /bin /usr/bin /usr/local/sbin /usr/sbin /sbin/usr/local/bin/CASAVA-1.8.2/bin /usr/local/bin/blast /usr/local/bin/mirdeep2 /usr/local/bin/velvet $ sudo vim ~/.bashrc 1 #.bashrc 2 3 # Source global definitions 4 if [ -f /etc/bashrc ]; then 5. /etc/bashrc 6 fi 7 8 # User specific aliases and functions.
Thanks for posting. The env command will look through a user's $PATH to find the first executable of the given name. So, /usr/bin/env php will look for an executable file called php in any of the directories in the $PATH of the user running it. In your case, that's almost certainly because when running a command over ssh, you don't start a full shell and don't actually read your shell's initialization files. You can check this by running this command (note the single quotes): ssh deployer@XXX.com 'echo $PATH' And comparing the output to what you get if you ssh deployer@XXX.com and then run echo $PATH.
Done Suggested packages: lsb The following NEW packages will be installed: lsb-release 0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded. Need to get 26.5 kB of archives. After this operation, 99.3 kB of additional disk space will be used. Get:1 jessie/main lsb-release all 4.1+Debian13+nmu1 [26.5 kB] Fetched 26.5 kB in 1s (22.7 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package lsb-release. (Reading database. 21490 files and directories currently installed.) Preparing to unpack./lsb-release_4.1+Debian13+nmu1_all.deb.
You should even be able to use the script to troubleshoot/debug any env variables which you may feel are unset etc. Also the handling arguments being passed into ssh will work as well. Note: Its Best Practice to always FULLY QUALIFY the paths for any scripts, executables, etc. Above is just an example which allows the default path to be set to call moo.sh within the moo folder;) That was easy.
An editor can add a BOM on Ubutu. Check your editor settings, not your OS's.
( EDIT ) Another interesting thing that might be of some use. I went into /usr/bin directory and did ls to see if it was there and showed it was, then did find and got bash: /usr/bin/find: No such file or directory (tried /usr/bin/find as well with same results) Some programs that work that are in /usr/bin are xterm, aterm, xmms Some programs that Dont work in /usr/bin are find, locate I deleted the /tools directory recently. Seems to be just base system programs not working. And there not links to /tools but I feel this is prob my prob.
After this operation, 99.3 kB of additional disk space will be used. Get:1 jessie/main lsb-release all 4.1+Debian13+nmu1 [26.5 kB] Fetched 26.5 kB in 1s (22.7 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package lsb-release. (Reading database. 21490 files and directories currently installed.) Preparing to unpack./lsb-release_4.1+Debian13+nmu1_all.deb.
Open up the script using the following command: sudo nano /etc/bash_completion.d/virtualenvwrapper This is where the non-existent file is being referenced. Simply replace /usr/share/virtualenvwrapper/virtualenvwrapper_lazy.sh with /usr/local/bin/virtualenvwrapper_lazy.sh and you should be good to go!
First thing to do to confirm you have a PATH issue is to update your deploy script to log the output of env or at least echo $PATH. I am guessing that the way your deploy script is called, $PATH is not set as you would expect. This debug output will confirm/deny my theory.
They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own. To receive this Complete Guide absolutely free.
I tried to install OpenCV through Homebrew by following the steps given in but after installing virtualenv and virtualenvwrapper I updated the path as given. When I source it I get the following -bash: /usr/local/bin/virtualenvwrapper.sh: No such file or directory I have macOS Sierra 10.12.6, Xcode 8.3.3. Then I closed the Terminal and reopened it. Since then whenever I open the Terminal I see the same line in the second line of the terminal.
See i was just tired of getting homebrew installed in my mac after trying it for 5 days to work on my project. And i'm new to linux/mac. Also never used terminal very extensively to install packages or creating virtual environments.
I can't figure out where the shell is trying to run /usr/bin/virtualenvwrapper.sh upon server login. I want virtualenvwrapper permanently uninstalled, not just removed from the shell instance. I thought I uninstalled it with pip uninstall virtualenvwrapper, but every time I log into the server I get the error -bash: /usr/bin/virtualenvwrapper.sh: No such file or directory, as if there is some sort of leftover artifact. Yesterday I did a lot of tinkering and I can't remember all the changes I made or how I made this happen. Where is it executing the search for virtualenvwrapper.sh? SUPPLEMENTARY INFO $ echo $PATH /usr/lib64/qt-3.3/bin /usr/local/bin/ibm/lsf/9.1/linux2.6-glibc2.3-x86_64/etc /usr/local/bin/ibm/lsf/9.1/linux2.6-glibc2.3-x86_64/bin /usr/local/bin /bin /usr/bin /usr/local/sbin /usr/sbin /sbin/usr/local/bin/CASAVA-1.8.2/bin /usr/local/bin/blast /usr/local/bin/mirdeep2 /usr/local/bin/velvet $ sudo vim ~/.bashrc 1 #.bashrc 2 3 # Source global definitions 4 if [ -f /etc/bashrc ]; then 5. /etc/bashrc 6 fi 7 8 # User specific aliases and functions.
Thanks for posting. The env command will look through a user's $PATH to find the first executable of the given name. So, /usr/bin/env php will look for an executable file called php in any of the directories in the $PATH of the user running it. In your case, that's almost certainly because when running a command over ssh, you don't start a full shell and don't actually read your shell's initialization files. You can check this by running this command (note the single quotes): ssh deployer@XXX.com 'echo $PATH' And comparing the output to what you get if you ssh deployer@XXX.com and then run echo $PATH.
Done Suggested packages: lsb The following NEW packages will be installed: lsb-release 0 upgraded, 1 newly installed, 0 to remove and 4 not upgraded. Need to get 26.5 kB of archives. After this operation, 99.3 kB of additional disk space will be used. Get:1 jessie/main lsb-release all 4.1+Debian13+nmu1 [26.5 kB] Fetched 26.5 kB in 1s (22.7 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package lsb-release. (Reading database. 21490 files and directories currently installed.) Preparing to unpack./lsb-release_4.1+Debian13+nmu1_all.deb.
You should even be able to use the script to troubleshoot/debug any env variables which you may feel are unset etc. Also the handling arguments being passed into ssh will work as well. Note: Its Best Practice to always FULLY QUALIFY the paths for any scripts, executables, etc. Above is just an example which allows the default path to be set to call moo.sh within the moo folder;) That was easy.
An editor can add a BOM on Ubutu. Check your editor settings, not your OS's.
( EDIT ) Another interesting thing that might be of some use. I went into /usr/bin directory and did ls to see if it was there and showed it was, then did find and got bash: /usr/bin/find: No such file or directory (tried /usr/bin/find as well with same results) Some programs that work that are in /usr/bin are xterm, aterm, xmms Some programs that Dont work in /usr/bin are find, locate I deleted the /tools directory recently. Seems to be just base system programs not working. And there not links to /tools but I feel this is prob my prob.
After this operation, 99.3 kB of additional disk space will be used. Get:1 jessie/main lsb-release all 4.1+Debian13+nmu1 [26.5 kB] Fetched 26.5 kB in 1s (22.7 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package lsb-release. (Reading database. 21490 files and directories currently installed.) Preparing to unpack./lsb-release_4.1+Debian13+nmu1_all.deb.
I looked at the tutorial you followed. You should probably make sure at update the command= to be command='/bin/sh /path/to/your/script.'
My error: andytmac:~ admin$ lsvirtualenv andytmac:~ admin$ mkvirtualenv test -bash: /usr/local/bin/virtualenv: /usr/bin/python: bad interpreter: No such file or directory My take is that virtualenv doesn't know where python is. Is this the case? How can I fix this? System is Mac OSX 10.9.4 I have used brew to install python 2.7.8.1. - Python 2.7*something* was on there but I removed it. I can't remember exactly what I did to do that however.
First, to improve jlliagre's answer, you may just use the hexa viewer, which is 'closer' to us programmers than octal viewer: $ head -1 yourscript hd -c You may then see: 00000000 ef bb bf 23 21 2f 62 69 6e 2f 62 61 73 68 0a .#!/bin/bash. 0000000 _ _ _ #! / b i n / b a s h n In which case you the BOM signature stands out: ef bb bf. Second, I can reproduce the exact error message seen by Nicolas by adding a BOM to the shell file. Thirdly, to comment on teknopaul: 'windows' is not at fault, it can happen on any OS. The responsible is the editor used.
Bash: /usr/local/bin/python2.7: No such file or directory virtualenvwrapper.sh: There was a problem running the initialization hooks. If Python could not import the module virtualenvwrapper.hook_loader, check that virtualenvwrapper has been installed for VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python2.7 and that PATH is set properly. $ sudo find / -name virtualenvwrapper.sh [sudo] password for john: /usr/local/bin/virtualenvwrapper.sh export WORKON_HOME=/home/john/.virtualenvs source /usr/local/bin/virtualenvwrapper.sh export PIP_VIRTUALENV_BASE=/home/john/.virtualenvs cffi1.5.2 greenlet0.4.9 pbr1.10.0 readline6.2.4.1 six1.10.0 stevedore1.15.0 virtualenv15.0.2 virtualenv-clone0.2.6 virtualenvwrapper4.7.1.
Welcome to LinuxQuestions.org, a friendly and active Linux Community. You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Note that registered members see fewer ads, and ContentLink is completely disabled once you log in. Are you new to LinuxQuestions.org?
Before this line, there is also called /bin/composer self-update and /bin/composer -V, which both runs correctly and displays correct output. Change the user's shell as the script. /etc/passwd Before: deploy:x:0:0:,:/root:/bin/bash After: deploy:x:0:0:,:/root:/scripts/deploy.sh Example script (make sure execute bit is set chmod +x) /scripts/deploy.sh #!/bin/bash PATH=$PATH:/moo etc. Moo.sh Works everytime!
Unpacking lsb-release (4.1+Debian13+nmu1). Setting up lsb-release (4.1+Debian13+nmu1). Root@403420f42ad8:/# root@403420f42ad8:/# root@403420f42ad8:/# root@403420f42ad8:/# lsb_release bash: /usr/bin/lsb_release: /usr/bin/python: bad interpreter: No such file or directory I'm facing this when running node installer scripts from which use lsb_release to identify the O.S. Setup_6.x: /usr/bin/lsb_release: /usr/bin/python: bad interpreter: No such file or directory. This is also a problem for the lsb-release package: $ docker run -it --rm python:3.5 /bin/bash root@403420f42ad8:/# apt-get update Get:1 jessie/updates InRelease [63.1 kB] Ign jessie InRelease Get:2 jessie/updates/main amd64 Packages [373 kB] Get:3 jessie-updates InRelease [142 kB] Get:4 jessie Release.gpg [2373 B] Get:5 jessie-updates/main amd64 Packages [17.6 kB] Get:6 jessie Release [148 kB] Get:7 jessie/main amd64 Packages [9032 kB] Fetched 9778 kB in 1min 42s (95.6 kB/s) Reading package lists. Done root@403420f42ad8:/# root@403420f42ad8:/# root@403420f42ad8:/# apt-get install -y lsb-release Reading package lists.
This file should be writable only by the user, and need not be readable by anyone else. An alternative way to specify the environment without using the above mentioned method is to use the environment='NAME=value' option in the authorized_keys file. See the man page I linked above for details.
Usr Local Bin Virtualenvwrapper.sh No Such File Or Directory List
That can be bash, sh which is (roughly) a subset so a lot of things won't work, or basically anything compatible - Perl, Python. The line points the system in cases like calling the script directly when it's executable:./myScript.sh It is also often used by editors to recognize the right syntax highlighting when the file has no suffix - for instance, Gedit does that. Solution To override the line, feed the script to Bash as a parameter: bash myScript.sh Or, you can 'source' it, which means, from within a Bash shell, do either of source myScript.sh. MyScript.sh which will work (roughly) as if you pasted the commands yourself.
See the PermitUserEnvironment option in sshd_config(5). So the appropriate place to configure environment for the process is in ~/.ssh/environment where ~ is the home directory for the user that is authenticated to run the command. You also need to check your sshd_config to make sure PermitUserEnvironment is allowed. ~/.ssh/environment format is also specified in the man page of course. This file is read into the environment at login (if it exists).
The solution was to run: sudo apt-get purge virtualenvwrapper Which purged all files related to virtualenvwrapper. The reason I uninstalled it was to use pip's version instead (more up-to-date), which can be installed globally using: sudo pip install virtualenvwrapper. Following, I found that the error occurred when sourcing the virtualenvwrapper bash script, i.e.: source /usr/local/bin/virtualenvwrapper.sh The script references the file /etc/bash_completion.d/virtualenvwrapper as pointed out by arcticfeather.
Okay, there are some wrong lines in your.bashrc file. Please open ~/.bashrc in your favourite text editor and delete all these lines: • All lines that look like this pattern: echo 'export SOMETHING' >> ~/.bashrc This includes e.g.
I would stick to one. In this case I would stick to anaconda. SO edit your path so that anaconda is first on the path before /usr/local/bin and /usr/bin Test by running which python You should get /Users/mark/anaconda3/bin/python If a 2 rather than 3 you have python2,7 and I would switch to 3. You can now use virtulenv etc as they are part of python 3.6 (the current 3.x version) see the python docs You should use venv now not what your tutorial shows However as you are using anaconda you can use conda insteaf of venv, You will find most things already installed (I use conda as it provides prebuilt C libraries when needed, pip etc can be more complex and also could require Xcode) The django install is.
I'm a bit of a newbie to Python and definitely to virtual environments and Django. I want to install Django but it first recommends a virtualenv / virtualenvwrapper. A video I am watching recommends installing virtualenvwrapper so I just tried this, following these instructions: and I first ran pip install virtualenvwrapper which seemed to work fine. You have a mix of pythons on your machine. I would stick to one. In this case I would stick to anaconda. SO edit your path so that anaconda is first on the path before /usr/local/bin and /usr/bin Test by running which python You should get /Users/mark/anaconda3/bin/python If a 2 rather than 3 you have python2,7 and I would switch to 3.
The echo: bad interpreter: No such file or directory is most likely coming from the first line, #! Which is called. Line This line hints the shell what interpreter to use to run the file.
Welcome to LinuxQuestions.org, a friendly and active Linux Community. You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Note that registered members see fewer ads, and ContentLink is completely disabled once you log in. Are you new to LinuxQuestions.org? Visit the following links: If you have any problems with the registration process or your account login, please.
Covers what happens after authentication. Regarding environment: • Reads the file ~/.ssh/environment, if it exists, and users are allowed to change their environment.
Key_load_public: No Such File Or Directory
I agree that the issue arrived with that change, because now the files are named '*.distrib', which seems to be the intention of that commit, but the lsb_release and perhaps some other utilities are expecting to find a python executable at /usr/bin/python. Root@b3742b74c10d:/# ls -l /usr/bin/py*. Lrwxrwxrwx 1 root root 9 Mar 16 2015 /usr/bin/python.distrib -> python2.7 -rwxr-xr-x 1 root root 3785928 Mar 1 2015 /usr/bin/python2.7.distrib lrwxrwxrwx 1 root root 9 Mar 16 2015 /usr/bin/python2.distrib -> python2.7.
Robert Thomspon
Member
Anyway, I cant log into my jails. if I use jexec from the console shell, i get:
jexec returns: jexec: execlp: /usr/local/bin/zsh: No such file or directory
If I SSH into the jail, It acts as if I do not have a login/user.. no combination of users that ive ever used will let me log in.. does there happen to be a default user/login with root privledges that I could use to log into it? (The jail works, i just cant maintain it in any way)