Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This file is needed to run this program. I am new to Mac OS X and its terminal.

I am installing Apache Tomcat, using steps provided through this URL, but when I run


I get the following error:

Cannot find /Users/user/tomcat/bin/
 This file is needed to run this program. 

Whereas already exists at this location.

share|improve this question

migrated from Dec 15 '12 at 9:54

This question came from our site for professional and enthusiast programmers.

What happens if you use ${HOME} in place of /Users/user? – Johnsyweb Dec 15 '12 at 6:18
Your permissions are probably not set right. Paste the output of the following command: ls -al – Diego Basch Dec 15 '12 at 6:40

Check your CATALINA_HOME by doing echo $CATALINA_HOME

This should point to your where tomcat is installed.

Add this line in your ~/.bash_profile and source it.

export CATALINA_HOME=/path/to/tomcat-x.x
share|improve this answer

I know this is an older post, but I've come across this issue, as I have multiple instances of Tomcat on my dev machine, and tend to have them in subdirectories of my user account, to keep them separate from what comes stock with OS X.

I've found it's better to have these sorts of settings self-contained, that is, in a file, for each instance.

So, for example, if John Doe is running Tomcat v7.0.49, from within some directory he's created:


And in that file:

export CATALINA_BASE="/Users/johndoe/Server/app/tomcat-7.0.49"
export CATALINA_HOME="/Users/johndoe/Server/app/tomcat-7.0.49"

This will work, pretty much from anywhere. You're now telling this particular Tomcat instance where to look for itself. Keep in mind, if you have multiple instances of the same Tomcat version in the same directory, you'll need to give each a unique parent folder name.

Also worthy of mention, CATALINA_BASE is optional, and will default to CATALINA_HOME, if you leave it out. Listing both is simply my personal preference.

share|improve this answer

I Googled your error and found the following result from malisphoto:

If you received the error "Cannot find /Library/Tomcat/Home/bin/," you are probably trying to install Tomcat in your home directory Library (~/Library). Either install Tomcat in the root Library (/Library) or point CATALINA_HOME to your home directory Tomcat installation directory, probably something like CATALINA_HOME=/Users/username/Library/Tomcat/Home. A basic installation doesn't require setting CATALINA_HOME or JAVA_HOME for that matter.

If this is not your issue, I would suggest trying to open the file directly from the terminal using that same string of text, to make sure that the file is definitely there.

share|improve this answer
@user1905811 No i have not installed Tomcat in my library directory, Its is being installed under username. I tried running this command as you mentioned CATALINA_HOME=/Users/username/Library/Tomcat/Home but nothing happened . Still i am not able to launch sh – Ankit Dec 20 '12 at 5:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .