[Ubuntu] ESRI, Microsoft Access Personal Geodatabase, PGeo and ogrinfo error: ODBC: Invalid install path

Katie Urey ksurey at gmail.com
Fri Mar 2 12:04:44 EST 2012


Hello Johan Van de Wauw:

Thank you for the questions and suggestions.

Location of limdb:

locate /usr/lib/libmdbodbc*
    /usr/lib/libmdbodbc.so.0
    /usr/lib/libmdbodbc.so.0.0.0

$ ls /usr/local/lib/libmd*
       ls: cannot access /usr/local/lib/libmd*: No such file or directory

$ which odbcinst
    /usr/local/bin/odbcinst

>>"It is usually better to install from the repositories rather than from"
Yes, I agree.  However the repository tools seemed to be more than 1
year old.  And, I figured I'd learn something by
installing from source.  I am willing to try this.

To do this:  "Consider installing mdbtools and odbc using the provided
packages: mdbtools and unixodbc-bin" is an option, thought
at this point I'll try to "repair"/configure what I have.  And, given
that I may have scrambled things a bit I wonder if to uninstall the
newer versions and re-install from the repository will break other
tools...


Setting an environment variable.  This suggestion exposes my
ignorance!   What is the valid value for ODBCSYSINI?  I could not find
a definition of this environment variable.  Today I set it thusly:

 env| grep ODBC:
     ODBCSYSINI=/usr/local/etc


I had linked to /etc/odbcinst.ini and instead created separate file at
/etc/local/etc/odbcinst.ini and after so permission problems reported
by strace, I opened permissions.  Then:

 ogrinfo --debug on PGeo:sample_pgeo
PGeo: MDB Tools driver: /usr/lib/libmdbodbc.so.0
PGeo: MDB Tools driver installed successfully!
PGeo: EstablishSession(sample_pgeo)
ODBC: SQLConnect(sample_pgeo)
*** stack smashing detected ***: ogrinfo terminated
======= Backtrace: =========
/lib/i386-linux-gnu/libc.so.6(__fortify_fail+0x50)[0x2cbdf0]
/lib/i386-linux-gnu/libc.so.6(+0xe5d9a)[0x2cbd9a]
/usr/lib/libgdal1.8.0.so.1(+0x5cc194)[0xe50194]
/usr/lib/libgdal1.8.0.so.1(_ZN16CPLODBCStatement5FetchEii+0x77f)[0xc0580f]
[0x302c2274]
======= Memory map: ========
[.....]


So, the command gets a bit further, but still fails.  Still looks like
a mixed up install...

best regards,
Katie Urey
Portland, Oregon


On Fri, Mar 2, 2012 at 7:06 AM, Johan Van de Wauw
<johan.vandewauw at gmail.com> wrote:
> A few things you can try:
>
> It seems that you have installed a local copy in /usr/local/lib,
> whereas gdal is looking for mdbtools in /usr/lib
> Can you tell us where limdb is installed?
> ls  /usr/lib/libmdbodbc*
> ls /usr/local/lib/libmdbodbc*
> and which odbcinst you are running:
> which odbcinst
>
> It is usually better to install from the repositories rather than from
> source, you may mix things which are compiled against different
> versions of unixodbc.
> Consider installing mdbtools and odbc using the provided packages:
> mdbtools and unixodbc-bin
>
> Apart from that: ODBCSYSINI is an environment variable. You can always
> set it by running export ODBCSYSINI= sth before running your command.
>
> Johan
>
> On Thu, Mar 1, 2012 at 11:07 PM, Katie Urey <ksurey at gmail.com> wrote:
>> Friends,
>>
>> Per notes on this web page, http://gdal.org/ogr/drv_pgeo.html
>>
>> I believe that I should be able to read tables from a Microsoft/ESRI
>> personal geodatabase by using ogr* commands.
>>
>> Not yet. The Current error is "ODBC: Invalid install path". It
>> would be simple if a typo or an install mistake was confirmed.
>> For instance- did I err in the install to get
>> ODBCSYSINI set to my home dir?  If so, do I re-install or
>> override?
>>
>> Also, please advise if I should send to another list.
>>
>> -best
>> Katie Urey
>> Portland, Oregon
>>
>>
>> some details:
>>
>> -1:/home/GISData/CurbCuts$ ogrinfo --debug on PGeo:sample_pgeo
>>  PGeo: MDB Tools driver: /usr/lib/libmdbodbc.so.0
>>  ODBC: HOME=/home/katie
>>  ODBC: ODBCSYSINI=/home/katie
>> **ERROR 1: ODBC: Invalid install path
>>  Warning 1: Unable to install MDB driver for ODBC, MDB access may not
>> supported.
>>
>>  PGeo: EstablishSession(sample_pgeo)
>>  ODBC: SQLConnect(sample_pgeo)
>>  ODBC: ... failed: [unixODBC][Driver Manager]Data source name not
>> found, and no default driver specified
>>  ODBC: SQLDisconnect()
>>  ERROR 1: Unable to initialize ODBC connection to DSN for sample_pgeo,
>>  [unixODBC][Driver Manager]Data source name not found, and no default
>> driver specified
>>  PGeo: MDB Tools driver: /usr/lib/libmdbodbc.so.0
>>  ERROR 1: ODBC: Invalid install path
>>  Warning 1: Unable to install MDB driver for ODBC, MDB access may not
>> supported.
>>
>>  PGeo: EstablishSession(sample_pgeo)
>>  ODBC: SQLConnect(sample_pgeo)
>>  ODBC: ... failed: [unixODBC][Driver Manager]Data source name not
>> found, and no default driver specified
>>  ODBC: SQLDisconnect()
>>  ERROR 1: Unable to initialize ODBC connection to DSN for sample_pgeo,
>>  [unixODBC][Driver Manager]Data source name not found, and no default
>> driver specified
>>  FAILURE:
>>  Unable to open datasource `PGeo:sample_pgeo' with the following
>> drivers.
>>
>>
>> I am working on a Ubuntu/Natty OS with unixODBC 2.3.1, which I installed
>> from a
>> tar download using the defaults.  (I am ignorant of make/configure..)
>>
>> I am able to see the tables in the ESRI Personal Geodatabase by using
>> DataManager
>> and mdb-tables.
>>
>> The gdal info:
>> GDAL 1.8.0, released 2011/01/12
>>
>>
>> ==============
>>
>> odbcinst -j
>> unixODBC 2.3.1
>> DRIVERS............: /usr/local/etc/odbcinst.ini
>> SYSTEM DATA SOURCES: /usr/local/etc/odbc.ini
>> FILE DATA SOURCES..: /home/GISData/CurbCuts/
>> USER DATA SOURCES..: /home/katie/.odbc.ini
>> SQLULEN Size.......: 4
>> SQLLEN Size........: 4
>> SQLSETPOSIROW Size.: 2
>>
>> ====
>>
>> mdb-tables WPC_study_area_data_from_PBOT.mdb
>> GDB_ReleaseInfo GDB_FeatureDataset GDB_ObjectClasses GDB_FeatureClasses
>> GDB_RelClasses GDB_ValidRules GDB_AttrRules GDB_RelRules
>> GDB_EdgeConnRules GDB_JnConnRules GDB_Topologies GDB_TopoRules
>> GDB_TopoClasses GDB_DefaultValues GDB_Subtypes GDB_Domains
>> GDB_RangeDomains GDB_CodedDomains GDB_UserMetadata GDB_FieldInfo
>> GDB_Extensions GDB_Replicas GDB_ReplicasEx GDB_ReplicaDatasets
>> GDB_Toolboxes GDB_RasterCatalogs GDB_ExtensionDatasets GDB_ReplicaLog
>> GDB_AnnoSymbols GDB_SpatialRefs GDB_GeomColumns Streets_pdx_Shape_Index
>> Streets_pdx Selections SelectedObjects Tax_Parcels_Shape_Index
>> Tax_Parcels Sidewalks_Shape_Index Sidewalks Curb_Ramps_Shape_Index
>> Curb_Ramps Driveways_Shape_Index Driveways PM_Symbols_Shape_Index
>> PM_Symbols PM_Lines_Shape_Index PM_Lines MAX_Shape_Index MAX
>> LH_Intersections_Shape_Index LH_Intersections LH_Nodelegs_Shape_Index
>> LH_Nodelegs LH_Blockfaces_Shape_Index LH_Blockfaces
>> LH_Segments_Shape_Index LH_Segments
>>
>> ============Access DSN in /usr/local/etc/odbcinst.ini
>>
>> 1:~$ grep -A7 Access /usr/local/etc/odbcinst.ini
>> [Microsoft Access Driver (*.mdb)]
>> Description     = MDB Tools ODBC drivers
>> Driver          = /usr/lib/libmdbodbc.so.0
>> Setup           =
>> FileUsage       = 1
>> CPTimeout       =
>> CPReuse         =
>>
>> and in ~/.odbc.ini
>> [sample_pgeo]
>> Description     = Sample PGeo Database for Curb Cuts
>> Driver          = Microsoft Access Driver (*.mdb)
>> Database        = /home/GISData/CurbCuts/WPC_study_area_data_from_PBOT.mdb
>> Host            = localhost
>> Port            = 1360
>> User            = katie
>> Password        =
>> Trace           = Yes
>> _______________________________________________
>> UbuntuGIS mailing list
>> Ubuntu at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/ubuntu
>> http://trac.osgeo.org/ubuntugis/wiki


More information about the Ubuntu mailing list