LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 10-28-2013, 04:28 AM   #1
NikosGr
Member
 
Registered: Jun 2013
Posts: 60

Rep: Reputation: 0
Cannot install a C module, problem with autoconf


I have trouble nstalling libmaxminddb?
I downloaded libmaxminfdb
and
./bootstrap
./configure

but it fails.

Code:
configure.ac:4: error: Autoconf version 2.65 or higher is required

I tried it,compiled it and everything works. You may miss a few 
additional tools to compile it, however it's impossible to tell from your 
lines.


root@secure [~]# yum install autoconf
Loaded plugins: fastestmirror
Determining fastest mirrors
* base: mirror.skylink-datacenter.de
* extras: centos.psw.net
* updates: mirror2.hs-esslingen.de
base

| 3.7 kB 00:00
extras

| 3.4 kB 00:00
updates

| 3.4 kB 00:00
Setting up Install Process
Package autoconf-2.63-5.1.el6.noarch already installed and latest version
Nothing to do
root@secure [~]#
 
Old 10-28-2013, 08:00 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,279

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
Ref. $ git clone https://github.com/maxmind/libmaxminddb

Very simple :
'bootstrap' the "libmaxminddb" on any OS with a later autoconf.
( autoconf-2.69 was used.)

The "ready to 'configure && make' package" : libmaxminddb-git-281013.tar.gz
Download link https://drive.google.com/file/d/0B7S...it?usp=sharing
... The files were also tested OK with CentOS 6.4 :
$ cd libmaxminddb/ && ./configure && make

-
 
Old 10-28-2013, 09:00 AM   #3
NikosGr
Member
 
Registered: Jun 2013
Posts: 60

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by knudfl View Post
Ref. $ git clone https://github.com/maxmind/libmaxminddb

Very simple :
'bootstrap' the "libmaxminddb" on any OS with a later autoconf.
( autoconf-2.69 was used.)

The "ready to 'configure && make' package" : libmaxminddb-git-281013.tar.gz
Download link https://drive.google.com/file/d/0B7S...it?usp=sharing
... The files were also tested OK with CentOS 6.4 :
$ cd libmaxminddb/ && ./configure && make

-
i have downloaded the library from git repository

i cd into the dir

when i give:

Code:
root@secure [~/libmaxminddb]# ./bootstrap
rm: cannot remove `ltmain.sh': No such file or directory
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
configure.ac:4: error: Autoconf version 2.65 or higher is required
configure.ac:4: the top level
autom4te: /usr/bin/m4 failed with exit status: 63
aclocal: autom4te failed with exit status: 63
autoreconf: aclocal failed with exit status: 63
root@secure [~/libmaxminddb]# 

root@secure [~/libmaxminddb]# ./configure && make
-bash: ./configure: No such file or directory
this is what i get.
what am i dojg wrong?
 
Old 10-28-2013, 10:23 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,279

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
Please read post #2 : An OS with a later 'autoconf' is required to run bootstrap.

The files from https://github.com/maxmind/libmaxminddb
.. were processed here, and packed to libmaxminddb-git-281013.tar.gz,
.. which you are supposed to download, and to use.
! And : Do not run bootstrap !
'./configure && make' will do.


-

Last edited by knudfl; 10-28-2013 at 10:25 AM.
 
Old 10-28-2013, 11:42 AM   #5
NikosGr
Member
 
Registered: Jun 2013
Posts: 60

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by knudfl View Post
Please read post #2 : An OS with a later 'autoconf' is required to run bootstrap.

The files from https://github.com/maxmind/libmaxminddb
.. were processed here, and packed to libmaxminddb-git-281013.tar.gz,
.. which you are supposed to download, and to use.
! And : Do not run bootstrap !
'./configure && make' will do.


-
I'am sorry i still dont follow.
i have git clone https://github.com/maxmind/libmaxminddb

and the result of this comamnd was the creation of a the libmaxminddb directory

then i cd to and ./configure fails.

I still do not understand what is happenign here.
 
Old 10-28-2013, 12:15 PM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,279

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
# 5 .
Quote:
I have git clone https://github.com/maxmind/libmaxminddb
Delete the folder libmaxminddb/ .

Then download libmaxminddb-git-281013.tar.gz from
https://drive.google.com/file/d/0B7S...it?usp=sharing
.. And : 1) $ tar xvf libmaxminddb-git-281013.tar.gz
2) $ cd libmaxminddb/
3) $ ./configure
4) $ make
... Which will create :
libmaxminddb/src/.libs/{libmaxminddb.a libmaxminddb.la libmaxminddb.so libmaxminddb.so.0 libmaxminddb.so.0.0.5}

-
 
Old 10-28-2013, 12:26 PM   #7
NikosGr
Member
 
Registered: Jun 2013
Posts: 60

Original Poster
Rep: Reputation: 0
Thank you, all these steps worked without errors.

But what was the problem and gir clone link didnt work before? After all when i run it it had created the same directory itself too.

whay ./confiure and make didnr work there as well?
 
Old 10-28-2013, 12:35 PM   #8
NikosGr
Member
 
Registered: Jun 2013
Posts: 60

Original Poster
Rep: Reputation: 0
Hello i ahve finally managed to install the C lirary but when i give 'pip install maxminddb' it fails.

then i get this error in my python script:

Code:
 /home/nikos/public_html/cgi-bin/metrites.py in ()
      3
      4 import cgitb; cgitb.enable()
=>    5 import cgi, re, os, sys, socket, datetime, locale, codecs, random, smtplib, subprocess, pymysql, geoip2.database
      6 from datetime import datetime, timedelta
      7 from http import cookies
cgi = <module 'cgi' from '/usr/local/bin/python/lib/python3.3/cgi.py'>, re = <module 're' from '/usr/local/bin/python/lib/python3.3/re.py'>, os = <module 'os' from '/usr/local/bin/python/lib/python3.3/os.py'>, sys = <module 'sys' (built-in)>, socket = <module 'socket' from '/usr/local/bin/python/lib/python3.3/socket.py'>, datetime = <module 'datetime' from '/usr/local/bin/python/lib/python3.3/datetime.py'>, locale = <module 'locale' from '/usr/local/bin/python/lib/python3.3/locale.py'>, codecs = <module 'codecs' from '/usr/local/bin/python/lib/python3.3/codecs.py'>, random = <module 'random' from '/usr/local/bin/python/lib/python3.3/random.py'>, smtplib = <module 'smtplib' from '/usr/local/bin/python/lib/python3.3/smtplib.py'>, subprocess = <module 'subprocess' from '/usr/local/bin/python/lib/python3.3/subprocess.py'>, pymysql = <module 'pymysql' from '/usr/local/bin/python/lib/python3.3/site-packages/pymysql/__init__.py'>, geoip2 undefined
 /usr/local/bin/python/lib/python3.3/site-packages/geoip2-0.4.1-py3.3.egg/geoip2/database.py in ()
ImportError: No module named 'maxminddb'
      args = ("No module named 'maxminddb'",)
      msg = "No module named 'maxminddb'"
      name = 'maxminddb'
      path = None
      with_traceback = <built-in method with_traceback of ImportError object>
 
Old 10-28-2013, 12:55 PM   #9
NikosGr
Member
 
Registered: Jun 2013
Posts: 60

Original Poster
Rep: Reputation: 0
Code:
import geoip2.database

# calculate geoip location
ipval = ( os.environ.get('HTTP_CF_CONNECTING_IP') or os.environ.get('REMOTE_ADDR', "Cannot Resolve") )
city = "Άγνωστη Πόλη"
host = "Άγνωστη Προέλευση"
try:
    reader = geoip2.database.Reader('/usr/local/share/GeoLite2-City.mmdb')
    response = reader.city( ipval )
    city = response.city.name + response.country.name
    host = socket.gethostbyaddr( ipval ) [0]
except Exception as e:
    print( "metritis.py => (%s): " % lastvisit, repr( sys.exc_info() ), file=open('/tmp/err.out', 'a') )
But the result is http://superhost.gr
[/code]

But the result is http://superhost.gr

Last edited by NikosGr; 10-28-2013 at 12:56 PM.
 
Old 10-28-2013, 01:43 PM   #10
NikosGr
Member
 
Registered: Jun 2013
Posts: 60

Original Poster
Rep: Reputation: 0
To be more specific:

Code:
I know that after installign the C module i ahd to pip install maxminddb, but here is what happens as root:

root@secure [~]# cd libmaxminddb
root@secure [~/libmaxminddb]# ldconfig
root@secure [~/libmaxminddb]# pip install maxminddb
Downloading/unpacking maxminddb
  Running setup.py egg_info for package maxminddb
    /usr/local/bin/python/lib/python3.3/distutils/dist.py:257: UserWarning: Unknown distribution option: 'bugtrack_url'
      warnings.warn(msg)

    warning: no files found matching 'requirements.txt'
Installing collected packages: maxminddb
  Running setup.py install for maxminddb
    building 'maxminddb' extension
    gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/bin/python/include/python3.3m -c maxminddb.c -o build/temp.linux-x86_64-3.3/maxminddb.o -Wall -Werror -Wextra -std=c99 -pedantic
    maxminddb.c:2:23: error: maxminddb.h: No such file or directory
    maxminddb.c:14: error: expected specifier-qualifier-list before 'MMDB_s'
    maxminddb.c:30: error: expected ')' before '*' token
    maxminddb.c:31: error: expected ')' before '*' token
    maxminddb.c:32: error: expected ')' before '*' token
    cc1: warnings being treated as errors
    maxminddb.c:33: error: type defaults to 'int' in declaration of 'MMDB_entry_data_list_s'
    maxminddb.c:33: error: expected ';', ',' or ')' before '*' token
    maxminddb.c: In function 'Reader_constructor':
    maxminddb.c:65: error: 'MMDB_s' undeclared (first use in this function)
    maxminddb.c:65: error: (Each undeclared identifier is reported only once
    maxminddb.c:65: error: for each function it appears in.)
    maxminddb.c:65: error: 'mmdb' undeclared (first use in this function)
    maxminddb.c:65: error: expected expression before ')' token
    maxminddb.c:77: error: implicit declaration of function 'MMDB_open'
    maxminddb.c:77: error: 'MMDB_MODE_MMAP' undeclared (first use in this function)
    maxminddb.c:79: error: 'MMDB_SUCCESS' undeclared (first use in this function)
    maxminddb.c:89: error: 'Reader_obj' has no member named 'mmdb'
    maxminddb.c: In function 'Reader_get':
    maxminddb.c:102: error: 'MMDB_s' undeclared (first use in this function)
    maxminddb.c:102: error: 'mmdb' undeclared (first use in this function)
    maxminddb.c:102: error: 'Reader_obj' has no member named 'mmdb'
    maxminddb.c:111: error: 'MMDB_SUCCESS' undeclared (first use in this function)
    maxminddb.c:112: error: 'MMDB_lookup_result_s' undeclared (first use in this function)
    maxminddb.c:112: error: expected ';' before 'result'
    maxminddb.c:125: error: 'MMDB_IPV6_LOOKUP_IN_IPV4_DATABASE_ERROR' undeclared (first use in this function)
    maxminddb.c:131: error: implicit declaration of function 'MMDB_strerror'
    maxminddb.c:135: error: 'result' undeclared (first use in this function)
    maxminddb.c:139: error: 'MMDB_entry_data_list_s' undeclared (first use in this function)
    maxminddb.c:139: error: 'entry_data_list' undeclared (first use in this function)
    maxminddb.c:140: error: implicit declaration of function 'MMDB_get_entry_data_list'
    maxminddb.c:145: error: implicit declaration of function 'MMDB_free_entry_data_list'
    maxminddb.c:155: error: 'original_entry_data_list' undeclared (first use in this function)
    maxminddb.c:156: error: implicit declaration of function 'from_entry_data_list'
    maxminddb.c: In function 'Reader_metadata':
    maxminddb.c:165: error: 'Reader_obj' has no member named 'mmdb'
    maxminddb.c:176: error: 'MMDB_entry_data_list_s' undeclared (first use in this function)
    maxminddb.c:176: error: 'entry_data_list' undeclared (first use in this function)
    maxminddb.c:177: error: implicit declaration of function 'MMDB_get_metadata_as_entry_data_list'
    maxminddb.c:177: error: 'Reader_obj' has no member named 'mmdb'
    maxminddb.c:178: error: 'original_entry_data_list' undeclared (first use in this function)
    maxminddb.c: In function 'Reader_close':
    maxminddb.c:235: error: 'Reader_obj' has no member named 'mmdb'
    maxminddb.c:240: error: implicit declaration of function 'MMDB_close'
    maxminddb.c:240: error: 'Reader_obj' has no member named 'mmdb'
    maxminddb.c:241: error: 'Reader_obj' has no member named 'mmdb'
    maxminddb.c:242: error: 'Reader_obj' has no member named 'mmdb'
    maxminddb.c: In function 'Reader_dealloc':
    maxminddb.c:250: error: 'Reader_obj' has no member named 'mmdb'
    maxminddb.c: At top level:
    maxminddb.c:272: error: expected ')' before '*' token
    maxminddb.c:314: error: expected ')' before '*' token
    maxminddb.c:349: error: expected ')' before '*' token
    maxminddb.c:373: error: type defaults to 'int' in declaration of 'MMDB_entry_data_list_s'
    maxminddb.c:373: error: expected ';', ',' or ')' before '*' token
    /usr/local/bin/python/lib/python3.3/distutils/dist.py:257: UserWarning: Unknown distribution option: 'bugtrack_url'
      warnings.warn(msg)
    error: command 'gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build/maxminddb/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-badq_m-record/install-record.txt --single-version-externally-managed:
    running install

running build

running build_ext

building 'maxminddb' extension

gcc -pthread -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/bin/python/include/python3.3m -c maxminddb.c -o build/temp.linux-x86_64-3.3/maxminddb.o -Wall -Werror -Wextra -std=c99 -pedantic

maxminddb.c:2:23: error: maxminddb.h: No such file or directory

maxminddb.c:14: error: expected specifier-qualifier-list before 'MMDB_s'

maxminddb.c:30: error: expected ')' before '*' token

maxminddb.c:31: error: expected ')' before '*' token

maxminddb.c:32: error: expected ')' before '*' token

cc1: warnings being treated as errors

maxminddb.c:33: error: type defaults to 'int' in declaration of 'MMDB_entry_data_list_s'

maxminddb.c:33: error: expected ';', ',' or ')' before '*' token

maxminddb.c: In function 'Reader_constructor':

maxminddb.c:65: error: 'MMDB_s' undeclared (first use in this function)

maxminddb.c:65: error: (Each undeclared identifier is reported only once

maxminddb.c:65: error: for each function it appears in.)

maxminddb.c:65: error: 'mmdb' undeclared (first use in this function)

maxminddb.c:65: error: expected expression before ')' token

maxminddb.c:77: error: implicit declaration of function 'MMDB_open'

maxminddb.c:77: error: 'MMDB_MODE_MMAP' undeclared (first use in this function)

maxminddb.c:79: error: 'MMDB_SUCCESS' undeclared (first use in this function)

maxminddb.c:89: error: 'Reader_obj' has no member named 'mmdb'

maxminddb.c: In function 'Reader_get':

maxminddb.c:102: error: 'MMDB_s' undeclared (first use in this function)

maxminddb.c:102: error: 'mmdb' undeclared (first use in this function)

maxminddb.c:102: error: 'Reader_obj' has no member named 'mmdb'

maxminddb.c:111: error: 'MMDB_SUCCESS' undeclared (first use in this function)

maxminddb.c:112: error: 'MMDB_lookup_result_s' undeclared (first use in this function)

maxminddb.c:112: error: expected ';' before 'result'

maxminddb.c:125: error: 'MMDB_IPV6_LOOKUP_IN_IPV4_DATABASE_ERROR' undeclared (first use in this function)

maxminddb.c:131: error: implicit declaration of function 'MMDB_strerror'

maxminddb.c:135: error: 'result' undeclared (first use in this function)

maxminddb.c:139: error: 'MMDB_entry_data_list_s' undeclared (first use in this function)

maxminddb.c:139: error: 'entry_data_list' undeclared (first use in this function)

maxminddb.c:140: error: implicit declaration of function 'MMDB_get_entry_data_list'

maxminddb.c:145: error: implicit declaration of function 'MMDB_free_entry_data_list'

maxminddb.c:155: error: 'original_entry_data_list' undeclared (first use in this function)

maxminddb.c:156: error: implicit declaration of function 'from_entry_data_list'

maxminddb.c: In function 'Reader_metadata':

maxminddb.c:165: error: 'Reader_obj' has no member named 'mmdb'

maxminddb.c:176: error: 'MMDB_entry_data_list_s' undeclared (first use in this function)

maxminddb.c:176: error: 'entry_data_list' undeclared (first use in this function)

maxminddb.c:177: error: implicit declaration of function 'MMDB_get_metadata_as_entry_data_list'

maxminddb.c:177: error: 'Reader_obj' has no member named 'mmdb'

maxminddb.c:178: error: 'original_entry_data_list' undeclared (first use in this function)

maxminddb.c: In function 'Reader_close':

maxminddb.c:235: error: 'Reader_obj' has no member named 'mmdb'

maxminddb.c:240: error: implicit declaration of function 'MMDB_close'

maxminddb.c:240: error: 'Reader_obj' has no member named 'mmdb'

maxminddb.c:241: error: 'Reader_obj' has no member named 'mmdb'

maxminddb.c:242: error: 'Reader_obj' has no member named 'mmdb'

maxminddb.c: In function 'Reader_dealloc':

maxminddb.c:250: error: 'Reader_obj' has no member named 'mmdb'

maxminddb.c: At top level:

maxminddb.c:272: error: expected ')' before '*' token

maxminddb.c:314: error: expected ')' before '*' token

maxminddb.c:349: error: expected ')' before '*' token

maxminddb.c:373: error: type defaults to 'int' in declaration of 'MMDB_entry_data_list_s'

maxminddb.c:373: error: expected ';', ',' or ')' before '*' token

/usr/local/bin/python/lib/python3.3/distutils/dist.py:257: UserWarning: Unknown distribution option: 'bugtrack_url'

  warnings.warn(msg)

error: command 'gcc' failed with exit status 1

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build/maxminddb/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-badq_m-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build/maxminddb
Storing complete log in /root/.pip/pip.log
root@secure [~/libmaxminddb]#

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/geoip2
Storing complete log in /root/.pip/pip.log
root@secure [~]#

Whay doesnt the module gets installed properly so i can use geoip2 into my python scripts?

Στις 28/10/2013 7:29 μμ, ο/η Boris Zentner έγραψε:
> ##- Please type your reply above this line -##
>
> Your request (#18999 <https://maxmind.zendesk.com/tickets/18999>) has been marked as solved. If you believe that your issue has not been resolved adequately, please reopen this request by replying to this email within 4 days. If we do not hear from you within 4 days, this ticket will be closed and you will be unable to reopen this request.
>
> Thank you for contacting MaxMind!
>
> - MaxMind Team
>
> Boris Zent    
>
> *Boris Zentner* (MaxMind)
>
> Oct 28 14:29 (ADT)
>
> Nico,
> I do not understand the question.
>
> Maybe you forgot to execute ldconfig as root after installing libmaxminddb.
>
> Have a nice day
>
> Νίκος Κούρ    
>
> *Νίκος Κούρας*
>
> Oct 28 13:56 (ADT)
>
> 
Code:
> import geoip2.database
>
> # calculate geoip location
> ipval = ( os.environ.get('HTTP_CF_CONNECTING_IP') or
> os.environ.get('REMOTE_ADDR', "Cannot Resolve") )
> city = "Άγνωστη Πόλη"
> host = "Άγνωστη Προέλευση"
> try:
> reader = geoip2.database.Reader('/usr/local/share/GeoLite2-City.mmdb')
> response = reader.city( ipval )
> city = response.city.name + response.country.name
> host = socket.gethostbyaddr( ipval ) [0]
> except Exception as e:
> print( "metritis.py => (%s): " % lastvisit, repr( sys.exc_info() ),
> file=open('/tmp/err.out', 'a') )
>
> > But the result is http://superhost.gr > -- > What is now proved was at first only imagined! & WebHost > <http://superhost.gr> > > Νίκος Κούρ > > *Νίκος Κούρας* > > Oct 28 13:34 (ADT) > > Hello i ahve finally managed to install the C lirary but when i give > 'pip install maxminddb' it fails. > > then i get this error in my python script: > > > /home/nikos/public_html/cgi-bin/metrites.py in () > 3 > 4 import cgitb; cgitb.enable() > => 5 import cgi, re, os, sys, socket, datetime, locale, codecs, > random, smtplib, subprocess, pymysql, geoip2.database > 6 from datetime import datetime, timedelta > 7 from http import cookies > cgi = <module 'cgi' from '/usr/local/bin/python/lib/python3.3/cgi.py'>, > re = <module 're' from '/usr/local/bin/python/lib/python3.3/re.py'>, os > = <module 'os' from '/usr/local/bin/python/lib/python3.3/os.py'>, sys = > <module 'sys' (built-in)>, socket = <module 'socket' from > '/usr/local/bin/python/lib/python3.3/socket.py'>, datetime = <module > 'datetime' from '/usr/local/bin/python/lib/python3.3/datetime.py'>, > locale = <module 'locale' from > '/usr/local/bin/python/lib/python3.3/locale.py'>, codecs = <module > 'codecs' from '/usr/local/bin/python/lib/python3.3/codecs.py'>, random = > <module 'random' from '/usr/local/bin/python/lib/python3.3/random.py'>, > smtplib = <module 'smtplib' from > '/usr/local/bin/python/lib/python3.3/smtplib.py'>, subprocess = <module > 'subprocess' from '/usr/local/bin/python/lib/python3.3/subprocess.py'>, > pymysql = <module 'pymysql' from > '/usr/local/bin/python/lib/python3.3/site-packages/pymysql/__init__.py'>, geoip2 > undefined > /usr/local/bin/python/lib/python3.3/site-packages/geoip2-0.4.1-py3.3.egg/geoip2/database.py in () > ImportError: No module named 'maxminddb' > args = ("No module named 'maxminddb'",) > msg = "No module named 'maxminddb'" > name = 'maxminddb' > path = None > with_traceback = <built-in method with_traceback of ImportError > object> > > > Στις 28/10/2013 6:20 μμ, ο/η Boris Zentner έγραψε: > > Boris Zent > > *Boris Zentner* (MaxMind) > > Oct 28 13:20 (ADT) > > Hi there, > you have to provide the underlying library. This library is need for the python API. > The library is a C library and you have to install it before the python API. Therefor it can't be installed with pypy. > > Try to install autoconf/automake and libtool on your development machine. > > Have a nice day > > Νίκος Κούρ > > *Νίκος Κούρας* > > Oct 27 04:46 (ADT) > > Please tell me how to install 'libmaxminddb', my website depends on > geographical information and i'm passing from geoip1 to geoip2. > > i have it unpacked into a folder called 'libmaxminddb' but i just cannot > install it. > > somethign with autoconf doesnt let this install. > > Νίκος Κούρ > > *Νίκος Κούρας* > > Oct 26 10:26 (ADT) > > Ηοw? i need directions. > This maxminf is so complex. > > all we should suppose to do war 'pip install maxminddb' but that just > doesnt work. > Στις 26/10/2013 4:24 μμ, ο/η Boris Zentner έγραψε: > > Boris Zent > > *Boris Zentner* (MaxMind) > > Oct 26 10:24 (ADT) > > You have to update at least autoconf and retry. > > Pay attention to the error messages. > > Have a nice day > > Νίκος Κούρ > > *Νίκος Κούρας* > > Oct 26 10:17 (ADT) > > So, how will i install it? > Στις 26/10/2013 4:10 μμ, ο/η Boris Zentner έγραψε: > > Boris Zent > > *Boris Zentner* (MaxMind) > > Oct 26 10:10 (ADT) > > Hi Nico, > > it looks like your autoconf is to old. > ... > configure.ac:4: error: Autoconf version 2.65 or higher is required > > Have a nice day > > Νίκος Κούρ > > *Νίκος Κούρας* > > Oct 26 06:04 (ADT) > > root@secure [~/libmaxminddb]# ll > total 108 > drwxr-xr-x 11 root root 4096 Oct 26 10:16 ./ > dr-xr-x--- 22 root root 4096 Oct 26 12:02 ../ > drwxr-xr-x 8 root root 4096 Oct 26 10:16 .git/ > -rw-r--r-- 1 root root 271 Oct 26 10:16 .gitignore > -rw-r--r-- 1 root root 91 Oct 26 10:16 .gitmodules > -rw-r--r-- 1 root root 233 Oct 26 10:16 .travis.yml > -rw-r--r-- 1 root root 3336 Oct 26 10:16 .uncrustify.cfg > -rw-r--r-- 1 root root 0 Oct 26 10:16 AUTHORS > -rw-r--r-- 1 root root 0 Oct 26 10:16 ChangeLog > -rw-r--r-- 1 root root 26530 Oct 26 10:16 LICENSE > -rw-r--r-- 1 root root 106 Oct 26 10:16 Makefile.am > -rw-r--r-- 1 root root 3049 Oct 26 10:16 README.md > drwxr-xr-x 2 root root 4096 Oct 26 10:17 autom4te.cache/ > drwxr-xr-x 2 root root 4096 Oct 26 10:16 bin/ > -rwxr-xr-x 1 root root 426 Oct 26 10:16 bootstrap* > -rw-r--r-- 1 root root 107 Oct 26 10:16 common.mk > -rw-r--r-- 1 root root 3452 Oct 26 10:16 configure.ac > drwxr-xr-x 2 root root 4096 Oct 26 10:16 dev-bin/ > drwxr-xr-x 2 root root 4096 Oct 26 10:16 doc/ > drwxr-xr-x 2 root root 4096 Oct 26 10:16 include/ > drwxr-xr-x 2 root root 4096 Oct 26 10:16 maxmind-db/ > drwxr-xr-x 2 root root 4096 Oct 26 10:16 src/ > drwxr-xr-x 3 root root 4096 Oct 26 10:16 t/ > root@secure [~/libmaxminddb]# boostrap > -bash: boostrap: command not found > root@secure [~/libmaxminddb]# ./bootstrap > rm: cannot remove `ltmain.sh': No such file or directory > autoreconf: Entering directory `.' > autoreconf: configure.ac: not using Gettext > autoreconf: running: aclocal --force > configure.ac:4: error: Autoconf version 2.65 or higher is required > configure.ac:4: the top level > autom4te: /usr/bin/m4 failed with exit status: 63 > aclocal: autom4te failed with exit status: 63 > autoreconf: aclocal failed with exit status: 63 > root@secure [~/libmaxminddb]# > > Whay cant i just install libmaxminddb? > I downloaded try to > > ./bootstrap > ./configure > > but it fails. > > Νίκος Κούρ > > *Νίκος Κούρας* > > Oct 26 04:20 (ADT) > > please tell me hwop to install libmaxmind because when i try to downlaod > it just downlaoda a file calles"master" and dont know what to do with it > and when i installed it via git it gives error. > > > Στις 26/10/2013 4:53 πμ, ο/η Greg Oschwald έγραψε: > > Νίκος Κούρ > > *Νίκος Κούρας* > > Oct 25 22:59 (ADT) > > i have downloded the master.tar.gz but when i ls -al i only see: > > -rw-r--r-- 1 root root 52784 Oct 26 04:55 master > > Is this correct? I dont see ant gzipped tarball anywhre just this master > file. > Wnhat should i do? > i also donwlaoded the maxmind db GeoLiteCity.mmdb and placed it in > /usr/local/share > > > Στις 26/10/2013 4:53 πμ, ο/η Greg Oschwald έγραψε: > > Greg Oschw > > *Greg Oschwald* (MaxMind) > > Oct 25 22:53 (ADT) > > You need to install git. Alternatively, you can download a tar.gz file at https://github.com/maxmind/libmaxmin.../master.tar.gz > > libmaxminddb is a C library. pip cannot install it. > > Greg > > Νίκος Κούρ > > *Νίκος Κούρας* > > Oct 25 22:50 (ADT) > > Yes i have tried thst but it it gives me an error: > > root@secure [~]# git clone https://github.com/maxmind/libmaxminddb > -bash: git: command not found > root@secure [~]# > > isnt there a pip install i can issue that will take care of all these > dependancies? > > root@secure [~]# git clone https://github.com/maxmind/libmaxminddb > -bash: git: command not found > root@secure [~]# > > Στις 26/10/2013 4:46 πμ, ο/η Greg Oschwald έγραψε: > > Greg Oschw > > *Greg Oschwald* (MaxMind) > > Oct 25 22:46 (ADT) > > For libmaxminddb, see: > > https://github.com/maxmind/libmaxmin...git-repository > > For the maxminddb extension, see: > > https://github.com/maxmind/MaxMind-D...n#installation > > Greg > > Νίκος Κούρ > > *Νίκος Κούρας* > > Oct 25 22:44 (ADT) > > Please give me the commands i should issue to install those because i > cannot get it to work. > > > Στις 26/10/2013 4:37 πμ, ο/η Greg Oschwald έγραψε: > > Greg Oschw > > *Greg Oschwald* (MaxMind) > > Oct 25 22:37 (ADT) > > If you haven't already installed it, you will need to install the libmaxminddb C library: > > https://github.com/maxmind/libmaxminddb > > and the maxminddb extension: > > https://pypi.python.org/pypi/maxminddb/0.2.0 > > Normally pip would install the latter when installing geoip2, but you bypassed that. > > You can then follow the instructions at: > > http://geoip2.readthedocs.org/en/lat...tabase-example > > Greg > > Νίκος Κούρ > > *Νίκος Κούρας* > > Oct 25 22:33 (ADT) > > Finally it got installed after tar -zxvf, cd to ti and run it manually > > Now elt me show you how i was retrievign the city in the first geoip > > i had download the city datafile and palced it it /usr/local/share > > import pygeoip > > # calculate geoip location > ipval = ( os.environ.get('HTTP_CF_CONNECTING_IP') or > os.environ.get('REMOTE_ADDR', "Cannot Resolve") ) > > try: > gi = pygeoip.GeoIP('/usr/local/share/GeoIPCity.dat') > city = gi.time_zone_by_addr( ipval ) > except: > blablabla > > Now, how do i do the same? menaing to retrive the city in the new > "geoip2" module? > > Στις 26/10/2013 4:22 πμ, ο/η Greg Oschwald έγραψε: > > Greg Oschw > > *Greg Oschwald* (MaxMind) > > Oct 25 22:22 (ADT) > > Are you able to install other packages with pip? As far as I can tell, the traceback you posted below is not caused by anything in the geoip2 package. (The warning about bugtrack_url is harmless and unrelated.) > > You could try unpacking the package and running "python setup.py install" directly. > > Greg > > Νίκος Κούρ > > *Νίκος Κούρας* > > Oct 25 22:18 (ADT) > > root@secure [~]# pip install geoip2-0.4.1.tar.gz > Unpacking ./geoip2-0.4.1.tar.gz > Running setup.py egg_info for package from > file:///root/geoip2-0.4.1.tar.gz > /usr/local/bin/python/lib/python3.3/distutils/dist.py:257: > UserWarning: Unknown distribution option: 'bugtrack_url' > warnings.warn(msg) > > Exception: > Traceback (most recent call last): > File > "/usr/local/bin/python/lib/python3.3/site-packages/pip-1.2.1-py3.3.egg/pip/basecommand.py", > line 107, in main > status = self.run(options, args) > File > "/usr/local/bin/python/lib/python3.3/site-packages/pip-1.2.1-py3.3.egg/pip/commands/install.py", > line 256, in run > requirement_set.prepare_files(finder, > force_root_egg_info=self.bundle, bundle=self.bundle) > File > "/usr/local/bin/python/lib/python3.3/site-packages/pip-1.2.1-py3.3.egg/pip/req.py", > line 1042, in prepare_files > req_to_install.run_egg_info() > File > "/usr/local/bin/python/lib/python3.3/site-packages/pip-1.2.1-py3.3.egg/pip/req.py", > line 241, in run_egg_info > "%(Name)s==%(Version)s" % self.pkg_info()) > File > "/usr/local/bin/python/lib/python3.3/site-packages/pip-1.2.1-py3.3.egg/pip/req.py", > line 334, in pkg_info > data = self.egg_info_data('PKG-INFO') > File > "/usr/local/bin/python/lib/python3.3/site-packages/pip-1.2.1-py3.3.egg/pip/req.py", > line 274, in egg_info_data > data = fp.read() > File "/usr/local/bin/python/lib/python3.3/encodings/ascii.py", line > 26, in decode > return codecs.ascii_decode(input, self.errors)[0] > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position > 29480: ordinal not in range(128) > > Storing complete log in /root/.pip/pip.log > root@secure [~]# > > > Στις 26/10/2013 4:12 πμ, ο/η Greg Oschwald έγραψε: > > Greg Oschw > > *Greg Oschwald* (MaxMind) > > Oct 25 22:12 (ADT) > > You could try downloading the file directly from https://pypi.python.org/pypi/geoip2/0.4.1 and then running "pip install" on it. > > Greg > > Νίκος Κούρ > > *Νίκος Κούρας* > > Oct 25 22:10 (ADT) > > root@secure [~]# pip uninstall geoip2 > Cannot uninstall requirement geoip2, not installed > Storing complete log in /root/.pip/pip.log > > root@secure [~]# pip install -I geoip2[DB]==0.4.1 > Downloading/unpacking geoip2[db]==0.4.1 > Running setup.py egg_info for package geoip2 > Traceback (most recent call last): > File "<string>", line 16, in <module> > File "/tmp/pip-build/geoip2/setup.py", line 29, in <module> > long_description=open('README.rst').read(), > File "/usr/local/bin/python/lib/python3.3/encodings/ascii.py", > line 26, in decode > return codecs.ascii_decode(input, self.errors)[0] > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in > position 2255: ordinal not in range(128) > Complete output from command python setup.py egg_info: > Traceback (most recent call last): > > File "<string>", line 16, in <module> > > File "/tmp/pip-build/geoip2/setup.py", line 29, in <module> > > long_description=open('README.rst').read(), > > File "/usr/local/bin/python/lib/python3.3/encodings/ascii.py", line > 26, in decode > > return codecs.ascii_decode(input, self.errors)[0] > > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position > 2255: ordinal not in range(128) > > ---------------------------------------- > Command python setup.py egg_info failed with error code 1 in > /tmp/pip-build/geoip2 > Storing complete log in /root/.pip/pip.log > root@secure [~]# > Στις 26/10/2013 4:06 πμ, ο/η Greg Oschwald έγραψε: > > Greg Oschw > > *Greg Oschwald* (MaxMind) > > Oct 25 22:06 (ADT) > > Maybe try: > > pip uninstall geoip2 > pip install -I geoip2[DB]==0.4.1 > > Νίκος Κούρ > > *Νίκος Κούρας* > > Oct 25 22:02 (ADT) > > Indeed Greg, it is still trying 0.4, even with the new command i issues. > Is there some way to uninstall/remove 0.4 so it gets to download 0.4.1? > > Στις 26/10/2013 3:58 πμ, ο/η Greg Oschwald έγραψε: > > Greg Oschw > > *Greg Oschwald* (MaxMind) > > Oct 25 21:58 (ADT) > > Based on your error message, I think it is still trying to install 0.4.0 for some reason. Could you try the follow? > > pip install geoip2[DB]==0.4.1 > > Greg > > Νίκος Κούρ > > *Νίκος Κούρας* > > Oct 25 21:55 (ADT) > > Unfortunately it returns the same error instantly, but ia, not usre it > tried to downlaod th enew version first: > > root@secure [~]# pip install geoip2[DB] --upgrade > Downloading/unpacking geoip2[db] > Running setup.py egg_info for package geoip2 > Traceback (most recent call last): > File "<string>", line 16, in <module> > File "/tmp/pip-build/geoip2/setup.py", line 29, in <module> > long_description=open('README.rst').read(), > File "/usr/local/bin/python/lib/python3.3/encodings/ascii.py", > line 26, in decode > return codecs.ascii_decode(input, self.errors)[0] > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in > position 2255: ordinal not in range(128) > Complete output from command python setup.py egg_info: > Traceback (most recent call last): > > File "<string>", line 16, in <module> > > File "/tmp/pip-build/geoip2/setup.py", line 29, in <module> > > long_description=open('README.rst').read(), > > File "/usr/local/bin/python/lib/python3.3/encodings/ascii.py", line > 26, in decode > > return codecs.ascii_decode(input, self.errors)[0] > > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position > 2255: ordinal not in range(128) > > Στις 26/10/2013 12:27 πμ, ο/η Greg Oschwald έγραψε: > > Greg Oschw > > *Greg Oschwald* (MaxMind) > > Oct 25 18:27 (ADT) > > Hello, > > I just uploaded a new version of the module (0.4.1) that I believe will fix your problem. Try to reinstall using the --upgrade flag: > > pip install geoip2 --upgrade > > Please let me know if this works for you. > > Thanks, > > Greg > > Νίκος Κούρ > > *Νίκος Κούρας* > > Oct 25 06:46 (ADT) > > Hello, i was happy to see that a python module for geoip2 came out. > > But unfortunately when i tried to install it: > > root@secure [~]# pip install geoip2[DB] > Downloading/unpacking geoip2[db] > Running setup.py egg_info for package geoip2 > Traceback (most recent call last): > File "<string>", line 16, in <module> > File "/tmp/pip-build/geoip2/setup.py", line 29, in <module> > long_description=open('README.rst').read(), > File "/usr/local/bin/python/lib/python3.3/encodings/ascii.py", > line 26, in decode > return codecs.ascii_decode(input, self.errors)[0] > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in > position 2255: ordinal not in range(128) > Complete output from command python setup.py egg_info: > Traceback (most recent call last): > > File "<string>", line 16, in <module> > > File "/tmp/pip-build/geoip2/setup.py", line 29, in <module> > > long_description=open('README.rst').read(), > > File "/usr/local/bin/python/lib/python3.3/encodings/ascii.py", line > 26, in decode > > return codecs.ascii_decode(input, self.errors)[0] > > UnicodeDecodeError: 'ascii' codec can't decode byte 0xe7 in position > 2255: ordinal not in range(128) > > ---------------------------------------- > Command python setup.py egg_info failed with error code 1 in > /tmp/pip-build/geoip2 > Storing complete log in /root/.pip/pip.log > root@secure [~]# > ====== > > What is wrong and the module cannot be installed? > > This email is a service from MaxMind. Delivered by Zendesk <http://www.zendesk.com>. > Message-Id:ZRZHRFFQ_526e9ee6ec959_46be3fd657ec67c0177457cd_sprut -- What is now proved was at first only imagined! & WebHost <http://superhost.gr>
 
Old 10-28-2013, 02:18 PM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,279

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
# 8 .
Quote:
ImportError: No module named 'maxminddb

Quote:
# pip install maxminddb
Why have you got a python3 in /usr/local/ ?
If you want "maxminddb py", the default CentOS 6 python-2.6.6 must be used:
# yum reinstall python
I.e. like the most python applications,
maxminddb is not compatible with python3.

Python-2.6 : "# pip install maxminddb" works OK.

-
 
Old 10-28-2013, 02:24 PM   #12
NikosGr
Member
 
Registered: Jun 2013
Posts: 60

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by knudfl View Post
# 8 .




Why have you got a python3 in /usr/local/ ?
If you want "maxminddb py", the default CentOS 6 python-2.6.6 must be used:
# yum reinstall python
I.e. like the most python applications,
maxminddb is not compatible with python3.

Python-2.6 : "# pip install maxminddb" works OK.

-
root@secure [~/libmaxminddb]# python -V
Python 3.3.2

My webhosting company placed python 3.3.2 in such a way when i aksed them to instalkl it for me.

in maxminds webiste they say that thie module works with python 2.7 and python 3.2.*
 
Old 10-28-2013, 02:28 PM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,279

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
# 12 .
Quote:
My webhosting company placed python 3.3.2 in such a way
when I asked them to install it for me.
1) Python 3.3.2 is not Python 3.2

2) Please supply some links to the things you refer to.

P.S. : Are your adminstrative commands like yum still working ?
They all use python-2.6.6 .

-

Last edited by knudfl; 10-28-2013 at 02:30 PM.
 
Old 10-28-2013, 02:36 PM   #14
NikosGr
Member
 
Registered: Jun 2013
Posts: 60

Original Poster
Rep: Reputation: 0
Yes, here is the link i'm trying to follow: https://geoip2.readthedocs.org/en/latest/ (Database Example part)

All i want to do is pass from 'geoip' to the new and better 'geopip2' geographical location module of maxmind's

But iam not expreinces with linux and i am having trouble installing this.

i cna give you access to my server if you think you cna install it, because clearly i cannot.
 
Old 10-28-2013, 02:54 PM   #15
NikosGr
Member
 
Registered: Jun 2013
Posts: 60

Original Poster
Rep: Reputation: 0
Boris Zentner (MaxMind)

Oct 28 15:46 (ADT)

Hi Niko.
It works with 3.3 but you are not there, b/c the mandatory CAPI is not installed.
you have to fix this or wait until centOS provides packages for geoip2.
Have a nice day

I dont hva e alcue what this guy talkign about, do you?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
install autoconf-2.68 nicknuck Linux - Newbie 6 01-09-2012 07:14 AM
I can't install autoconf! zzcranjo Linux - Software 3 05-19-2009 09:43 AM
*** YOU'RE USING autoconf (GNU Autoconf) 2.60. KDE requires autoconf 2.52, 2.53 or 2. arubin Slackware 6 09-24-2008 04:31 AM
Need autoconf 2.5 but can't install old one TCv1 Mandriva 2 03-25-2004 06:39 PM
Can I install two version of autoconf on my RH8 with cd7809 Linux - Software 1 10-09-2003 05:39 AM


All times are GMT -5. The time now is 06:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration