在Manjaro下使unixODBC与SQLite3配合使用时遇到麻烦。相关数据如下。
已安装:
unixODBC 2.3.7-1
sqlite 3.24.0-1
libdbi-drivers 0.9.0-6
配置文件:
$ cat /etc/odbcinst.ini
[SQLite3]
Driver=/usr/lib/dbd/libdbdsqlite3.so
Description=SQLite3 ODBC Driver
UsageCount=2
$ ls -l /usr/lib/dbd/libdbdsqlite3.so
-rwxr-xr-x 1 root root 42112 Jun 28 2017 /usr/lib/dbd/libdbdsqlite3.so
$ cat ~/.odbc.ini
[test]
Description = Test Database
Driver = SQLite3
Trace = Yes
TraceFile = sql.log
Database = /home/william/db/test.db
ReadOnly = No
$ file /home/william/db/test.db
/home/william/db/test.db: SQLite 3.x database, last written using SQLite version 3024000
和基本测试:
$ isql test -v
[IM004][unixODBC][Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_HENV failed
[ISQL]ERROR: Could not SQLConnect
就我所知,一切看起来都很好,为什么我不能使用ODBC连接到SQLite3数据库?