-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Description
NetBox version
3.0.3
Python version
3.9
Steps to Reproduce
[root@HOSTNAME tmp]# source /opt/netbox/venv/bin/activate
(venv) [root@HOSTNAMEtmp]# pip3 install django-auth-ldap
Collecting django-auth-ldap
Using cached django_auth_ldap-3.0.0-py3-none-any.whl (20 kB)
Collecting python-ldap>=3.1
Using cached python-ldap-3.3.1.tar.gz (379 kB)
Requirement already satisfied: Django>=2.2 in /opt/netbox/venv/lib/python3.9/site-packages (from django-auth-ldap) (3.2.7)
Requirement already satisfied: pytz in /opt/netbox/venv/lib/python3.9/site-packages (from Django>=2.2->django-auth-ldap) (2021.1)
Requirement already satisfied: sqlparse>=0.2.2 in /opt/netbox/venv/lib/python3.9/site-packages (from Django>=2.2->django-auth-ldap) (0.4.2)
Requirement already satisfied: asgiref<4,>=3.3.2 in /opt/netbox/venv/lib/python3.9/site-packages (from Django>=2.2->django-auth-ldap) (3.4.1)
Requirement already satisfied: pyasn1>=0.3.7 in /opt/netbox/venv/lib/python3.9/site-packages (from python-ldap>=3.1->django-auth-ldap) (0.4.8)
Requirement already satisfied: pyasn1_modules>=0.1.5 in /opt/netbox/venv/lib/python3.9/site-packages (from python-ldap>=3.1->django-auth-ldap) (0.2.8)
Building wheels for collected packages: python-ldap
Building wheel for python-ldap (setup.py) ... error
ERROR: Command errored out with exit status 1:
command: /opt/netbox/venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7tp685ju/python-ldap_aa49763381944568b119f0d19217696b/setup.py'"'"'; file='"'"'/tmp/pip-install-7tp685ju/python-ldap_aa49763381944568b119f0d19217696b/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-vx54ddr0
cwd: /tmp/pip-install-7tp685ju/python-ldap_aa49763381944568b119f0d19217696b/
Complete output (82 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
copying Lib/ldapurl.py -> build/lib.linux-x86_64-3.9
copying Lib/ldif.py -> build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/init.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/async.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/asyncsearch.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/compat.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/constants.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/dn.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/filter.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/functions.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/logger.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-3.9/ldap
creating build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/init.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/pagedresults.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/vlv.py -> build/lib.linux-x86_64-3.9/ldap/controls
creating build/lib.linux-x86_64-3.9/ldap/extop
copying Lib/ldap/extop/init.py -> build/lib.linux-x86_64-3.9/ldap/extop
copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-3.9/ldap/extop
copying Lib/ldap/extop/passwd.py -> build/lib.linux-x86_64-3.9/ldap/extop
creating build/lib.linux-x86_64-3.9/ldap/schema
copying Lib/ldap/schema/init.py -> build/lib.linux-x86_64-3.9/ldap/schema
copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-3.9/ldap/schema
copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-3.9/ldap/schema
copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-3.9/ldap/schema
creating build/lib.linux-x86_64-3.9/slapdtest
copying Lib/slapdtest/init.py -> build/lib.linux-x86_64-3.9/slapdtest
copying Lib/slapdtest/_slapdtest.py -> build/lib.linux-x86_64-3.9/slapdtest
running egg_info
writing Lib/python_ldap.egg-info/PKG-INFO
writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
writing requirements to Lib/python_ldap.egg-info/requires.txt
writing top-level names to Lib/python_ldap.egg-info/top_level.txt
reading manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'Doc/.build'
writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
creating build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/README -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/ca.conf -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/ca.pem -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/client.conf -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/client.key -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/client.pem -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/gencerts.sh -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/gennssdb.sh -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/server.conf -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/server.key -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/server.pem -> build/lib.linux-x86_64-3.9/slapdtest/certs
running build_ext
building '_ldap' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/Modules
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.3.1 -DLDAPMODULE_AUTHOR=python-ldap project -DLDAPMODULE_LICENSE=Python style -IModules -I/opt/netbox/venv/include -I/usr/include/python3.9 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-3.9/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:3:
Modules/common.h:9:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
ERROR: Failed building wheel for python-ldap
Running setup.py clean for python-ldap
Failed to build python-ldap
Installing collected packages: python-ldap, django-auth-ldap
Running setup.py install for python-ldap ... error
ERROR: Command errored out with exit status 1:
command: /opt/netbox/venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7tp685ju/python-ldap_aa49763381944568b119f0d19217696b/setup.py'"'"'; file='"'"'/tmp/pip-install-7tp685ju/python-ldap_aa49763381944568b119f0d19217696b/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-3y6mblp9/install-record.txt --single-version-externally-managed --compile --install-headers /opt/netbox/venv/include/site/python3.9/python-ldap
cwd: /tmp/pip-install-7tp685ju/python-ldap_aa49763381944568b119f0d19217696b/
Complete output (82 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
copying Lib/ldapurl.py -> build/lib.linux-x86_64-3.9
copying Lib/ldif.py -> build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/init.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/async.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/asyncsearch.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/compat.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/constants.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/dn.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/filter.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/functions.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/logger.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-3.9/ldap
copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-3.9/ldap
creating build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/init.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/pagedresults.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-3.9/ldap/controls
copying Lib/ldap/controls/vlv.py -> build/lib.linux-x86_64-3.9/ldap/controls
creating build/lib.linux-x86_64-3.9/ldap/extop
copying Lib/ldap/extop/init.py -> build/lib.linux-x86_64-3.9/ldap/extop
copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-3.9/ldap/extop
copying Lib/ldap/extop/passwd.py -> build/lib.linux-x86_64-3.9/ldap/extop
creating build/lib.linux-x86_64-3.9/ldap/schema
copying Lib/ldap/schema/init.py -> build/lib.linux-x86_64-3.9/ldap/schema
copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-3.9/ldap/schema
copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-3.9/ldap/schema
copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-3.9/ldap/schema
creating build/lib.linux-x86_64-3.9/slapdtest
copying Lib/slapdtest/init.py -> build/lib.linux-x86_64-3.9/slapdtest
copying Lib/slapdtest/_slapdtest.py -> build/lib.linux-x86_64-3.9/slapdtest
running egg_info
writing Lib/python_ldap.egg-info/PKG-INFO
writing dependency_links to Lib/python_ldap.egg-info/dependency_links.txt
writing requirements to Lib/python_ldap.egg-info/requires.txt
writing top-level names to Lib/python_ldap.egg-info/top_level.txt
reading manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
no previously-included directories found matching 'Doc/.build'
writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
creating build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/README -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/ca.conf -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/ca.pem -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/client.conf -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/client.key -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/client.pem -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/gencerts.sh -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/gennssdb.sh -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/server.conf -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/server.key -> build/lib.linux-x86_64-3.9/slapdtest/certs
copying Lib/slapdtest/certs/server.pem -> build/lib.linux-x86_64-3.9/slapdtest/certs
running build_ext
building '_ldap' extension
creating build/temp.linux-x86_64-3.9
creating build/temp.linux-x86_64-3.9/Modules
gcc -pthread -Wno-unused-result -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -D_GNU_SOURCE -fPIC -fwrapv -fPIC -DHAVE_SASL -DHAVE_TLS -DHAVE_LIBLDAP_R -DHAVE_LIBLDAP_R -DLDAPMODULE_VERSION=3.3.1 -DLDAPMODULE_AUTHOR=python-ldap project -DLDAPMODULE_LICENSE=Python style -IModules -I/opt/netbox/venv/include -I/usr/include/python3.9 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-3.9/Modules/LDAPObject.o
In file included from Modules/LDAPObject.c:3:
Modules/common.h:9:10: fatal error: Python.h: No such file or directory
#include "Python.h"
^~~~~~~~~~
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /opt/netbox/venv/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7tp685ju/python-ldap_aa49763381944568b119f0d19217696b/setup.py'"'"'; file='"'"'/tmp/pip-install-7tp685ju/python-ldap_aa49763381944568b119f0d19217696b/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-3y6mblp9/install-record.txt --single-version-externally-managed --compile --install-headers /opt/netbox/venv/include/site/python3.9/python-ldap Check the logs for full command output.
Expected Behavior
Install package django-auth-ldap so I can activate LDAP auth.
Observed Behavior
Installation of package "django-auth-ldap" crashes with error.