0

I need to install netcdf-openmpi-devel on Red Hat 6. The problem is that this is not provided by the repositories I have: redhat and epel. I already tried downloading several fedora rpms, but for almost all of them, it's not possible to verify their keys (doing rpm -K package). I was able to get one key for one of the rpms, but then it shows that I don't have the required dependencies like:

netcdf-openmpi, which is kind of what I am trying to install.

Is there another way to install this?

Thanks for your help!

John
  • 1
  • 2

1 Answers1

0

The cleanest approach is to build an RPM package against the RHEL6 package set. This will make sure that all dependencies are satisfied. To do this, taking advantage of already existing packages, you can clone the Fedora netcdf package files from [1] and then build the package with mock, using rpmbuild (see [2]) or, actually better, mock (see [3]).

You might encounter the situation where a build dependency is not available in the rhel or epel repos. You can then again clone the respective package files from the Fedora git repository and build that package before.

So, to wrap up your steps might look something like this:

$ git clone git://pkgs.fedoraproject.org/netcdf.git
$ cd netcdf
## Look at netcdf.spec, make changes if necessary
## To build using rpmbuild (probably easier than mock)
# yum install rpmdevtools
$ rpmdev-setuptree
$ mv netcdf.spec $HOME/rpmbuild/SPEC
$ mv * $HOME/rpmbuild/SOURCES
$ cd $HOME/rpmbuild/SPEC
$ rpmbuild -ba netcdf.spec
## rpmbuild might complain about unsatisfied build dependencies. Install these as necessary, some build dependencies might not be available in the repos, you will need to build then following the same procedure.

One particular thing you'll need to be aware of is that there is a netcfd package available in epel, which however is built without openmpi support (see [4]). If you install your home-built rpm, you probably want to make sure that a possible update from the epel repositories won't override your home-built version (this happens if the epoch:version-release of the package in the repositories is newer than the one you've built). You could:

smani
  • 1,953
  • 17
  • 13