-1

I need a quick help. I am a beginner so I think my problem is an easy one: Here it goes: I need to install a software application called muscle, and these are the steps from its website:

wget http://www.drive5.com/muscle/downloads3.8.31/muscle3.8.31_i86linux64.tar.gz
tar xzvf muscle3.8.31_i86linux64.tar.gz
mv muscle3.8.31_i86linux64 /usr/local/bin/muscle
chmod a+x /usr/local/bin/muscle

But it is permission denied to /usr/local/bin/. So, I created a directory called /home/users/me/muscle instead of /usr/local/bin/ and continued the steps. Finally, I added the directory to the path.

It did not work. Note: sudo command asks for a password which I do not have.

closed as unclear what you're asking by JakeGould, DrMoishe Pippik, Scott, Pimp Juice IT, Seth Feb 2 '18 at 8:17

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • "Whenever I run my code-script which uses muscle" Please edit and add your code script to the question. – DavidPostill Jan 27 '18 at 17:00
  • By design, only root can write to system folders, users have access to their userspaces only. In Debian and derivatives sudo is used to temporarily gain elevated privileges. – user772515 Jan 27 '18 at 17:11
  • sudo command asks for a password which I do not have – 104078 Jan 27 '18 at 17:13
  • 1
    @104078 Then you cannot install the software and a systems administrator who does have sudo rights needs to install it for you. – JakeGould Jan 27 '18 at 17:38
  • @JakeGould If “installing software” means just running an executable, it does not have to live in /usr/local/bin, but could also be ~/bin, where no super user rights are needed. – slhck Jan 27 '18 at 17:42
4

If you cannot get sudo rights with your user, you cannot write to /usr/local/bin. However, that might not even be necessary, as you can also install programs somewhere else, and amend your $PATH environment variable, which tells your shell where it can find executable programs.

So, I created a directory called /home/users/me/muscle instead of /usr/local/bin/ and continued the steps. Finally, I added the directory to the path. It did not work.

The recommended place to put your own user binaries would be ~/bin, that is /home/<username>/bin.

So copy the file to ~/bin/muscle (create the folder if it does not exist):

mkdir -p ~/bin
mv muscle3.8.31_i86linux64 ~/bin/muscle
chmod +x ~/bin/muscle

Save the file. Now, you need to make sure that your $PATH contains that bin directory.

If there is a file called ~/.bash_profile, edit it, or if it does not exist, simply create it, and add the following:

PATH="$HOME/bin:$PATH"

Now, you need to have your shell reload the paths where it can find binaries. There are several ways to do that, but the easiest is to log out and back in.

When you now echo $PATH, it should contain that bin directory. And when you run muscle, it should find that, because it's in the $PATH.

1

Does your account have a password?  If sudo is asking you for a password, it’s asking for your password.  Enter that and see whether you get permission.

Not the answer you're looking for? Browse other questions tagged or ask your own question.