Raspberry Pi cannot install Nmap, failed dependencies - python

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.

Related

I deleted default python on fedora and now getting errors

I recently deleted the default python version on Fedora 31 and installed python 3.9 then made it as default, now I have multiple versions of python.
If I type: whereis python in my terminal this list appear:
python: /usr/bin/python /usr/bin/python3.9 /usr/bin/python3.7 /usr/bin/python3.9-config /usr/bin/python3.7m /usr/bin/python3.9-x86_64-config /usr/lib/python3.9 /usr/lib/python2.6 /usr/lib/python3.7 /usr/lib64/python3.9 /usr/lib64/python3.7 /usr/local/bin/python3.7m-config /usr/local/bin/python3.7 /usr/local/bin/python3.7m /usr/local/lib/python3.7 /usr/include/python3.9 /usr/include/python3.7m /usr/share/man/man1/python.1.gz /usr/src/Python-3.7.4/python
If I type pip then I get ModuleNotFoundError: No module named 'pip'
Also multiple packages are broken such as dnf, argcomplete, pip, etc.
I cannot update or install anything.
How can I solve this problem ?
Grab/Download the original python RPMs for your distro and reinstall them that way if they're not still cached under /var ....
With Python 3.9 you should use pip3...So install python3-pip.
That should do the trick
I tried many solutions and didn't work, however I ended up backing up my data and completely deleting the OS, then I downloaded the last version of fedora and restored my data on it.
thanks for your time
I ran into this unfortunate situation as well on Fedora 35. dnf, yum, and a bunch of other things broke.
I didn't manage to get Python 3.10 back through dnf, yum, or apt-get. I downloaded the rpm from https://fedora.pkgs.org/35/fedora-x86_64/python3-3.10.0-1.fc35.x86_64.rpm.html. It did require a dependency of python3-libs which I downloaded from: https://fedora.pkgs.org/35/fedora-x86_64/python3-libs-3.10.0-1.fc35.x86_64.rpm.html.
I installed python3-libs first with sudo rpm -i python3-libs-3.10.0-1.fc35.x86_64.rpm --force as there were some file writing conflicts. I ran the same command for the python3.10 rpm with the --force flag as well since there were 2 conflicts. After that, everything worked perfectly! Managed to dodge having to do a full reinstall.

python 3.7 import smbus ModuleNotFoundError no module named 'smbus'

I successfully built python 3.7 on my raspberry pi zero. now when I run my program using:
python3 DungeonCube.py
I get the following error:
import smbus
ModuleFoundError: No module named 'smbus'
I have searched for solutions and it seems no one has gotten this far with python 3.7 on a raspberry pi. other guides say to reinstall smbus or install smbus2 and that does not work.
dpkg-query -L python3-smbus shows:
/.
/usr
/usr/lib
/usr/lib/python3
/usr/lib/python3/dist-packages
/usr/lib/python3/dist-packages/smbus.cpython-35m-arm-
linux-gnueabihf.so
/usr/share
/usr/share/doc
/usr/share/doc/python3-smbus
/usr/share/doc/python3-smbus/changelog.Debian.gz
/usr/share/doc/python3-smbus/changelog.gz
/usr/share/doc/python3-smbus/copyright
apt-cache show python3-smbus shows:
Package: python3-smbus
Version: 3.1.2-3
Architecture: armhf
Maintainer: Aurelien Jarno <aurel32#debian.org>
Installed-Size: 31
Depends: libc6 (>=2.4), python3 (<< 3.6), python3 (>=
3.5~), python3:any (>= 3.0~)
Recommends: i2c-tools
Provides: python3.5-smbus
.
.
.
Any ideas how to get this working?
Garry O.
The python3-smbus library which is installed on your system seems a little old. It works for Python 3.5 but not for Python 3.7.
You have two solutions:
downgrade your Python to use Python 3.5
choose another library: you can try smbus2 which is more uptodate.
I don't have a RPi to test this on, but when I was in HackerSpace I also built python on R-Pi. I ran into this exact same problem and found a fix that may work for you. You will need to open the config file: "sudo nano /boot/config.txt" and add the line "dtparam=i2c_arm=on" after you save it run "sudo raspi-config". Under advanced options you will find 7l2c select "Yes".

dependencies of python 27 for RHEL5

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

Installing (build) matplotlib in mac osx lion

I installed pynum and scipy (on osx Lion with python 2.7), but when I tried to build matplotlib
git clone https://github.com/matplotlib/matplotlib.git
cd matplotlib
python setup.py build
python setup.py install
I've got these errors:
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/ATS.framework/Headers/ATSTypes.h:242: error: declaration for parameter ‘FMFontDirectoryFilter’ but no such parameter
src/_macosx.m:5912: error: expected ‘{’ at end of input
lipo: can't open input file: /var/folders/qw/pr2f7vq91b3c3ngkxrrqplm8zkv09r/T//ccAgEklo.out (No such file or directory)
error: command 'llvm-gcc-4.2' failed with exit status 1
Could somebody please tell me what is the problem?
P.S.
At first I tried to install it in this way:
pip install -e git+https://github.com/matplotlib/matplotlib#egg=matplotlib-dev
but it does not worked for me
I always find this process more painful than it should be, but I've done it a few times now and I believe that these steps should get you set up:
Get Xcode 4.3.2, it's required for some of the later steps.
Download the latest version of python for OSX from python.org
Grab the Scipy superpack.
Uninstall any previous versions of numpy/matplotlib/scipy that you currently have. That includes doing cd /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/ and moving any numpy/matplotlib/scipy directories or eggs into a temp directory.
cd ~/Downloads(or wherever you downloaded the superpack script to) and run sh install_superpack.sh. Answer no to the question are you installing from a repository cloned to this machine or you'll be confused about why the script keeps failing.
That should be it! You should now be able to boot up the python console and import numpy, scipy, matplotlib.

Homebrew failing to install postgresql; python 64-bit errors

I'm getting errors when running
$ brew install postgresql
==> Downloading http://ftp.postgresql.org/pub/source/v9.1.2/postgresql-9.1.2.tar.bz2
File already downloaded in /Users/neil/Library/Caches/Homebrew
Warning: Detected a framework Python that does not have 64-bit support in:
/Library/Frameworks/Python.framework/Versions/Current/Python
e configure script seems to prefer this version of Python over any others,
you may experience linker problems as described in:
http://osdir.com/ml/pgsql-general/2009-09/msg00160.html
fix this issue, you may need to either delete the version of Python
own above, or move it out of the way before brewing PostgreSQL.
te that a framework Python in /Library/Frameworks/Python.framework is
e "MacPython" version, and not the system-provided version which is in:
/System/Library/Frameworks/Python.framework
==> ./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.1.2 --datadir=/usr/local/Cellar/postgresql/9.1.2/shar
^C
Here's where python is located.
$ which python
/usr/local/bin/python
I modified my ~/.zshrc PATH from
export PATH=/Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
to
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
And although I'm getting python 64-bit errors, my version of python is 64-bit according to this SO post:
$ python -c 'import struct;print( 8 * struct.calcsize("P"))'
64
The problem pointed out in the referenced mailing list post is that the configure step isn't impacted by the PATH here. There's a whole other mechanism used to find things to link against; see Where do I set DYLD_LIBRARY_PATH on Mac OS X for a quick intro. You could try the suggested workaround given by the brew script--rename /Library/Frameworks/Python.framework/Versions/Current/Python to something else to get it out of the linker's search path, repeat the brew install, then put it back.
If you don't need Python bindings in your PostgreSQL, you can also just install it without Python bindings using brew install postgresql --no-python.
This command is installing the server, not the python bindings. Is that what you want? There is a installer for osx that will install the server for you.
Once you have done that, you can install the psycopg2 bindings directly from source.

Categories