P1sec / pysctp

SCTP stack for Python
http://www.p1sec.com
165 stars 67 forks source link

Unable to install pysctp #37

Closed vineet-rarisystems closed 3 years ago

vineet-rarisystems commented 3 years ago

I cloned the repo ran sudo python3 setup.py install

I get the following error, can someone please help me to debug it?

running install
running bdist_egg
running egg_info
writing pysctp.egg-info/PKG-INFO
writing dependency_links to pysctp.egg-info/dependency_links.txt
writing top-level names to pysctp.egg-info/top_level.txt
reading manifest file 'pysctp.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'TODO'
writing manifest file 'pysctp.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
building '_sctp' extension
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I. -I/usr/include -I/usr/include/python3.6m -c _sctp.c -o build/temp.linux-x86_64-3.6/_sctp.o
_sctp.c:24:10: fatal error: netinet/sctp.h: No such file or directory
 #include <netinet/sctp.h>
          ^~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

I have install python-dev and python3-dev any help would be appreciated

amanone commented 3 years ago

It seems that you don't have the libsctp package installed on your system

On Ubuntu you can install it using apt install:

sudo apt install libsctp-dev

Then the missing header and libsctp.a library will be installed on your system, you can confirm with the following command:

dpkg-query --listfiles libsctp-dev|grep "netinet/sctp.h"