[Mono-list] Unable To Run sqlite Client Example
Adam Tauno Williams
adam@morrison-ind.com
Thu, 30 Dec 2004 14:34:18 -0500
On Thu, 2004-12-30 at 13:56 -0500, Adam Tauno Williams wrote:
> I have a working sqlite installation-
>
> awilliam@laptop01:~> sqlite SqliteTest.db
> SQLite version 2.8.15
> Enter ".help" for instructions
> sqlite> select * from employee;
> adam|williams
> michelle|williams
> sqlite> .exit
> awilliam@laptop01:~> rpm -q sqllite
> package sqllite is not installed
> awilliam@laptop01:~> rpm -q mono-data-sqlite
> mono-data-sqlite-1.0.5-1.ximian.10.4
>
> and I can compile the sample sqlite code from mono doc -
>
> awilliam@laptop01:~> mcs TestExample.cs -r System.Data.dll -r
> Mono.Data.SqliteClient.dll
> Compilation succeeded
>
> but attempting to run the app dies with -
>
> awilliam@laptop01:~> mono TestExample.exe
>
> Unhandled Exception: System.DllNotFoundException: sqlite
> in <0x00053> (wrapper managed-to-native)
> Mono.Data.SqliteClient.SqliteConnection:sqlite_open (string,int,string&)
> in <0x0005d> Mono.Data.SqliteClient.SqliteConnection:Open ()
> in <0x00066> Whitemice.Sqlite.Test:Main (string[])
> What DLL am I missing?
Doh!
This fixes it -
awilliam@laptop01:/usr/lib> su
Password:
laptop01:/usr/lib # ls -l libsql*
lrwxrwxrwx 1 root root 18 2004-10-30 01:17 libsqlite.so.0 ->
libsqlite.so.0.8.6
-rwxr-xr-x 1 root root 319232 2004-10-01 21:38 libsqlite.so.0.8.6
laptop01:/usr/lib # ln -s libsqlite.so.0.8.6 libsqlite.so
laptop01:/usr/lib # exit
Works now.