Can't install policycoreutils-python on Centos 6.5 - python

It appears that policycoreutils-python requires higher versions of
the packages : libsemanage-python, auditlibs-python and python-IPy, than the default versions of these packages I have installed on a Centos server (Rocks 6.1). I thought that updating the version of Python would help since the default Python version on the server is 2.6.6.
I installed Python 3.5 by following another answer:
yum install https://centos6.iuscommunity.org/ius-release.rpm
and then installing python35u through yum.
Since 3.5 is not default and only one of the python versions available, I am not sure how to make yum use this version while installing policycoreutils-python.
I am interested in installing policycoreutils-python because I want to update the version of GCC to >=4.7 through the developer toolset package
released by the Scientific Linux community.
My questions are therefore:
1. How do I get policycoreutuils-python installed?
2. Is it a good idea to update several different packages on the server, in the process? I am really new to Centos and I am not sure how to find packages
when yum reports that they are not available. What is the best practice - install from source?

1) CentOS 6.5 is too old to be updated. I.e. please run # yum update every week. CentOS 6.5 was released 'Dec 2013' ! ( And no 'yum install [package] will work anymore ? ? ).
2) Generally always use yum for any package install. And : policycoreutils-python is included in the *Base.repo http://mirror.centos.org/centos/6.8/os/x86_64/Packages/ . And : a package search should always be used : # yum search policycoreutils-python ... i.e. # yum search [name] , or [part of name] .
3) If your old CentOS 6.5 works anyway, the right policycoreutils-python etc. will be installed automatically when installing gcc-4.7 : # yum install devtoolset-1.1-gcc-c++ ... : You don't need to install the complete devtoolset-1.1 .
Important : The slc6-devtoolset.repo must be setup beforehand : # wget -O /etc/yum.repos.d/slc6-devtoolset.repo http://linuxsoft.cern.ch/cern/devtoolset/slc6-devtoolset.repo
Ref. http://linux.web.cern.ch/linux/devtoolset/

Related

How to install matlabengine (Windows 10, MATLAB R2020b, Python 3.8.10)

I have the following environment:
Windows 10
Python 3.8.10
MATLAB R2020b
I'm trying to install matlabengine (pip install matlabengine) package, and I'm getting the following error:
RuntimeError: No compatible MATLAB installation found in Windows Registry. This release of MATLAB Engine API for Python is compatible with version 9.13. The found versions were 9.9
What am I missing ? (according to https://pypi.org/project/matlabengine/) it seems I'm using the right versions.
How can I check the versions I have (9.9 or 9.13 because as I wrote above I have MATLAB R2020b and Python 3.8.10).
The error is about the MATLAB version, not the version of matlabengine (the Python module).
You wrote that you have MATLAB 2020b. That is the release name for MATLAB version 9.9, as can be seen in this table on Wikipedia.
As can be read on the description of matlabengine 9.13.1, this engine version requires MATLAB release R2022b (= 9.13).
To use matlabengine with MATLAB 2020b, install version 9.9.1:
python -m pip install matlabengine==9.9.1
You need to try all versions of MATLAB engine starting from the latest one going backwards. What worked for me on Ubuntu was
$ python -m pip install matlabengine==9.12.17
NB: To get a list of all the possible versions, try install one that doesn't exist e.g.
$ python -m pip install matlabengine==9.9.2
and it will give you an error with the list of possible versions.
You can try to install specific version of matlabengine.
pip install matlabengine==9.13.1
If they cannot find your version, you might need to update pip.
Also, you can check your current matlabengine version.
pip show matlabengine

install python X.Y.Z 32 bits and 64 bits

I am interested in installing python 32bits and 64bits with debugging symbols via chocolatey.
So far, if I do the following I can manage to install what I want, for the sake of an example let's have version 3.7.0.
choco install python3 --forcex86 --allowmultiple --version=3.7.0 --installargs "TargetDir=C:\Python37_32bits CompileAll=1 Include_debug=1 Include_symbols=1"
choco install python3 --force --allowmultiple --version=3.7.0 --installargs "TargetDir=C:\Python37 CompileAll=1 Include_debug=1 Include_symbols=1"
I need --forcex86 to tell choco toinstall python-32bits version.
Later on I need --force to tell chocolatey, please don't complain you already installed python3.7.0.
The problem::
Afterwards chocolatey seems not to know he has installed two versions of the same package.
Is there any clean way to achieve installing pythonXYZ 32bits and 64bits and manage them via chocolatey?

Virtualbox installation error in Red Hat Enterprise Linux 8

I need to install Virtualbox in RHEL 8 which has a Developer Subscription. Since /etc/yum.repos.d/virtualbox.repo doesn't find http://download.virtualbox.org/virtualbox/rpm/el/8/$basearch I did download rpm directly from virtuallbox with link, http://download.virtualbox.org/virtualbox/rpm/rhel/7/x86_64/VirtualBox-6.0-6.0.8_130520_el7-1.x86_64.rpm.
But again I got this error saying,
Error:
Problem: conflicting requests
- nothing provides libpython2.6.so.1.0()(64bit) needed by VirtualBox-6.0-6.0.8_130520_el6-1.x86_64
- nothing provides python(abi) = 2.6 needed by VirtualBox-6.0-6.0.8_130520_el6-1.x86_64
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)
I found out RHEL 8 supports Python2 and Python3 but no idea about Python. Is there anyway to install Virtualbox in RHEL 8?
Installing the RPM package requires to satisfy the dependencies. As you are downloading a single RPM file and don't have a repo from where to get the dependencies it won't work without some other steps.
The easier way, if you don't mind adding external third-party repositories, is to add the RPM Fusion repositories
What is RPM Fusion?
RPM Fusion is a repository of add-on packages for Fedora and EL+EPEL maintained by a group of volunteers. RPM Fusion is not a standalone repository, but an extension of Fedora. RPM Fusion distributes packages that have been deemed unacceptable to Fedora.
Enable RPM Fusion repositories in RHEL 8 or CentOS 8:
sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm https://download1.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm
Install VirtualBox:
# notice the uppercase V and B
yum install VirtualBox
# add your user to the vboxusers group:
usermod -a -G vboxusers $username
Alternative: Use Virt-Manager with KVM
Check the following article in Red Hat Developers portal on how to configure Virt-Manager and KVM for virtual machines. It's just as easy as VirtualBox and better supported, as this is how real Virtual Machines run in servers.
You can read more about the RPM Fusion repository here.
If you want to try Virt-Manager and need a hand, leave me a comment.

The mysqlclient nightmare

I am trying to install mysqlclient in a centos system. These are some of the issues I am facing:
mysqlclient needs to be compiled in the installation system
to compile it, according to the official sources, we need python-devel and mysql-devel
what if I am installing mysqlclient in a virtualenv with python36? Do I need python36-devel instead of python-devel? Why is this not mentioned in the documentation?
will python36-devel match the python36 of my virtualenv? What if I am using my self-compiled python37 instead of the centos python36, will that match python36-devel? It's not like I have infinite options regarding the centos packages I can install ...
And some problems unrelated to mysqlclient, but related to centos:
centos does not have python36 by default. It seems something called epel-release must be installed.
python36-devel installs 36 (!!) dependencies:
--
Installed:
python36-devel.x86_64 0:3.6.8-1.el7
Dependency Installed:
dwz.x86_64 0:0.11-3.el7 groff-base.x86_64 0:1.22.2-8.el7 perl.x86_64 4:5.16.3-294.el7_6 perl-Carp.noarch 0:1.26-244.el7 perl-Encode.x86_64 0:2.51-7.el7 perl-Exporter.noarch 0:5.68-3.el7
perl-File-Path.noarch 0:2.09-2.el7 perl-File-Temp.noarch 0:0.23.01-3.el7 perl-Filter.x86_64 0:1.49-3.el7 perl-Getopt-Long.noarch 0:2.40-3.el7 perl-HTTP-Tiny.noarch 0:0.033-3.el7 perl-PathTools.x86_64 0:3.40-5.el7
perl-Pod-Escapes.noarch 1:1.04-294.el7_6 perl-Pod-Perldoc.noarch 0:3.20-4.el7 perl-Pod-Simple.noarch 1:3.28-4.el7 perl-Pod-Usage.noarch 0:1.63-3.el7 perl-Scalar-List-Utils.x86_64 0:1.27-248.el7 perl-Socket.x86_64 0:2.010-4.el7
perl-Storable.x86_64 0:2.45-3.el7 perl-Text-ParseWords.noarch 0:3.29-4.el7 perl-Time-HiRes.x86_64 4:1.9725-3.el7 perl-Time-Local.noarch 0:1.2300-2.el7 perl-constant.noarch 0:1.27-2.el7 perl-libs.x86_64 4:5.16.3-294.el7_6
perl-macros.x86_64 4:5.16.3-294.el7_6 perl-parent.noarch 1:0.225-244.el7 perl-podlators.noarch 0:2.5.1-3.el7 perl-srpm-macros.noarch 0:1-8.el7 perl-threads.x86_64 0:1.87-4.el7 perl-threads-shared.x86_64 0:1.43-6.el7
python-rpm-macros.noarch 0:3-24.el7 python-srpm-macros.noarch 0:3-24.el7 python3-rpm-macros.noarch 0:3-24.el7 redhat-rpm-config.noarch 0:9.1.0-87.el7.centos zip.x86_64 0:3.0-11.el7
Utterly broken, if you ask me.

Ansible 2.4 upgrade and python 2.6 on CentOS 5

I upgraded my ansible to 2.4 and now I cannot manage my CentOS 5 hosts which are running python 2.4. How do I fix it?
http://docs.ansible.com/ansible/2.4/porting_guide_2.4.html says ansible 2.4 will not support any versions of python lower than 2.6
After I upgraded to ansible 2.4 I was not able to manage hosts running python 2.6+. These were CentOS 5 hosts and this is how I fixed the problem.
First, I installed python26 from epel repo. After enabling epel repo, yum install python26
Then in my hosts file, for the CentOS 5 hosts, I added ansible_python_interpreter=/usr/bin/python26 as the python interpreter.
To specify the python interpreter in the hosts file individually, it will be something like
centos5-database ansible_python_interpreter=/usr/bin/python26
And for a group of hosts, it will be something like
[centos5-www:vars]
ansible_python_interpreter=/usr/bin/python26
And what about python26-yum package? It is required to use yum module to install packages using Ansible.
My experience so far has been that anisible works (gather facts) but that some modules (in particular yum / package) do not because yum uses python 2.4.
I ended up using yum via command and shell modules (not pretty but works).
1) Before you can install python26 you need to fix the repos as CentOS5 is end of life:
( YumRepo Error: All mirror URLs are not using ftp, http[s] or file )
2) then you can install EPEL 5 and pthon26
( https://www.ansible.com/blog/using-ansible-to-manage-rhel-5-yesterday-today-and-tomorrow )
3) then you can use the command module to use yum:
( CentOS 5. ansible_python_interpreter=/usr/bin/python26. Still cannot use yum: module )
many newer ansible modules don't work either due to missing python dependencies.
My intent is just to use Ansible in CentOS5 (or RH 5) to facilitate the upgrade to something newer and supported. ;)

Categories