python - pip geoip installing in ubuntu gcc error -


i try install geoip in ubuntu in python pip...but there same gcc error

pip install geoip  gcc -pthread -fno-strict-aliasing -dndebug -g -fwrapv -o2 -wall -wstrict-prototypes - fpic -i/usr/include/python2.7 -c py_geoip.c -o build/temp.linux-i686-2.7/py_geoip.o -fno- strict-aliasing  py_geoip.c:23:19: fatal error: geoip.h: no such file or directory  compilation terminated.  error: command 'gcc' failed exit status 1 

how solve problem in ubuntu

you need install libgeoip-dev package.

$ easy_install geoip searching geoip reading https://pypi.python.org/simple/geoip/ ... py_geoip.c:23:19: fatal error: geoip.h: no such file or directory  #include "geoip.h"                    ^ compilation terminated. error: setup script exited error: command 'x86_64-linux-gnu-gcc' failed exit status 1 returned 1.   $ apt-cache search geoip ... libgeoip-dev - development files geoip library ...   andrew@refbuntu:~$ sudo apt-get install libgeoip-dev -y [sudo] password andrew:  reading package lists... done building dependency tree        reading state information... done following new packages installed:   geoip-bin libgeoip-dev 0 upgraded, 2 newly installed, 0 remove , 159 not upgraded. ... setting libgeoip-dev (1.5.1-1ubuntu1) ... andrew@refbuntu:~$ easy_install geoip ... running geoip-1.3.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-rwdpkl/geoip-1.3.2/egg-dist-tmp-dllebt /usr/lib/python2.7/distutils/dist.py:267: userwarning: unknown distribution option: 'bugtrack_url'   warnings.warn(msg) warning: no files found matching 'changelog' zip_safe flag not set; analyzing archive contents... adding geoip 1.3.2 easy-install.pth file  installed /home/andrew/.local/lib/python2.7/site-packages/geoip-1.3.2-py2.7-linux-x86_64.egg processing dependencies geoip finished processing dependencies geoip 

if install apt-file package, can search filename packages containing file:

$ apt-file search geoip.h libgeoip-dev: /usr/include/geoip.h 

this handy installation/compilation process fails due missing dependencies.


Comments

Popular posts from this blog

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -