Essentially I am trying to get Python2.7 to work on Linux EL5, but currently with no success. Really appreciate some pointer from anyone who has done this before.
Anyone happens to know whether there is a repo to get all the dependencies (EL5 rpms if not sources) for Python 2.7?
I could find the RPMs for Python27 EL5 at http://ftp.srce.hr/redhat/test/el5/x86_64/ but still not complete.
m000772#hkl20030997 ~]$ rpm -ivh python27-2.7.2-5.2.el5.x86_64.rpm
error: Failed dependencies:
libpython2.7.so.1.0()(64bit) is needed by python27-2.7.2-5.2.el5.x86_64 python27-libs = 2.7.2-5.2.el5 is needed by python27-2.7.2-5.2.el5.x86_64
[m000772#hkl20030997 ~]$ rpm -ivh python27-libs-2.7.2-5.2.el5.x86_64.rpm
error: Failed dependencies:
libdb-4.8.so()(64bit) is needed by python27-libs-2.7.2-5.2.el5.x86_64
Now there is no RPM for libdb-4.8
You can use yum, this command take care of all dependencies.
First check with the following command:
# yum search python27
And the try with the available version..for example
# yum install python27
Related
Every time i try to install something, upgrade or autoremove this error happens!
I've searched the web and tried some fixes but they don't seem to work, I don't have python2.7 installed only 3 and can't install python2 or anything because of this. I've tryed to sudo rm python-rpi.gpio_0.7.0-0.1~bpo10+4_armhf.deb but the file will keep comming. Pls I really need some help since I've got some work on my pi and don't want to get a new image
sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
python-rpi.gpio
The following packages will be upgraded:
python-rpi.gpio
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
18 not fully installed or removed.
Need to get 0 B/20.7 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Reading changelogs... Done
(Reading database ... 152893 files and directories currently installed.)
Preparing to unpack .../python-rpi.gpio_0.7.0-0.1~bpo10+4_armhf.deb ...
/var/lib/dpkg/info/python-rpi.gpio.prerm: 6: /var/lib/dpkg/info/python-rpi.gpio.prerm: pyclean: Too many levels of symbolic links
dpkg: warning: old python-rpi.gpio package pre-removal script subprocess returned error exit status 2
dpkg: trying script from the new package instead ...
/var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: pyclean: Too many levels of symbolic links
dpkg: error processing archive /var/cache/apt/archives/python-rpi.gpio_0.7.0-0.1~bpo10+4_armhf.deb (--unpack):
new python-rpi.gpio package pre-removal script subprocess returned error exit status 2
/var/lib/dpkg/info/python-rpi.gpio.postinst: 6: /var/lib/dpkg/info/python-rpi.gpio.postinst: pycompile: Too many levels of symbolic links
dpkg: error while cleaning up:
installed python-rpi.gpio package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/python-rpi.gpio_0.7.0-0.1~bpo10+4_armhf.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
Some notes: I really really don't want to change the SD Card and parcially lose what I have, second I've tried sudo apt-get install -f and sudo apt update --fix-missing when i followed this guide the sudo dpkg --remove --force-remove --reinstreq command was showing this error dpkg: error: unknown force/refuse option 'remove'
As it turns out I still had remainnings of Python2 and Python3 binaries and those were not linked properly by the OS, this means that Python3 was linked to Python2 and vice-versa.
To get it working I had to:
Uninstall the Python2 dependencies
Get the link working correctly
Reinstall Python2 with wget
Verify if all links are working correctly (for Raspbian this means):
python --version links to Python2
python2 --version links to Python2
python3 --version links to Python3
Use the following commands:
sudo dpkg -i --force-overwrite /var/cache/apt/archives//python-rpi.gpio_0.7.0-0.1~bpo10+4_armhf.deb
Still have the same problem, use:
sudo mv /var/lib/dpkg/info/python-rpi.gpio.* /tmp/
sudo dpkg --remove --force-remove-reinstreq python-rpi.gpio
A typo in your command sudo dpkg --remove --force-remove --reinstreq isn't valide. The correct option is --force-remove-reinstreq. See dpkg --force-help.
I'm trying to get nmap for Raspberry Pi, and running into errors. I'm following the instructions here:
http://nmap.org/book/inst-linux.html#inst-debian
I have alien installed. Next command was
rpm -vhU https://nmap.org/dist/nmap-6.49BETA2-1.i386.rpm
But I get this error:
pi#raspberrypi ~ $ rpm -vhU https://nmap.org/dist/nmap-6.49BETA2-1.i386.rpm
rpm: RPM should not be used directly install RPM packages, use Alien instead!
rpm: However assuming you know what you are doing...
Retrieving https://nmap.org/dist/nmap-6.49BETA2-1.i386.rpm
error: Failed dependencies:
python >= 2.4 is needed by nmap-2:6.49BETA2-1.i386
But my version of Python is:
pi#raspberrypi ~ $ python --version
Python 2.7.3
What's going on here?
Just to explain the problem:
You have been using the wrong download:
nmap-6.49BETA2-1.i386.rpm
^^^ package format for RedHat not for Debian
^^^^ wrong architecture, the Rasberry pi is arm6 or arm7l
The package wasn't the right one but there is also the problem of dependencies. The RPM installer does not read the list of debian's installed packages properly. It is possible to ignore the dependencies by command line arguments, but in general it is better to
use a debian package
or compile from source if you need a version where there is no package for.
bash-4.1# yum install python-devel
Loaded plugins: fastestmirror, rhnplugin
This system is receiving updates from RHN Classic or RHN Satellite.
Loading mirror speeds from cached hostfile
* rpmforge: mirror.smartmedia.net.id
* webtatic-el5: uk.repo.webtatic.com
http://192.168.210.26/centos/6/updates/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package python-devel.x86_64 0:2.6.6-36.el6 will be installed
--> Processing Dependency: python(x86-64) = 2.6.6-36.el6 for package: python-devel-2.6.6-36.el6.x86_64
--> Finished Dependency Resolution
Error: Package: python-devel-2.6.6-36.el6.x86_64 (centos64-x86_64)
Requires: python(x86-64) = 2.6.6-36.el6
Installed: python-2.6.6-37.el6_4.x86_64 (#centos64-updates-x86_64)
python(x86-64) = 2.6.6-37.el6_4
Available: python-2.6.6-36.el6.x86_64 (centos64-x86_64)
python(x86-64) = 2.6.6-36.el6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Can somebody help me with above error , I am getting.
Just to let everybody know I am trying to install cx_Oracle on my CentOS system (CentOS release 6.4) and I got this error:-
error: command 'gcc' failed with exit status 1
So, I searched and found out to install python-devel and to do that I am getting the above error.
You have a newer version of python installed than the corresponding source package you're trying to install.
You have python 2.6.6-37 installed but the latest available source package from your repos (that you can successfully connect to) is 2.6.6-36.
But it looks like the python you have installed came from your "updates" repo,
http://192.168.210.26/centos/6/updates/i386/repodata/repomd.xml which isn't working at t he moment.
If that repo also had the corresponding python-devel-2.6.6-37 package, and it worked, (didn't throw a PYCURL error) you'd be fine, yum would find that and use it.
So your first step should be fixing your LAN repo / mirror.
I am trying to install python package "M2Crypto" via requirements.txt and I receive the following error message:
/usr/include/openssl/opensslconf.h:36: Error: CPP #error ""This openssl-devel package does not work your architecture?"". Use the -cpperraswarn option to continue swig processing.
error: command 'swig' failed with exit status 1
I tried passing
option_name: SWIG_FEATURES
value: "-cpperraswarn -includeall -I/usr/include/openssl"
But the error persists. Any idea?
The following config file (placed in .ebextensions) works for me:
packages:
yum:
swig: []
container_commands:
01_m2crypto:
command: 'SWIG_FEATURES="-cpperraswarn -includeall -D`uname -m` -I/usr/include/openssl" pip install M2Crypto==0.21.1'
Make sure you don't specify M2Crypto in your requirements.txt though, Elastic Beanstalk will try to install all dependencies before running the container commands.
I have found a solution that gets M2Crypto installed on Beanstalk but it is a bit of hack and it is your responsibility to make sure that it is good for a production environment. I dropped M2Crypto from my project because this issue is ridiculous, try pycrypto if you can.
Based on (I only added python setup.py test):
#!/bin/bash
python -c "import M2Crypto" 2> /dev/null
if [ "$?" == 1 ]
then
cd /tmp/
pip install -d . --use-mirrors M2Crypto==0.21.1
tar xvfz M2Crypto-0.21.1.tar.gz
cd M2Crypto-0.21.1
./fedora_setup.sh build
./fedora_setup.sh install
python setup.py test
fi`
In the environment config file
commands:
m2crypto:
command: scripts/m2crypto.sh
ignoreErrors: True
test: echo '! python -c "import M2Crypto"' | bash
ignoreErrors is NOT a good idea but I just used it to test if the package actually gets installed and seems like it.
Again, this might seem to get the package installed but I am not sure because removing ignoreErrors causes failure. Therefore, I won't mark this as the accepted answer but it was way too much to be a comment.
I'm not having much success when attempting building pgmagick on OS X Lion with XCode 4.3.1.
I've installed both ImageMagick and GraphicsMagick, along side boost, using the following commands (via homebrew):
$ brew install graphicsmagick --with-magick-plus-plus
$ brew install imagemagick --with-magick-plus-plus
$ brew install boost --with-thread-unsafe
then I'm cloning the repo at https://bitbucket.org/hhatto/pgmagick:
$ hg clone https://bitbucket.org/hhatto/pgmagick/src
$ cd pgmagick
$ python setup.py build
However I always receive the following error:
ld: library not found for -lboost_python
collect2: ld returned 1 exit status
Based on the output on stdout, setup is looking in the right place for the boost (/usr/local/lib).
I've also tried easy_install and pip but with no luck. I'm using Pythonbrew but have also disabled this and tried using the stock python install -- still no success.
Any suggestions on how I can fix the problem, or further diagnose the issue?
According to my own reproduction of this issue in brew 0.9 and OSX 10.6.8, the problem is --with-thread-unsafe isn't being honored by the current brew formula file. You can verify this by checking the formula with brew edit boost and seeing if the option appears within the contents of the formula.
Because of this, libboost_python-mt.a and libboost_python-mt.dylib are being built instead of libboost_python.a and libboost_python.dylib.
The easiest ways to fix this are to edit your pgmagick setup.py to replace boost_lib="boost_python" with boost_lib="boost_python-mt" (as pointed out here) or to follow the instructions and patch here. It's otherwise a known issue.
The boost_python lib inside /usr/local/lib/ is named after libboost_python-mt.a and libboost_python-mt.dylib, since the default compiling is w/ multi-threads supporting enabled.
Grep boost_lib="boost_python" under ELSE condition in setup.py and replace it w/ boost_lib="boost_python-mt", will fix the "not found" issue.
Also it's OK to ln "-mt" version to libboost_python.a: as described here for linux boost which no longer appends '-mt' suffix since 1.42.
Ignore this line or you could "with-boost-python=boost_python-mt python setup.py install".
You could probably append '--with-boost-python=boost_python-mt' to extra_compile_args inside setup.py, to achieve the same goal.
Furthermore, you could install pgmagick through pip in managed envs. Refs http://rohanradio.com/blog/2011/12/02/installing-pgmagick-on-os-x/
Note that as of July 2014 the boost Python library is a separate homebrew package called boost-python.
5254f8f510fb30484f8fac8be3d38e388a4392e2
Author: Tim D. Smith <git#tim-smith.us>
Date: Sat Jul 19 15:37:25 2014 -0700
Split out Boost.Python
You need to install it separately to get the libboost_python shared library.
Does setting DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib in the environment help before the build
e.g
$ export DYLD_FALLBACK_LIBRARY_PATH=/usr/local/lib
$ hg clone https://bitbucket.org/hhatto/pgmagick/src
$ cd pgmagick
$ python setup.py build
I've submitted a pull request to homebrew to build Boost with both mt and non mt (threaded and thread unsafe) binaries which are required to build pgmagick.
Turns out this is a rather common problem, until the patch is accepted, you can check out or use my formula for Boost to build pgmagick.