Jump to content

Ant root problem


Recommended Posts

Hi , i have a problem with ANT. when i try to run it from root i get a "bash: ant: command not found

2 message but when i run it from normal mode it's fine.

 

i have the following entry in my .bashrc file, where am i going wrong?

 

export PATH="$PATH:/usr/local/apache-ant-1.6.5/bin:."

 

 

 

 

 

 

.

Edited by homerjj
Link to comment
Share on other sites

is that entry in your bashrc file already existing when you started the terminal wherein the error occurs? if not then you have source it again so the changes will take effect.

 

$ . $HOME/.bashrc

 

if it was present then it probably is a permission problem. check the following:

 

- make sure that /usr/local/apache-ant-1.6.5/bin exists.

- make sure that /usr/local/apache-ant-1.6.5/bin and all its parent directories have read and execute permission for your current user.

- make sure that the binaries/executables in /usr/local/apache-ant-1.6.5/bin are executable by your user.

 

and for good measure define a "ANT_HOME" variable that points to "/usr/local/apache-ant-1.6.5/bin".

 

one last thing, remove that trailing period on your path. it is a security risk and prepending your command with "./" (if they reside on the current directory) is good practice to make you subconciously aware that the command you are executing are where they are supposed to be.

 

ciao!

Edited by ramfree17
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...