Error when installing django-auth-ldap on Rocky Linux 8.6 Installation #10524
electricd7
started this conversation in
General
Replies: 1 comment
-
Found a solution. I had to install gcc and python38-devel.x86_64 to get this to work. I did so with the following should anyone run into the same issues:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello-
I am a brand new netbox user and have tried searching everywhere for this issue before posting. I have a working installation of Netbox running on a new RockyLinux 8.6 installation. I am trying to get LDAP working against my Windows AD environment but keep getting errors when trying the following lines from the installation document:
source /opt/netbox/venv/bin/activate
pip3 install django-auth-ldap
After I run those commands I get the following indicating an error:
`Collecting django-auth-ldap
Using cached django_auth_ldap-4.1.0-py3-none-any.whl (20 kB)
Requirement already satisfied: Django>=2.2 in ./venv/lib/python3.8/site-packages (from django-auth-ldap) (4.0.7)
Collecting python-ldap>=3.1
Using cached python-ldap-3.4.3.tar.gz (377 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: asgiref<4,>=3.4.1 in ./venv/lib/python3.8/site-packages (from Django>=2.2->django-auth-ldap) (3.5.2)
Requirement already satisfied: sqlparse>=0.2.2 in ./venv/lib/python3.8/site-packages (from Django>=2.2->django-auth-ldap) (0.4.3)
Requirement already satisfied: backports.zoneinfo in ./venv/lib/python3.8/site-packages (from Django>=2.2->django-auth-ldap) (0.2.1)
Collecting pyasn1>=0.3.7
Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Collecting pyasn1-modules>=0.1.5
Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB)
Building wheels for collected packages: python-ldap
Building wheel for python-ldap (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for python-ldap (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [80 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-38
copying Lib/ldapurl.py -> build/lib.linux-x86_64-cpython-38
copying Lib/ldif.py -> build/lib.linux-x86_64-cpython-38
creating build/lib.linux-x86_64-cpython-38/ldap
copying Lib/ldap/init.py -> build/lib.linux-x86_64-cpython-38/ldap
copying Lib/ldap/async.py -> build/lib.linux-x86_64-cpython-38/ldap
copying Lib/ldap/asyncsearch.py -> build/lib.linux-x86_64-cpython-38/ldap
copying Lib/ldap/cidict.py -> build/lib.linux-x86_64-cpython-38/ldap
copying Lib/ldap/compat.py -> build/lib.linux-x86_64-cpython-38/ldap
copying Lib/ldap/constants.py -> build/lib.linux-x86_64-cpython-38/ldap
copying Lib/ldap/dn.py -> build/lib.linux-x86_64-cpython-38/ldap
copying Lib/ldap/filter.py -> build/lib.linux-x86_64-cpython-38/ldap
copying Lib/ldap/functions.py -> build/lib.linux-x86_64-cpython-38/ldap
copying Lib/ldap/ldapobject.py -> build/lib.linux-x86_64-cpython-38/ldap
copying Lib/ldap/logger.py -> build/lib.linux-x86_64-cpython-38/ldap
copying Lib/ldap/modlist.py -> build/lib.linux-x86_64-cpython-38/ldap
copying Lib/ldap/pkginfo.py -> build/lib.linux-x86_64-cpython-38/ldap
copying Lib/ldap/resiter.py -> build/lib.linux-x86_64-cpython-38/ldap
copying Lib/ldap/sasl.py -> build/lib.linux-x86_64-cpython-38/ldap
copying Lib/ldap/syncrepl.py -> build/lib.linux-x86_64-cpython-38/ldap
creating build/lib.linux-x86_64-cpython-38/ldap/controls
copying Lib/ldap/controls/init.py -> build/lib.linux-x86_64-cpython-38/ldap/controls
copying Lib/ldap/controls/deref.py -> build/lib.linux-x86_64-cpython-38/ldap/controls
copying Lib/ldap/controls/libldap.py -> build/lib.linux-x86_64-cpython-38/ldap/controls
copying Lib/ldap/controls/openldap.py -> build/lib.linux-x86_64-cpython-38/ldap/controls
copying Lib/ldap/controls/pagedresults.py -> build/lib.linux-x86_64-cpython-38/ldap/controls
copying Lib/ldap/controls/ppolicy.py -> build/lib.linux-x86_64-cpython-38/ldap/controls
copying Lib/ldap/controls/psearch.py -> build/lib.linux-x86_64-cpython-38/ldap/controls
copying Lib/ldap/controls/pwdpolicy.py -> build/lib.linux-x86_64-cpython-38/ldap/controls
copying Lib/ldap/controls/readentry.py -> build/lib.linux-x86_64-cpython-38/ldap/controls
copying Lib/ldap/controls/sessiontrack.py -> build/lib.linux-x86_64-cpython-38/ldap/controls
copying Lib/ldap/controls/simple.py -> build/lib.linux-x86_64-cpython-38/ldap/controls
copying Lib/ldap/controls/sss.py -> build/lib.linux-x86_64-cpython-38/ldap/controls
copying Lib/ldap/controls/vlv.py -> build/lib.linux-x86_64-cpython-38/ldap/controls
creating build/lib.linux-x86_64-cpython-38/ldap/extop
copying Lib/ldap/extop/init.py -> build/lib.linux-x86_64-cpython-38/ldap/extop
copying Lib/ldap/extop/dds.py -> build/lib.linux-x86_64-cpython-38/ldap/extop
copying Lib/ldap/extop/passwd.py -> build/lib.linux-x86_64-cpython-38/ldap/extop
creating build/lib.linux-x86_64-cpython-38/ldap/schema
copying Lib/ldap/schema/init.py -> build/lib.linux-x86_64-cpython-38/ldap/schema
copying Lib/ldap/schema/models.py -> build/lib.linux-x86_64-cpython-38/ldap/schema
copying Lib/ldap/schema/subentry.py -> build/lib.linux-x86_64-cpython-38/ldap/schema
copying Lib/ldap/schema/tokenizer.py -> build/lib.linux-x86_64-cpython-38/ldap/schema
creating build/lib.linux-x86_64-cpython-38/slapdtest
copying Lib/slapdtest/init.py -> build/lib.linux-x86_64-cpython-38/slapdtest
copying Lib/slapdtest/_slapdtest.py -> build/lib.linux-x86_64-cpython-38/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'
/tmp/pip-build-env-29o13voo/overlay/lib/python3.8/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
no previously-included directories found matching 'Doc/.build'
adding license file 'LICENCE'
writing manifest file 'Lib/python_ldap.egg-info/SOURCES.txt'
creating build/lib.linux-x86_64-cpython-38/slapdtest/certs
copying Lib/slapdtest/certs/README -> build/lib.linux-x86_64-cpython-38/slapdtest/certs
copying Lib/slapdtest/certs/ca.conf -> build/lib.linux-x86_64-cpython-38/slapdtest/certs
copying Lib/slapdtest/certs/ca.pem -> build/lib.linux-x86_64-cpython-38/slapdtest/certs
copying Lib/slapdtest/certs/client.conf -> build/lib.linux-x86_64-cpython-38/slapdtest/certs
copying Lib/slapdtest/certs/client.key -> build/lib.linux-x86_64-cpython-38/slapdtest/certs
copying Lib/slapdtest/certs/client.pem -> build/lib.linux-x86_64-cpython-38/slapdtest/certs
copying Lib/slapdtest/certs/gencerts.sh -> build/lib.linux-x86_64-cpython-38/slapdtest/certs
copying Lib/slapdtest/certs/gennssdb.sh -> build/lib.linux-x86_64-cpython-38/slapdtest/certs
copying Lib/slapdtest/certs/server.conf -> build/lib.linux-x86_64-cpython-38/slapdtest/certs
copying Lib/slapdtest/certs/server.key -> build/lib.linux-x86_64-cpython-38/slapdtest/certs
copying Lib/slapdtest/certs/server.pem -> build/lib.linux-x86_64-cpython-38/slapdtest/certs
running build_ext
building '_ldap' extension
creating build/temp.linux-x86_64-cpython-38
creating build/temp.linux-x86_64-cpython-38/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 -DLDAPMODULE_VERSION=3.4.3 "-DLDAPMODULE_AUTHOR=python-ldap project" "-DLDAPMODULE_LICENSE=Python style" -IModules -I/opt/netbox/venv/include -I/usr/include/python3.8 -c Modules/LDAPObject.c -o build/temp.linux-x86_64-cpython-38/Modules/LDAPObject.o
error: command 'gcc' failed: No such file or directory
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for python-ldap
Failed to build python-ldap
ERROR: Could not build wheels for python-ldap, which is required to install pyproject.toml-based projects`
I tried to go ahead and continue the installation as I didn't really understand the error, but when I browse to Netbox after restarting the service the screen just shows a server error:
<class 'django.core.exceptions.ImproperlyConfigured'>
LDAP authentication has been configured, but django-auth-ldap is not installed.
Python version: 3.8.12
NetBox version: 3.3.4
What can I do to resolve this issue?
Beta Was this translation helpful? Give feedback.
All reactions