0
Not a bug

pip ajenti error at Amazon Linux

Kazuhiro ALBERO fa 10 anys updated by Hidetaka Okamoto fa 7 anys 20
Hello, thank you for your very good project!

When I try to install ajenti at Amazon Linux, pip echo errors.
Please check it. :)

[root@ip-172-31-11-195 tmp]# pip install ajenti
Downloading/unpacking ajenti
Downloading ajenti-1.2.22.10-py2.py3-none-any.whl (1.5MB): 1.5MB downloaded
Downloading/unpacking python-ldap (from ajenti)
Downloading python-ldap-2.4.15.tar.gz (111kB): 111kB downloaded
Running setup.py (path:/tmp/pip_build_root/python-ldap/setup.py) egg_info for package python-ldap
defines: HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
extra_compile_args:
extra_objects:
include_dirs: /opt/openldap-RE24/include /usr/include/sasl /usr/include
library_dirs: /opt/openldap-RE24/lib /usr/lib
libs: ldap_r
file Lib/ldap.py (for module ldap) not found
file Lib/ldap/controls.py (for module ldap.controls) not found
file Lib/ldap/extop.py (for module ldap.extop) not found
file Lib/ldap/schema.py (for module ldap.schema) not found
warning: no files found matching 'Makefile'
warning: no files found matching 'Modules/LICENSE'
Downloading/unpacking Pillow (from ajenti)
Downloading Pillow-2.5.3.zip (6.9MB): 6.9MB downloaded
Running setup.py (path:/tmp/pip_build_root/Pillow/setup.py) egg_info for package Pillow
Single threaded build, not installing mp_compile: 1 processes
warning: no files found matching '*.bdf' under directory 'Images'
warning: no files found matching '*.fli' under directory 'Images'
warning: no files found matching '*.gif' under directory 'Images'
warning: no files found matching '*.icns' under directory 'Images'
warning: no files found matching '*.ico' under directory 'Images'
warning: no files found matching '*.jpg' under directory 'Images'
warning: no files found matching '*.pbm' under directory 'Images'
warning: no files found matching '*.pil' under directory 'Images'
warning: no files found matching '*.png' under directory 'Images'
warning: no files found matching '*.ppm' under directory 'Images'
warning: no files found matching '*.psd' under directory 'Images'
warning: no files found matching '*.tar' under directory 'Images'
warning: no files found matching '*.webp' under directory 'Images'
warning: no files found matching '*.xpm' under directory 'Images'
warning: no files found matching 'README' under directory 'Sane'
warning: no files found matching 'README' under directory 'Scripts'
warning: no files found matching '*.txt' under directory 'Tk'
Downloading/unpacking pyOpenSSL (from ajenti)
Downloading pyOpenSSL-0.14.tar.gz (128kB): 128kB downloaded
Running setup.py (path:/tmp/pip_build_root/pyOpenSSL/setup.py) egg_info for package pyOpenSSL
warning: no previously-included files matching '*.pyc' found anywhere in distribution
no previously-included directories found matching 'doc/_build'
Requirement already satisfied (use --upgrade to upgrade): python-daemon in /usr/lib/python2.6/site-packages (from ajenti)
Downloading/unpacking lxml>=2.2.4 (from ajenti)
Downloading lxml-3.3.6.tar.gz (3.5MB): 3.5MB downloaded
Running setup.py (path:/tmp/pip_build_root/lxml/setup.py) egg_info for package lxml
/usr/lib64/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
Building lxml version 3.3.6.
Building without Cython.
ERROR: /bin/sh: xslt-config: command not found

** make sure the development packages of libxml2 and libxslt are installed **

Using build configuration of libxslt
warning: no previously-included files found matching '*.py'
Downloading/unpacking passlib (from ajenti)
Downloading passlib-1.6.2.tar.gz (408kB): 408kB downloaded
Running setup.py (path:/tmp/pip_build_root/passlib/setup.py) egg_info for package passlib
Downloading/unpacking gevent-socketio (from ajenti)
Downloading gevent_socketio-0.3.6-py26-none-any.whl
Downloading/unpacking gevent (from ajenti)
Downloading gevent-1.0.1.tar.gz (1.5MB): 1.5MB downloaded
Running setup.py (path:/tmp/pip_build_root/gevent/setup.py) egg_info for package gevent
Downloading/unpacking python-exconsole>=0.1.5 (from ajenti)
Downloading python_exconsole-0.1.5-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): requests>=0.12.0 in /usr/lib/python2.6/site-packages (from ajenti)
Downloading/unpacking reconfigure>=0.1.43 (from ajenti)
Downloading reconfigure-0.1.57-py2.py3-none-any.whl (53kB): 53kB downloaded
Downloading/unpacking python-catcher (from ajenti)
Downloading python_catcher-0.1.7-py2.py3-none-any.whl
Downloading/unpacking gevent-websocket (from ajenti)
Downloading gevent-websocket-0.9.3.tar.gz
Running setup.py (path:/tmp/pip_build_root/gevent-websocket/setup.py) egg_info for package gevent-websocket
Downloading/unpacking psutil>=0.6.0 (from ajenti)
Downloading psutil-2.1.1.tar.gz (216kB): 216kB downloaded
Running setup.py (path:/tmp/pip_build_root/psutil/setup.py) egg_info for package psutil
warning: no previously-included files matching '*' found under directory 'docs/_build'
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python2.6/site-packages (from python-ldap->ajenti)
Downloading/unpacking cryptography>=0.2.1 (from pyOpenSSL->ajenti)
Downloading cryptography-0.5.4.tar.gz (320kB): 320kB downloaded
Running setup.py (path:/tmp/pip_build_root/cryptography/setup.py) egg_info for package cryptography
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/cryptography/setup.py", line 174, in <module>
"test": PyTest,
File "/usr/lib64/python2.6/distutils/core.py", line 113, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 221, in __init__
self.fetch_build_eggs(attrs.pop('setup_requires'))
File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 245, in fetch_build_eggs
parse_requirements(requires), installer=self.fetch_build_egg
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 550, in resolve
raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (six 1.2.0 (/usr/lib/python2.6/site-packages), Requirement.parse('six>=1.4.1'))
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

File "<string>", line 17, in <module>

File "/tmp/pip_build_root/cryptography/setup.py", line 174, in <module>

"test": PyTest,

File "/usr/lib64/python2.6/distutils/core.py", line 113, in setup

_setup_distribution = dist = klass(attrs)

File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 221, in __init__

self.fetch_build_eggs(attrs.pop('setup_requires'))

File "/usr/lib/python2.6/site-packages/setuptools/dist.py", line 245, in fetch_build_eggs

parse_requirements(requires), installer=self.fetch_build_egg

File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 550, in resolve

raise VersionConflict(dist,req) # XXX put more info here

pkg_resources.VersionConflict: (six 1.2.0 (/usr/lib/python2.6/site-packages), Requirement.parse('six>=1.4.1'))

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/cryptography
Storing debug log for failure in /root/.pip/pip.log

Answer

Answer
Not a bug
Building LXML PIP package requires libxml2-dev and libxslt-dev
Answer
Not a bug
Building LXML PIP package requires libxml2-dev and libxslt-dev
Thank you for your reply.

Ummm... in the first place, I gave up to install ajenti via yum.
Please give me a hint. :(

[root@ip-172-31-11-195 ajenti]# yum install ajenti
Loaded plugins: priorities, update-motd, upgrade-helper
977 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package ajenti.noarch 0:1.2.22.10-1 will be installed
--> Processing Dependency: python-psutil >= 0.6.0 for package: ajenti-1.2.22.10-1.noarch
--> Processing Dependency: reconfigure >= 0.1.46 for package: ajenti-1.2.22.10-1.noarch
--> Processing Dependency: python-exconsole >= 0.1.5 for package: ajenti-1.2.22.10-1.noarch
--> Processing Dependency: python-passlib for package: ajenti-1.2.22.10-1.noarch
--> Processing Dependency: python-lxml for package: ajenti-1.2.22.10-1.noarch
--> Processing Dependency: python-gevent-socketio for package: ajenti-1.2.22.10-1.noarch
--> Processing Dependency: python-ldap for package: ajenti-1.2.22.10-1.noarch
--> Processing Dependency: python-catcher for package: ajenti-1.2.22.10-1.noarch
--> Processing Dependency: python-gevent for package: ajenti-1.2.22.10-1.noarch
--> Processing Dependency: python-greenlet for package: ajenti-1.2.22.10-1.noarch
--> Processing Dependency: dbus-python for package: ajenti-1.2.22.10-1.noarch
--> Processing Dependency: python-gevent-websocket for package: ajenti-1.2.22.10-1.noarch
--> Running transaction check
---> Package ajenti.noarch 0:1.2.22.10-1 will be installed
--> Processing Dependency: python-lxml for package: ajenti-1.2.22.10-1.noarch
---> Package dbus-python.x86_64 0:0.83.0-6.1.8.amzn1 will be installed
--> Processing Dependency: libdbus-glib-1.so.2()(64bit) for package: dbus-python-0.83.0-6.1.8.amzn1.x86_64
---> Package python-catcher.noarch 0:0.1.7-1 will be installed
--> Processing Dependency: python-mako for package: python-catcher-0.1.7-1.noarch
---> Package python-exconsole.noarch 0:0.1.5-1 will be installed
---> Package python-gevent.x86_64 0:0.13.8-1.1.amzn1 will be installed
--> Processing Dependency: libevent-2.0.so.5()(64bit) for package: python-gevent-0.13.8-1.1.amzn1.x86_64
---> Package python-gevent-socketio.noarch 0:0.3.6-1 will be installed
---> Package python-gevent-websocket.noarch 0:0.9.3-1 will be installed
---> Package python-greenlet.x86_64 0:0.3.1-12.3.amzn1 will be installed
---> Package python-ldap.x86_64 0:2.3.10-1.11.amzn1 will be installed
---> Package python-passlib.noarch 0:1.5.3-1.el6 will be installed
---> Package python-psutil.x86_64 0:0.6.1-1.el6 will be installed
---> Package reconfigure.noarch 0:0.1.59-1 will be installed
--> Running transaction check
---> Package ajenti.noarch 0:1.2.22.10-1 will be installed
--> Processing Dependency: python-lxml for package: ajenti-1.2.22.10-1.noarch
---> Package dbus-glib.x86_64 0:0.86-6.9.amzn1 will be installed
---> Package libevent.x86_64 0:2.0.18-1.10.amzn1 will be installed
---> Package python-mako.noarch 0:0.8.1-1.2.amzn1 will be installed
--> Processing Dependency: python-beaker for package: python-mako-0.8.1-1.2.amzn1.noarch
--> Processing Dependency: python-markupsafe for package: python-mako-0.8.1-1.2.amzn1.noarch
--> Running transaction check
---> Package ajenti.noarch 0:1.2.22.10-1 will be installed
--> Processing Dependency: python-lxml for package: ajenti-1.2.22.10-1.noarch
---> Package python-beaker.noarch 0:1.5.4-9.2.amzn1 will be installed
--> Processing Dependency: python-paste for package: python-beaker-1.5.4-9.2.amzn1.noarch
---> Package python-markupsafe.x86_64 0:0.11-4.1.amzn1 will be installed
--> Running transaction check
---> Package ajenti.noarch 0:1.2.22.10-1 will be installed
--> Processing Dependency: python-lxml for package: ajenti-1.2.22.10-1.noarch
---> Package python-paste.noarch 0:1.7.4-2.5.amzn1 will be installed
--> Processing Dependency: pyOpenSSL for package: python-paste-1.7.4-2.5.amzn1.noarch
--> Running transaction check
---> Package ajenti.noarch 0:1.2.22.10-1 will be installed
--> Processing Dependency: python-lxml for package: ajenti-1.2.22.10-1.noarch
---> Package pyOpenSSL.x86_64 0:0.10-2.6.amzn1 will be installed
--> Finished Dependency Resolution
Error: Package: ajenti-1.2.22.10-1.noarch (ajenti)
Requires: python-lxml
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
[root@ip-172-31-11-195 ajenti]#
Which version of CentOS is your Linux based on? Also ensure that you have EPEL repo enabled
Thank you for your reply. :)

I'm using Amazon Linux AMI 2014.03.2

Thanks.
Sorry, but this doesn't answer the question. AMI is a rebranded RHEL, and I need to know whether it's RHEL5 or RHEL6 based. Only RHEL6 is supported by Ajenti. Also check if you have EPEL repo enabled.
Please wait a little. :)
Hello,

Amazon support say, "Amazon Linux AMI is designed to have compatibility as much as possible with RHEL6, and it is not basing on one one of distribution. "

>  Also check if you have EPEL repo enabled

I activated epel. 

[root@ip-172-31-11-195 ec2-user]# cat /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$base...
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=ep...
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

Thank you very much. :)
What happens if you try to install python-lxml directly?
Umm. :(

[root@ip-172-31-11-195 ec2-user]# yum install python-lxml
Loaded plugins: priorities, update-motd, upgrade-helper
977 packages excluded due to repository priority protections
No package python-lxml available.
Error: Nothing to do
One of these should work for you:

CentOS 6 ftp5.gwdg.de/pub/opensuse/repositories/server:/mail/CentOS_6/x86_64/python-lxml-2.3.3-20.1.x86_64.rpm
CentOS 6 ftp5.gwdg.de/pub/opensuse/repositories/server:/mail/CentOS_6/i386/python-lxml-2.3.3-20.1.i386.rpm
Hello,
oh.. run well.

Thank you! Thank you!
Hi,
I Installed ajenti, Thank you :)

However, daemon down soon.

[root@ip-172-31-11-195 tmp]# /etc/rc.d/init.d/ajenti start
Starting Ajenti:
05.09.2014 11:06 INFO Using config file /etc/ajenti/config.json
started [ OK ]
[root@ip-172-31-11-195 tmp]# /etc/rc.d/init.d/ajenti status
Ajenti is not running [ OK ]

Should I check first? :(

Thank you very much.
oh....

[root@ip-172-31-11-195 tmp]# ajenti-panel -v
05.09.2014 12:47 ajenti-panel:105 INFO Using config file /etc/ajenti/config.json
05.09.2014 12:47 ajenti-panel:130 INFO Ajenti starting in foreground
05.09.2014 12:47 registry.py:247 INFO registered crypt handler 'sha512_crypt': <class 'passlib.handlers.sha2_crypt.sha512_crypt'>
Traceback (most recent call last):
File "/usr/bin/ajenti-panel", line 137, in <module>
from ajenti import core
File "/usr/lib/python2.6/site-packages/ajenti/core.py", line 21, in <module>
from ajenti.middleware import SessionMiddleware, AuthenticationMiddleware
File "/usr/lib/python2.6/site-packages/ajenti/middleware.py", line 11, in <module>
from ajenti.users import UserManager
File "/usr/lib/python2.6/site-packages/ajenti/users.py", line 6, in <module>
import ajenti.usersync
File "/usr/lib/python2.6/site-packages/ajenti/usersync/__init__.py", line 4, in <module>
from adsync import ActiveDirectorySyncProvider
File "/usr/lib/python2.6/site-packages/ajenti/usersync/adsync.py", line 2, in <module>
import ldap
File "/usr/lib64/python2.6/site-packages/ldap/__init__.py", line 47, in <module>
from functions import open,initialize,init,get_option,set_option
File "/usr/lib64/python2.6/site-packages/ldap/functions.py", line 35, in <module>
from ldap.ldapobject import LDAPObject
File "/usr/lib64/python2.6/site-packages/ldap/ldapobject.py", line 39, in <module>
from ldap.controls import LDAPControl,DecodeControlTuples,EncodeControlTuples
File "/usr/lib64/python2.6/site-packages/ldap/controls/__init__.py", line 157, in <module>
from ldap.controls.simple import *
File "/usr/lib64/python2.6/site-packages/ldap/controls/simple.py", line 86, in <module>
KNOWN_RESPONSE_CONTROLS[ldap.CONTROL_MANAGEDSAIT] = ManageDSAITControl
AttributeError: 'module' object has no attribute 'CONTROL_MANAGEDSAIT'
This is likely caused by half-installed PIP packages :/
Try: pip uninstall python-ldap
Hello, run very well now!!
Thank you very much. :D


Hello,
Thank you for your good support.

Now ajenti is run well, however, apache plugin not run well.
Of course, I have installed and running httpd via yum install.

Where should I check first?

Thanks. :)
+1
Hello,

I am using the Amazon Linux, I have followed the above steps but I am getting bellow error when I tried
"ajenti-panel -v".

Traceback (most recent call last):
File "/usr/bin/ajenti-panel", line 10, in <module>
import ajenti
ImportError: No module named ajenti
So what I should do?
Thanks

I'm having the same problem on an Amazon Linux server; following the steps above, Ajenti worked flawlessly, but as of a month or so ago, I'm getting the same errors as Brijesh Akbari.


[ec2-user@seneca ~]$ sudo service ajenti start
Starting Ajenti:
Traceback (most recent call last):
File "/usr/bin/ajenti-panel", line 10, in <module>
import ajenti
ImportError: No module named ajenti
failed [FAILED]
[ec2-user@seneca ~]$ ajenti-panel -v
Traceback (most recent call last):
File "/usr/bin/ajenti-panel", line 10, in <module>
import ajenti
ImportError: No module named ajenti

Please try following command on Amazon Linux.

$ sudo su -
# yum update -y
# pip install --upgrade pip
# hash -r
# yum install gcc openssl-devel python-devel  openldap-devel -y
# pip install ajenti
# wget http://repo.ajenti.org/ajenti-repo-1.0-1.noarch.rpm 
# rpm -i ajenti-repo-1.0-1.noarch.rpm
# yum install ajenti -y
# service ajenti restart