yum command : python version mismatch - redhat

I have Red Hat Linux (Red Hat Enterprise Linux Server release 6.5 (Santiago) ) and yum in not working with message
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
No module named yum
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.7.8 (default, Nov 7 2014, 11:45:08)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-11)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://yum.baseurl.org/wiki/Faq
Current version of python is 2.7.8
Any help is appreciated.

CentOS 6 ships with python 2.6. Someone installed an incompatible version of python system-wide and that has broken things. That should not have been done.
You need to find out how the 2.7 version of python was installed and fix that (by removing the incorrect package or by removing the source-installed python or by fixing the $PATH or whatever else is appropriate).
To help figure out what the problem is exactly we need the output from the following commands (as a start).
What does rpm -qa python\* say?
What does which -a python say?

Related

Install ncurses-5 in CentOS 9

I'm using a server that is running CentOS 9 and I'm having issue compiling something that uses libncurses.so.5.
I installed the ncurses-devel package, but it is in version 6, and isn't found by the compiler.
I saw that on CentOS 8, it is possible to install ncurses-compat-libs for that purpose, bit it doesn't seem to be available for CentOS 9.
Is there a way to either install ncurses-compat-libs in CentOS 9, or to install the library through another mean?
Thank you
Ok, so per the comment of Thomas Dickey above, I rebuilt the RPM package from the ncurses-compat-libs<version>.src.rpm downloaded from RPM Find.
After that, I ran rpmbuild --rebuild ncurses-compat-libs<version>.src.rpm, which created a bunch of rpm files in ~/rpmbuild/RPMS/<arch>/*.rpm.
I installed all of them at once using the sudo dnf localinstall --allowerasing <list of rpms> to make sure all the dependencies could be resolved.
See the wiki provided by Thomas Dickey for more details.
Thanks for the help!

Error: No module named 'PyQt5.sip' - When installing eric6-19.03

I have noticed a number of similar questions on stackoverflow, but none that really helped me with my current challenge. I have been attempting to install eric6 on my Raspberry Pi setup. And then I encountered the following messages:
Checking dependencies
Python Version: 3.6.8
PyQt5 could not be detected.
Error: No module named 'PyQt5.sip'
Shall 'PyQt5' be installed using pip? (Y/n) Y
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: PyQt5 in /usr/local/lib/python3.6/site-packages (5.12)
Sorry, please install PyQt5.
Error: No module named 'PyQt5.sip'
And when I attempt to use the pip list to look at what has been installed (as I previously already managed to make and install the PyQt5 from source code):
Package Version
---------- -------
pip 19.0.3
PyQt5 5.12
setuptools 40.6.2
sip 4.19.14
So, how do I overcome the issue that I am currently facing? By the way, I am using the following command when attempting to install eric6:
python3 install.py
Thought you might need to know that if it helps.
Python 3.6 isn't available in any Raspbian distribution, so I assume you installed this yourself. You can't install an out-of-distribution Python version and expect distribution Python packages to work. You have PyQt5 installed, yes, but it's the version of PyQt built for Python 3.5 (I'm assuming you're on Raspbian Stretch).
Sometimes you can install Python libraries with pip, and in theory that could work to install the correct version of PyQt for your version of Python, but PyQt only provides wheels for x86 on PyPI, not for Arm, so PyQt is not pip installable on the Pi. The only way to get PyQt on Raspberry Pi is via apt, where your choices are Jessie (old stable - with Python 3.4), Stretch (current stable - with Python 3.5), and Buster (unstable/testing - with Python 3.7). If there's a need for Python >3.5, your best bet is to try upgrading to Buster, but bear in mind it's not ready for release yet.

glibc 2.11 error on Marklogic 8.0 installation on CentOS 6.6

When I try to install Marklogic 8.0 (MarkLogic-8.0-2.x86_64.rpm) on CentOS6.6 it fails with following error:
error: Failed dependencies:
libc.so.6(GLIBC_2.11) is needed by MarkLogic-8.0-2.x86_64
I checked installed package of glibc and found that GLIB_2.12 is installed.
I tried erasing GLIBC_2.12, but Cent OS doesn't allow because it has dependencies.
I would appreciate if somebody help me how to install Marklogic 8.0 on CentOS6.6 keeping glibc 2.12 or how to downgrade glib version on CentOs
I haven't tested myself with CentOS 6.6, but am running CentOS 6.5 a lot. Did you try running this before the RPM?
yum -y install glibc.i686 gdb.x86_64 redhat-lsb.x86_64
See also Install Marklogic centos virtualbox vm
HTH!
To add to this: you're seeing this message when you attempt to install because a dependent library is unavailable; in the case of this particular message, if you run this beforehand:
yum install glibc.i686
You should get past that particular issue.

gcc required when installing Bugzilla on diskstation

I'm trying to install Bugzilla but encounter a Perl problem.
When installing required Perl modules, I get the following error message:
ERROR: Using install-module.pl requires that you install a compiler, such as gcc.
gcc 4.2.3 is installed and in the path. I'm using perl v 5.8.6 OS: Linux DiskStation 2.6.32.12
Another thread on Stackoverflow refers to PerlGcc but it seems to work on Solaris only.
How can I make Perl find gcc?
I'm guessing you're talking about this thread. Assuming that the guy talking about the version of gcc being relevant was onto something, could you check that you don't have an older version of gcc lying around somewhere higher in the path with
$ which gcc

Perl DBD::Oracle Module installation

Could someone guide me how to install the Perl DBD::Oracle module?
Here is what I have done so far:
Platform: RHEL 5.8 64 bit
Installed Perl DBI package
Installed Oracle Instant client for Linux 64 bit (basi + sdk + sqlplus component for the instant client
Have set the correct $ORACLE_HOME and $LD_LIBRARY_PATH
Then when I do perl Makefile.pl it fails with the following error:
I'm having trouble finding your Oracle version number... trying harder
WARNING: I could not determine Oracle client version so I'll just
default to version 8.0.0.0. Some features of DBD::Oracle may not work.
Oracle version based logic in Makefile.PL may produce erroneous results.
You can use "perl Makefile.PL -V X.Y.Z" to specify a your client version.
Oracle version 8.0.0.0 (8.0)
DBD::Oracle no longer supports Oracle client versions before 9.2
Try a version before 1.25 for 9 and 1.18 for 8! at Makefile.PL line 271.
The instant client version: 11.1.0
The DBD::Oracle version is 1.44
If you have installed successfully with the Oracle instant client, then could you please let me know what am I missing?
Is it possible to install DBD::Oracle without using the Oracle instant client?
Install if missing ExtUtils-MakeMaker module (sudo yum install perl-ExtUtils-MakeMaker)
Install Perl DBI module ($ yum install perl-DBI)
Manually install below three RPMs for Oracle instant client (from Instant Client Downloads for Linux x86-64. The example is for v11.2.0.3.0-1: adapt the commands below to the actual version.)
oracle-instantclient11.2-basic-11.2.0.3.0-1
oracle-instantclient11.2-devel-11.2.0.3.0-1
oracle-instantclient11.2-sqlplus-11.2.0.3.0-1
I am using 64 bit Linux box, so select your RPM filenames accordingly. Something like sudo yum -y install oracle-instantclient*rpm should do)
set below variables:
export LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/lib
export ORACLE_HOME=/usr/lib/oracle/11.2/client64
MacOS users will need:
DYLD_LIBRARY_PATH=/usr/lib/oracle/11.2/client64/
Also add ORACLE_HOME to your PATH variable.
download DBD::Oracle from CPAN
untar the module and run below commands in given sequence:
perl Makefile.PL
make
sudo make install
In case you get complaints about missing gcc you can (temporarily) install it and then remove it.
DONE !!!
Issues I had faced were due to the wrong LD_LIBRARY_PATH. I had set it to /usr/lib/oracle/11.2/client64 whereas the correct value is /usr/lib/oracle/11.2/client64/lib.
Certainly, this was a great learning for a newbie like me.
you can also read my article How to install DBD::Oracle which contains all the steps required to install DBD::Oracle CPAN module, which is not a straightforward installation. The purpose is to reduce headache and turn it into a repeatable process.
Here's what I did on CentOS 7.2 using yum packages and CPAN. This assumes you're using Oracle version 12.1 but I would imagine most versions will work this way.
Install Oracle Instant Client
yum install oracle-instantclient12.1-basic-12.1.0.2.0-1 oracle-instantclient12.1-devel-12.1.0.2.0-1 oracle-instantclient12.1-sqlplus-12.1.0.2.0-1
Copy demo make files
The install expects the *.mk file to be in /usr/share/oracle/12.1/client64 but the yum package install puts them in /usr/share/oracle/12.1/client64/demo.
sudo cp /usr/share/oracle/12.1/client64/demo/* /usr/share/oracle/12.1/client64
Modify .bashrc
Add the following lines to your ~/.bashrc
export ORACLE_HOME=/usr/lib/oracle/12.1/client64
export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib
export PATH=$ORACLE_HOME:$PATH
Now source the file
source ~/.bashrc
Update CPAN and DBI
Update CPAN and DBI to the latest
cpan> install CPAN
cpan> reload cpan
cpan> install DBI
Install DBD::Oracle
cpan> install DBD::Oracle
A little addition to slayedbylucifer answer. I had the same problem like mentioned in the question. I've done all the steps described by slayedbylucifer. But still I got the problem like mentioned here:
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: skipping incompatible /opt/oracle/app/oracle/product/11.2.0/client_1/lib//libclntsh.so when searching for -lclntsh
/usr/lib64/gcc/x86_64-suse-linux/4.3/../../../../x86_64-suse-linux/bin/ld: cannot find -lclntsh
So I created the following symbolic link:
ln -s /opt/oracle/app/oracle/product/<YOUR_ORACLE_VERSION>/client_1/lib/libclntsh.so $ORACLE_HOME/libclntsh.so*
After that step the error from above (cannot find -lclntsh) was fixed. The execution of the make command was without any errors.
The only problem I still have is that I don't understand why this symbolic link is necessary.