Wednesday, September 15, 2010

Installing Latest Ant on CentOS

To install the latest version of ant (ant-1.7.1-7.jpp5.noarch) from JPackage instead of the version provided by yum (ant-1.6.5-2jpp.2.x86_64). Here are the steps on CentOS 5.3 64-bit system.

1. Download and install JPackage rpm (jpackage-release-5-4.jpp5.noarch.rpm) from JPackage site. This will add jpackage.repo to your /etc/yum.repos.d directory.

2. Use yum to search "ant.", you will see ant.noarch provided by JPackage repo in the list. But right now if you try to install it, the following error would occur.

 
Error: Missing Dependency: /usr/bin/rebuild-security-providers is needed 
by package java-1.4.2-gcj-compat

Check which package is providing rebuild-security-providers.

rpm -q --whatprovides /usr/bin/rebuild-security-providers
jpackage-utils-1.7.3-1jpp.2.el5

jpackage-utils has been installed in the system.

Looks like this RedHat version of jpackage-utils doesn't work with this latest version of ant from JPackage.

Solution:
a. Uninstall jpackage-utils without uninstalling all the dependencies.
[user@localhost] sudo rpm -e --nodeps jpackage-utils-1.7.3-1jpp.2.el5

b. Install jpackage-utils (jpackage-utils-5.0.0-2.jpp5.noarch.rpm) from JPackage.
[user@localhost] sudo rpm -Uvh jpackage-utils-5.0.0-2.jpp5.noarch.rpm

c. Install ant.noarch
[user@localhost] sudo yum install ant.noarch

4 comments:

Jared said...

This worked like a charm for me. Thanks.

Sal said...

The part about "/usr/bin/rebuild-security-providers" was a nightmare until I tumbled unto your page. Thanks very much dude!

Unknown said...

Thanks for your perfect post!

Arjun kumar said...

Excellent post really useful to me.Keep sharing your post with efficient news.
Software Testing Training in chennai | Testing Training chennai | Software Testing institutes in Chennai