4

I am installing software via the terminal.

One of the installation steps requires to copy some binary files to the /usr/local/bin directory. Using the following command: cp file1 file2 file3 usr/loca/bin I get the following message:

cp: target `usr/local/bin' is not a directory

I also tried sudo but it then asks for the account password. When I try to enter the password, I cannot type anything except press enter. I removed the password from the account but it keeps asking me for the sudo command. What should I do?

Thanks in advance!

3
  • Welcome to AskUbuntu! Your password is being typed normally, it just doesn't show up, see this question. If it isn't the case then there is another issue unfortunately. – Oyibo Jun 2 '13 at 12:53
  • Please post the output of ls -l /usr/local/bin. It sounds like you may have created a file in that location instead of a directory. – Paul Jun 2 '13 at 14:07
  • Posting this output gives me a "total 0" line. So I guess this directory is empty? – Gregory Jun 2 '13 at 15:02
2

If you want to put something in /usr/local/bin/, the command usually is:

sudo cp file /usr/local/bin/

Depending on the source / permissions of the files, you may additionaly need a chmod:

sudo chmod +rx /usr/local/bin/file

It's hard to uninstall or update individual packages from /usr/local/. If it includes libraries, it might even interfere with official packages. Best not to use it in the first place. If it's a software that's available in Ubuntu's package manager (or one of the PPAs), stop whatever you're doing and use that instead (sudo apt-get install software). If there's no ready to use package, the best option is to learn how to build one yourself.

Ubuntu is a very popular distribution. If you Google for something specific, in most cases you'll find someone else has already done the packaging work for you.

2
  • Well, it now says that usr/local/bin is not a directory. I am a total newbie in Ubuntu so forgive me :) – Gregory Jun 2 '13 at 16:27
  • I did it! Thanks folks for your answers! Some slashes are more than just slashes. ;) – Gregory Jun 2 '13 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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