Compatibility Issue from centos 5.x to 6.x - linux

I have an rpm compiled in centos 5.x which requires libnetsnmp.so.10 and other shared objects. I want to create an rpm of it which is to be run on centos 6.x but it fails to install as on installation it says :
error: Failed dependencies:
libnetsnmp.so.10()(64bit) is needed and so on...
But Centos 6.x contains libnetsnmp.so.20
So I created symbolic links of libnetsnmp.so.10 of libnetsnmp.so.20.
But problem is still the same.
So can you please help me to resolve this problem?

If recompiling for Centos 6 isn't an option, you can try two things, first, install the correct libnetsnmp in the Centos 6 server. If that's not an option, you can add the following to your RPM spec file:
Autoreq: no
This will cause it not to scan your binary for dependencies (such as dynamically linked libraries), and automatically build that into the RPM.
Of course, if that version of libnetsnmp is ACTUALLY required, your just hosing yourself down the road, but likely newer versions will work just fine.

Related

rpm conditional dependency requirements

I'm working on a piece of software just now that needs to run on a newer version of Redhat. It currently works fine on 6 and 7 but now needs to install and run on Redhat 8.
There is nothing really specific in the software that will stop it running on the newer OS version but i'm having a problem with the dependency requirements. The script that runs the software needs access to semanage (/usr/sbin/semanage). On Redhat 6 and 7 this was supplied by policycoreutils-python package and was given as a requirement argument when the rpm was built. From Redhat 8 onwards, the package has been renamed to policycoreutils-python-utils (see this link, section 8.6.2).
From rpm 4.13, there is support for boolean dependencies (see here) which would make this an easy fix as I could just do something like -R (policycoreutils-python or policycoreutils-python-utils) but changing the rpm-build package from its current 4.8 version is a major pain as it's used by another team for another piece of software. I also need to keep it a distro independent rpm so can't have different versions of the rpm for newer versions of the OS.
So, my questions:
1) Is there some other way to have a conditional requirement in the spec file with the older rpm 4.8 version?
2) If I was to get approval to upgrade rpm to latest 4.15, is there likely to be any issue on target systems that have older rpm installed e.g. not understanding the conditional?
Update: The rpm will be built once on a RH 6 box and should work on RH 7 & 8.
if you build one rpm for all platforms
You can depend on semanage itself:
Requires: /usr/sbin/semanage
yum, dnf or rpm should be smart enough to work that out.
if you build each rpm on the corresponding target:
you can use the %rhel_version macros, see https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto :
%if 0%{?rhel_version} < 800
Requires: policycoreutils-python
%else
Requires: policycoreutils-python-utils
%endif

Apache version upgrade issue

At present we are on Apache/2.2.15 (UNIX) version. To fix the vulnerabilities we are suggested to upgrade to new version. I got new version from online using "wget" command and followed steps mentioned on this link http://httpd.apache.org/docs/2.2/install.html#download.
Once I am done, checked version using httpd -v. It gives me old version Apache/2.2.15 (UNIX). If I check using /usr/local/apache2/bin/httpd - v. It gives me new version. Did I successfully upgraded the version or not? If not what should I do?
I tried "yum install httpd" - It says "Nothing to do".
You now have two versions of Apache installed. You have the one installed with the system package manager (yum) in /usr/sbin/httpd. You have one installed manually in /usr/local/apache2/....
Which one you get will be determined entirely by which path you use.
In general, mixing system-managed packages with manually installed packages is a recipe for trouble. If you want to stick with the newer version in /usr/local, you should remove the system version, and realize that you will lose some manageability. For example, you will no longer be able to use yum install ... to install new Apache modules, and you will not be able to verify the installed files using tools like rpmverify.
If your distribution currently has Apache 2.2.x, that suggests your distribution is fairly old. For example, RHEL (and CentOS) 7 (and similar variants) have version 2.4.6 packaged, so you may want to update your host to something newer than whatever you're running now.
Yes, its successfully upgraded as per the screenshot.
httpd 2.2.15 is the version with RHEL 6 repository, here HTTPD_HOME is /etc/httpd (Highest version provided for HTTPD via RPM RHEL 6 is 2.2.15)
httpd 2.4.6 is the version with EPEL-HTTPD24 repository, here HTTPD_HOME is /usr/local/apache2/

issue with upgrading net-snmp5.5 to net-snmp5.7.3

I have to manage an Ethernet traffic card (my Linux target board(mips32)) having net-snmp 5.5 installed on it.
I want to upgrade it to latest net-snmp 5.7.3 and have successfully compiled net-snmp.
After that I had changed the all the libnetsnmp* library files, MIB text files and snmpd and snmptrapd daemons...but it gives errors like failed to open shared library ....can not find libnesnmp.so.20 files Why it is throwing this error even though I have updated net-snmp library files.
I am confused that what files of 5.5 has to be replaced by the 5.7.3, in order to upgrade my net-snmp package.
Also please guide me the steps to install a Fresh net-snmp package on any Linux board.
The net-snmp suite comes in 3 distinct Linux packages.
net-snmp (the snmpd agent and snmptrapd daemons, documentation, etc)
net-snmp-utils (various utilities e.g. for interrogating SNMP agents,
sending traps, etc )
net-snmp-libs (runtime libraries)
Have a look at https://stackoverflow.com/a/32093525/449347 to a more detailed listing of files in each.
Make sure you have updated ALL that you have installed.
EDIT ...
Paraphrasing http://www.betweendots.com/topic/45-install-the-latest-version-of-net-snmp/
When you have a CentOS box and type "yum install net-snmp", you'll get
version 5.5. If for some reason you want the latest version (5.7 at
the time of writing), then here's what you have to do:
yum remove net-snmp net-snmp-utils
Install dependencies: yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
Unpack and install net-snmp:
tar zvxf net-snmp-*.tar.gz
cd net-snmp-*
./configure
make
make install
Create an snmpd.conf and put it in /usr/local/share/snmp.
But follow above link for more info!

Fedora lobpcre.so.0

I'm getting this error when i try to run apache:
./httpd: error while loading shared libraries: libpcre.so.0: cannot open shared object file: No such file or directory
when i do a search for the lib i receive this:
/usr/lib/libpcre.so.1
/usr/lib/libpcre.so.1.2.1
/usr/lib/libpcre16.so.0
/usr/lib/libpcre16.so.0.2.1
/usr/lib/libpcre32.so.0
/usr/lib/libpcre32.so.0.0.1
/usr/lib/libpcrecpp.so.0
/usr/lib/libpcrecpp.so.0.0.0
/usr/lib/libpcreposix.so.0
/usr/lib/libpcreposix.so.0.0.2
/usr/lib64/libpcre.so.1
/usr/lib64/libpcre.so.1.2.1
/usr/lib64/libpcre16.so.0
/usr/lib64/libpcre16.so.0.2.1
/usr/lib64/libpcre32.so.0
/usr/lib64/libpcre32.so.0.0.1
/usr/lib64/libpcrecpp.so.0
/usr/lib64/libpcrecpp.so.0.0.0
/usr/lib64/libpcreposix.so.0
/usr/lib64/libpcreposix.so.0.0.2
I tried to upgrade my pcre, to get the so.0 :
Package pcre-8.33-11.fc20.x86_64 already installed and latest version
Nothing to do
I'm out of ideas, hope someone can help.
This error is occurring because the version of Apache that is currently installed was built against an older version of pcre.
First upgrade Apache to the latest version in the Fedora repositories. The latest version should have been built against the newer pcre shared object.
If you can't, or won't upgrade Apache, you can downgrade the pcre package to the first version that contains libpcre.so.0, which is 7.8 I think.
If you need a quick fix and aren't using this web server for anything too serious you may be able to make it work by sym-linking libpcre.so.0 to libpcre.so.1.
lastly, you could rebuild Apache manually, which should use the pcre that is currently installed.

Postgresql 8.3 version needed for OpenSUSE

I have installed OpenSUSE 12.1 installed on machine.
and i have postgresql-contrib-8.3.11-0.1.i586.rpm,postgresql-devel-8.3.11-0.1.i586.rpm, postgresql-docs-8.3.11-0.1.i586.rpm,postgresql-libs-8.3.11-0.1.i586.rpm,postgresql-server-8.3.11-0.1.i586.rpm..
I want to installed postgresql 8.3 version based on above packages..but when i installed with this command .it shows an error.
opnsu121:/ # rpm -Uvh postgresql-server-8.3.11-0.1.i586.rpm
error: Failed dependencies:
postgresql = 8.3 is needed by postgresql-server-8.3.11-0.1.i586
Even i am not able to find postgresql 8.3 base version as i think the above one is update.i have gone throgh the download.openSUSE.orf,ftp.openSUSE.org..
http://download.opensuse.org/update/11.0/rpm/i586/..
but not able to find what i need..so please help on this,
If at all possible, use YaST or whatever package manager SuSE uses to install the current version of PostgreSQL. From the repository it looks like that's 9.1.1.
If you specifically need PostgreSQL 8.3, I'd recommend using the distro-independent installer from EnterpriseDB. That should work fine on SuSE 12.2. If your organisation has particularly restrictive and unsafe version policies that force you to use old versions with known bugs, you can get 8.3.14 for 32-bit Linux here and 8.3.11 for 32-bit Linux here.
If you have issues with using the well-tested and known-to-work EnterpriseDB binary installer versions of PostgreSQL, your other option (and a good one) is to install from source code. Download the PostgreSQL 8.3.18 sources from the FTP site, then:
sudo mkdir -p /opt/postgresql93
sudo chown `id -un` /opt/postgresql93
./configure --prefix=/opt/postgresql93
make
make install
after which you can use /opt/postgresql93/bin/initdb (see initdb manual) to create a database and /opt/postgresql93/bin/pg_ctl (see pg_ctl manual) to start/stop it, as per the PostgreSQL documentation.
Don't try to force packages from an old version of SuSE to install on your new version. It'll probably result in an increasing tree of dependencies and end in pain.
If at all possible, try to convince your company that their policy of requiring a specific minor version (eg 8.4.14 not just "8.4.x") of PostgreSQL is unsafe and counterproductive. They're forcing you to do dirty hacks or hand-compile unique, custom installs just for your setup in order to avoid using well tested builds that contain extra bug fixes. Requiring approval before upgrading from 8.3 to 8.4/9.0/9.1/etc makes sense as there are feature and backward compatibility changes that require careful testing, but requiring approval before upgrading from 8.3.14 to 8.3.18 is counterproductive. Minor version upgrades of PostgreSQL are very conservative; you should stay up to date with the latest minor release.
hurray...I got the answer..
I have got the package below:
postgresql-contrib-8.3.11-0.1.i586.rpm, postgresql-devel-8.3.11-0.1.i586.rpm,postgresql-docs-8.3.11-0.1.i586.rpm,postgresql-libs-8.3.11-0.1.i586.rpm,postgresql-server-8.3.11-0.1.i586.rpm from the below link:
http://download.opensuse.org/update/12.1/i586/
and the one more package which i have struggled to get is:
postgresql-8.3.11-0.1.i586.rpm with the following link:
http://rpm.pbone.net/index.php3/stat/4/idpl/17194424/dir/opensuse_11.x/com/postgresql-8.3.11-0.1.i586.rpm.html
with all above packages i have installed using..
rpm -ivh packagename
if there is a dependency then rpm -ivh --nodeps packagename
great..its done..

Resources