I’m exploring the use of the LDAP proxy with PrivacyIDEA, however, it looks like the instructions on GitHub are out of date or not for my distribution of Linux. Also, keep in mind that I am not deeply experienced with Linux. I know my way around and can perform basic functions but with the errors I am getting, I’m left scratching my head. I’m running PrivacyIDEA 3.0.1 on Ubuntu Server 16.04
Based on the instructions, I did the following:
root@localhost:/home/administrator# virtualenv2 venv
No command 'virtualenv2' found, did you mean:
Command 'virtualenv' from package 'virtualenv' (universe)
virtualenv2: command not found
root@localhost:/home/administrator# virtualenv venv
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/administrator/venv/bin/python2
Also creating executable in /home/administrator/venv/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
root@localhost:/home/administrator# . ./venv/bin/activate
nano requirements.txt
Copied contents of requirements.txt from GitHub into requirements.txt in Linux.
pip install -r requirements.txt
At this point a lot of things happen but then an error occurs that is larger than the buffer so I can’t see exactly where the failure is. At the bottom of the fail, the following appears:
running build_ext
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c conftest.c -o conftest.o
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
building 'twisted.test.raiser' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/twisted
creating build/temp.linux-x86_64-2.7/src/twisted/test
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/twisted/test/raiser.c -o build/temp.linux-x86_64-2.7/src/twisted/test/raiser.o
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for Twisted
It then runs the following and errors out again, filling a significant portion of the buffer.
Running setup.py clean for Twisted
Failed to build pycrypto Twisted
Installing collected packages: asn1crypto, appdirs, attrs, pycparser, cffi, configobj, constantly, enum34, idna, six, ipaddress, cryptography, incremental, pyOpenSSL, zope.interface, Twisted, pycrypto, pyparsing, ldaptor, packaging, pyasn1, pyasn1-modules, service-identity, wheel
Running setup.py install for Twisted ... error
This is what is at the end of the error
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c conftest.c -o conftest.o
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
building 'twisted.test.raiser' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
creating build/temp.linux-x86_64-2.7/src/twisted
creating build/temp.linux-x86_64-2.7/src/twisted/test
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c src/twisted/test/raiser.c -o build/temp.linux-x86_64-2.7/src/twisted/test/raiser.o
unable to execute 'x86_64-linux-gnu-gcc': No such file or directory
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /home/administrator/venv/bin/python2 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_Fsfr1/Twisted/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_Fsfr1/Twisted/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-vrDFac/install-record.txt --single-version-externally-managed --compile --install-headers /home/administrator/venv/include/site/python2.7/Twisted Check the logs for full command output.
At this point I believe it’s because I didn’t install twisted first, so I try to install twisted and get the following:
root@localhost:/home/administrator# apt-get install python-twisted
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
python-twisted : Depends: python-twisted-core (>= 16.0.0-1ubuntu0.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Running apt-mark showhold
doesn’t show any held packages and no matter how far down the line I seem to go trying to install package dependencies, I get the same kind of error…x package requires y dependency but will not be installed
Where am I going wrong here???