python-gssapi 설치

python 2016. 1. 25. 19:48

python-gssapi를 설치 내용을 작성한다. 




$ sudo pip install  python-gssapi

Collecting python-gssapi

  Using cached python-gssapi-0.6.4.tar.gz

    zip_safe flag not set; analyzing archive contents...

    six: module references __path__

    Installed /tmp/pip-build-z6H2Wq/python-gssapi/six-1.10.0-py2.7.egg

    Searching for cffi>=0.8

    Reading http://pypi.python.org/simple/cffi/

    Best match: cffi 1.5.0

    Downloading https://pypi.python.org/packages/source/c/cffi/cffi-1.5.0.tar.gz#md5=dec8441e67880494ee881305059af656

    Processing cffi-1.5.0.tar.gz

    Writing /tmp/easy_install-EHxKhb/cffi-1.5.0/setup.cfg

    Running cffi-1.5.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-EHxKhb/cffi-1.5.0/egg-dist-tmp-DxMePM

    Package libffi was not found in the pkg-config search path.

    Perhaps you should add the directory containing `libffi.pc'

    to the PKG_CONFIG_PATH environment variable

    No package 'libffi' found

    Package libffi was not found in the pkg-config search path.

    Perhaps you should add the directory containing `libffi.pc'

    to the PKG_CONFIG_PATH environment variable

    No package 'libffi' found

    Package libffi was not found in the pkg-config search path.

    Perhaps you should add the directory containing `libffi.pc'

    to the PKG_CONFIG_PATH environment variable

    

    .....

    

    


에러만 난 것을 확인하려면, 아래 pkg-config 커맨드를 사용한다.


$ pkg-config --print-errors libffi

Package libffi was not found in the pkg-config search path.

Perhaps you should add the directory containing `libffi.pc'

to the PKG_CONFIG_PATH environment variable

No package 'libffi' found




libffi-devel을 설치한다. 


$ sudo yum install libffi-devel


$ ls -al /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../libffi.so

lrwxrwxrwx 1 root root 15 2016-01-25 18:20 /usr/lib/gcc/x86_64-redhat-linux/4.4.7/../../../libffi.so -> libffi.so.5.0.6


$ cd /usr/lib

$ ls -al libffi.so

lrwxrwxrwx 1 root root 15 2016-01-25 18:20 libffi.so -> libffi.so.5.0.6



$ rpm -ql libffi-devel

/usr/lib/libffi-3.0.5

/usr/lib/libffi-3.0.5/include

/usr/lib/libffi-3.0.5/include/ffi.h

/usr/lib/libffi-3.0.5/include/ffitarget.h

/usr/lib/libffi.so

/usr/lib/pkgconfig/libffi.pc

/usr/share/info/libffi.info.gz

/usr/share/man/man3/ffi.3.gz

/usr/share/man/man3/ffi_call.3.gz

/usr/share/man/man3/ffi_prep_cif.3.gz

/usr/lib64/libffi-3.0.5

/usr/lib64/libffi-3.0.5/include

/usr/lib64/libffi-3.0.5/include/ffi.h

/usr/lib64/libffi-3.0.5/include/ffitarget.h

/usr/lib64/libffi.so

/usr/lib64/pkgconfig/libffi.pc

/usr/share/info/libffi.info.gz

/usr/share/man/man3/ffi.3.gz

/usr/share/man/man3/ffi_call.3.gz

/usr/share/man/man3/ffi_prep_cif.3.gz



python-gssapi를 pip로 설치한다. 환경변수 -E 때문에 골치아파질 수 있으니 환경변수를 포함하려면 -E를 고려한다.



$ sudo -E pip install python-gssapi

Successfully installed cffi-1.5.0 python-gssapi-0.6.4 six-1.10.0




* multilib 충돌 해결하기

중간에 libffi를 여러 번 설치하다가 3.0.9와 3.0.5가 꼬이는 이슈가 발견했다. libffi는 dependecy가 굉장히 넓어서 해당 모듈만 삭제하도록 해야 한다.

 

 

$  rpm -qa | grep libffi

libffi-3.0.9-1.el5.rf.x86_64


$ sudo yum remove libffi-3.0.9-1.el5.rf.x86_64

<- dependency 때문에 못 지운다.


Protected multilib versions: libffi-3.0.5-3.2.el6.i686 != libffi-3.0.9-1.el5.rf.x86_64 ++ return 1 ++ return 1 Requirements installation failed with status: 1.



이 때는 --nodeps 옵션으로 삭제하고 libffi를 다시 설치한다.



$ sudo rpm -e --nodeps libffi



Posted by '김용환'

댓글을 달아 주세요