pcap.h no such file or directory - shared-libraries

I'm trying to install Fluxion on Kali Linux 20.2
All installed fine except Pyrit
Trying to install Pyrit on the side
python setup.py clean
python setup.py build
I receive the following :
fatal error: pcap.h: No such file or directory
Which is weird because I have installed succesfully Libcap-dev, apt-get install libcap-dev returns:
libcap-dev is already the newest version (1:2.34-2).
Any help appreciated!

I got it right, I missed the p : libpcap-dev, not libcap-dev

Related

I'm getting errors while installing pygame on my Chromebook, and to make matters worse, the website is down? Please tell me why [duplicate]

I used
./configure --prefix=$HOME
make
make install
to install sdl2,
after which I tried to install pygame by
cd ../pygame-1.9.1release/
python setup.py install
but I am getting an error:
linuxnx:~/python/library/pygame-1.9.1release> python setup.py install
WARNING, No "Setup" File Exists, Running "config.py"
Using UNIX configuration...
Hunting dependencies...
sh: sdl-config: command not found
WARNING: "sdl-config" failed!
sh: smpeg-config: command not found
WARNING: "smpeg-config" failed!
Unable to run "sdl-config". Please make sure a development version of SDL is installed.
I searched a long time, cause I needed the package for Python Crash Course by Eric Matthes, but couldn't find the answer that would help running
pip install pygame
without errors and finally found 1 line solution that worked for me
sudo apt-get install python-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libsdl1.2-dev libsmpeg-dev python-numpy subversion libportmidi-dev ffmpeg libswscale-dev libavformat-dev libavcodec-dev libfreetype6-dev
I'm seeing that this thread has been around for a long time, but I think it's a good idea to leave this here in case it helps someone.
I found these lines on a website that might help:
At the moment, 5/1/2020, you cannot install the pygame libraries in
python 3.8 with pip install pygame, bu you can install them with a
particular version of them, still for dev. You can install Python 3.8
in the command line using this version: pip install pygame==2.0.0.dev6
Latest version: pip install pygame==2.0.0.dev10
I don't know if you use python3 but it throws me more errors apart from sdl
as well as freetype-config ... Before I used "python3 -m pip install pygame".
:~$ python3 -m pip install pygame==2.0.0.dev10
Collecting pygame==2.0.0.dev10
Downloading pygame-2.0.0.dev10-cp38-cp38-manylinux1_x86_64.whl (14.3 MB)
|████████████████████████████████| 14.3 MB 130 kB/s
Installing collected packages: pygame
Successfully installed pygame-2.0.0.dev10
Nice programming time for all!! =)
ORIGINAL: 2013.10.25
PyGame-1.9.1 was created in 2009 so it still use old SDL 1.2 not new SDL2.
PySDL2 use SDL2
EDIT: 2021.10.17
Question and my original answer is almost 8 years old and it seems author removed PySDL2 from URL in my old answer. He moved code from bitbucket to github
Using Google I found
doc: https://pysdl2.readthedocs.io/
pypi: https://pypi.org/project/PySDL2/
github: https://github.com/marcusva/py-sdl2
And meanwhile PyGame started to use SDL2.
Pygame.org: pygame 2 — 28 Oct, 2020
GitHub: Release note
See also all releases
Try this in the terminal , It should installs the sdl 1.2
# make a temporary directory where we can download and build stuff
mkdir tmp
cd tmp
# download and install SDL
wget http://www.libsdl.org/release/SDL-1.2.14.tar.gz
tar -xzvf SDL-1.2.14.tar.gz
cd SDL-1.2.14
./configure
sudo make all
After I read top answer above,
I installed python-dev, libsdl-image1.2-dev.
Then I got
Hunting dependencies...
WARNING: "pkg-config freetype2" failed!
WARNING: "freetype-config" failed!
SDL : found 1.2.15
FONT : not found
IMAGE : found
MIXER : not found
PNG : found
JPEG : found
SCRAP : found
PORTMIDI: not found
PORTTIME: not found
FREETYPE: not found
Missing dependencies
So I just installed these and it worked.
sudo apt install python-dev libsdl-image1.2-dev libsdl-mixer1.2-dev libsdl-ttf2.0-dev libportmidi-dev libfreetype6-dev
This error showed up once again in Pygame-2.0.0.dev12
The solution for me was:
sudo apt-get install libsdl2-dev
Then I got
Hunting dependencies...
SDL : found 2.0.9
FONT : not found
IMAGE : not found
MIXER : not found
PNG : found
JPEG : found
SCRAP : found
PORTMIDI: found
PORTTIME: found
FREETYPE: found 22.1.16
So I ran this command below:
sudo apt-get install libsdl2-mixer-dev libsdl2-image-dev libsdl2-ttf-dev
To wrap up the missing dependencies

gem5 scons build fails with "TypeError: argument should be integer or bytes-like object, not 'str'"

I am trying to install gem5 on a fresh installation of Ubuntu 20.04 and using commit 9fc9c67b4242c03f165951775be5cd0812f2a705. I have used
http://learning.gem5.org/book/part1/building.html
and
https://www.gem5.org/documentation/general_docs/building
as my guide. As near as I can tell, I have installed all the required dependencies using (some dependencies are repeated in these two lines)
sudo apt install build-essential git m4 scons zlib1g zlib1g-dev libprotobuf-dev protobuf-compiler libprotoc-dev libgoogle-perftools-dev python-dev python
sudo apt install build-essential git m4 scons zlib1g zlib1g-dev \
libprotobuf-dev protobuf-compiler libprotoc-dev libgoogle-perftools-dev \
python-dev python libboost-all-dev
Then, when I try to build gem5 using
git clone https://gem5.googlesource.com/public/gem5
cd gem5
scons build/X86/gem5.opt -j8
I get the following output after executing the 'scons' line:
scons: Reading SConscript files ...
Warning: Failed to find git repo directory: a bytes-like object is required, not 'str'
TypeError: argument should be integer or bytes-like object, not 'str':
File "/home/john/gem5/SConstruct", line 355:
main['GCC'] = CXX_version and CXX_version.find('g++') >= 0
I am not sure how to fix this error or even why this error is occurring; I don't even really know what this error is saying. Any help would be appreciated.
Yes. That's the result of running a build system implemented in scons expecting only python2.
If you're stuck here's what you can do to be able to compile until the gem project pushes their Python 3 + SCons changes.
sudo apt-get install virtualenv
# create a virtualenv which uses python 2.7
virtualenv -p python2.7 venv27
# activate the virtualenv
. venv27/bin/activate
# Install SCons in the python 2.7 virtualenv
pip install scons
# This will now use the scons installed in a python 2.7 virtualenv.
scons build/X86/gem5.opt -j8
This worked for me on an Ubuntu 20.04 system.

getting an error when trying to run uwsgi: error while loading shared libraries: libpython3.4m.so.1.0

I've been runing uwsgi like so:
uwsgi --ini CMS_uwsgi.ini
and it used to work. However, I tried running uwsgi again after a couple weeks and I get this error now:
uwsgi: error while loading shared libraries: libpython3.4m.so.1.0:
cannot open shared object file: No such file or directory
I'm not sure why I'm getting this error now. It Might be because recently, I did
sudo apt-get autoremove
to remove installed packages that used to be installed as dependencies but aren't any longer (as mentioned here https://askubuntu.com/questions/187888/what-is-the-correct-way-to-completely-remove-an-application).
I tried to find it by running:
find -name "libpython3.4m.so.1.0"
but it did not return anything. Any idea on how to solve this issue?
I am using Lubuntu.
Found the answer. First, did
pip uninstall uwsgi
then tried installing it again:
pip install uwsgi
but it gave me the error:
plugins/python/uwsgi_python.h:2:20: fatal error: Python.h: No such file or directory
I google'd around and came across this post: https://askubuntu.com/questions/182313/install-uwsgi-1-2-5-via-pip which mentioned to install
sudo apt-get install python2.7-dev
so I installed python2.7-dev and retried installed uwsgi but got the same error. Realized I was using python3, came across this post: Cannot install uWSGI on Ubuntu 14.04 with Python 3.4 (paths?) which mentions to do
sudo apt-get install python3-dev
I did that and retried installing uwsgi and it worked fine again.
If you trying to run uwsgi in a virtual environment. Then run the following
pip install python-pcre
Now, try running the wsgi. Hope this helps!

Still can't install pygame on ubuntu

I've tried three different ways. The most recent was following instructions here: http://www.pygame.org/wiki/CompileUbuntu
But when I type in the first line
sudo apt-get install mercurial python-dev python-numpy ffmpeg \
I am told that
E: Package 'ffmpeg' has no installation candidate.
I continue on with the instructions and I am later told that some of the dependencies are missing (even though those are the ones I had attempted to install moments ago).
Then when I put in
sudo python3 setup.py install
it tells me
src/_pygame.h:80:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'i686-linux-gnu-gcc' failed with exit status 1
I recently had this problem. Try:
sudo apt-get install python-pygame
If that doesn't work you could try reinstalling python. The following command line will remove all python modules and reinstall python. After that try the command above again. If you have any other downloaded python modules or idles you will need to reinstall them.
sudo apt-get purge python && sudo apt-get install python2.7

error installing xmpp python lib in ubuntu

how to install xmpp python lib in ubuntu?
i downloaded this lib file
http://archive.ubuntu.com/ubuntu/pool/main/p/python-xmpp/python-xmpp_0.2-rc3.orig.tar.gz
when i say make install its giving me error
ubuntu#ubuntu:/media/DATA/ubuntu/xmpppy-0.2-rc3$ make install
Add here commands to install the package into debian/python-xmpp
[ -d /xmpp ] || mkdir /xmpp
mkdir: cannot create directory `/xmpp': Permission denied
make: * [install] Error 1
please help
thanks in advance
It's a python package which uses setuptools to install, so make sure you have setuptools installed (sudo apt-get install python-setuptools). Next, extract your xmpp package somewhere, and run setup tools like this:
sudo python setup.py install
That should to the trick.

Resources