I need to update Apache Ant on my server.
I downloaded the newest Ant, built it, and (I thought) installed it. But when when I check it says the old version is still installed.
How do I update/replace the previous version of Apache Ant on a CentOS 5.? server?
take care,
lee
As mentioned it's probably getting picked up in your path. Post the output from echo $PATH
To configure your CentOS after installing a new version of Apache Ant, proceed to the following steps:
Locate the directory where the new Ant is located
Set the ANT_HOME environment variable to this directory
Add $ANT_HOME/bin to your PATH
P.S. To modify environment variables, you may edit the /etc/environment file, and reboot, or modify your local .bashrc. Look at your current environment variables by analyzing the output of printenv, e.g., to see the current value of PATH and then add the Ant path to it, e.g.
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/bin:/usr/local/ant/bin
Related
I am trying to install Maven on Linux as I have extracted tar file also in my directory where I wanted to and also setup the environment variables but when I check mvn --version then it complains mvn:command not found.
Can anybody tell me reason.
All of these variables you should set in .bashrc or corresponding file. This way you will have them set for each bash/terminal/shell opened. Try also to go into $M2_HOME/bin directory and run the maven from there. ./mvn --version
I just installed racer using cargo. After installing it say this:
Installing /home/karthik/.cargo/bin/racer
warning: be sure to add `/home/karthik/.cargo/bin` to your PATH to be able to run the installed binaries
How do I do this? Googling didn't help. Also, Should I be setting a PATH variable for cargo bin as well?
Edit: OS is Ubuntu 14.04 and I have super user access
You have to add the cargo bin path to your PATH variable and set the RUST_SRC_PATH in .profile or .bash_profile.
Related unix.stackechange question
There are two steps:
(1) Add the Cargo bin to your PATH variable. You can run $ whereis cargo to find the bin path, and then do $ sudo -H gedit /etc/environment where you can add that new path section to your current PATH variable. You will need to save and close the file (and you can ignore the error message in the terminal during the saving portion) in order for it to take effect.
(2) Run $ rustup component add rust-src to download the necessary Rust source files for you.
At this point Racer should work properly.
This is based on the answer here.
I installed groovy with GVM:
gvm install groovy
But when I say yes to the set 2.4.6 as default version, I get this error:
rm: `/c/Users/<user_name>/.sdkman/candidates/groovy/current' is a directory
ln: `/c/Users/<user_name>/.sdkman/candidates/groovy/current': cannot overwrite direc
tory
Not sure why it's trying to rm the current folder but then create a symbolic link to it. Any ideas what I'm doing wrong?
current should be a symbolic link to the directory of your current version, not a directory itself
Looks like for some reason, it's currently a directory
Try moving current out of the way, and trying again
PS: gvm is now called sdkman and the command is sdk not gvm though gvm still currently works for historic compatibility
From the name it looks like you are on "MinGW" shell. sdkman cannot handle the softlinks in this environment.
Delete current directory and copy the version you want to use. This is not a groovy issue; affects all tools available under sdkman (such as lazybone, grails..)
I have msysgit installed in my PC. I want to change the path of / using environment variables. Currently it is pointing to c:\program files\git. How can I change this?
Note: I am able to change path of ~ directory using HOME environment variable. I am looking for similar solution for this.
The software package that installs git bash is similar to Cygwin (I think it may be based on Cygwin, but I'm not sure of that). It's designed to emulate a UNIX-like environment under Windows.
As far as I know, the location of the / directory (referred to as the root directory) is fixed when you install the software. If you want / to refer to a different location in the Windows filesystem, you'll need to reinstall the software and, if possible, specify a different location. It can't be changed by setting an environment variable.
What exactly are you trying to do? There may be some way to accomplish your goal other than changing the location of /.
I'm trying to compile a piece of software in my home directory (OpenMPI). One of the build dependencies (autoconf) installed on my system is not the newer version asked for by the OpenMPI autogen script. I compiled and installed the newer version of autoconf in my home directory.
Is there anyway for the binary installed in my home directory to "override" the version installed on the system for my session?
I tried setting an alias which works via command line but not for the script used to generate the configure script.
Add the path to the binary you want to override to your $PATH environment variable.
Like PATH=/path/to/binary:$PATH ./compile
Your added path will then be looked up first when trying to find the compile command. It will only be valid for that execution and will not remain after command has returned. You can use export PATH=/path/to/binary/:$PATH and it will be saved for that session.
EDIT: As Eric.J states, you can use which compile which will output the path to the command, just to make sure it's the right one.
You can change the PATH environment variable so that your home directory appears before the system directory, e.g.
PATH=$HOME/bin:$PATH
You can then use the which command to ensure the correct binary is being picked up.