Help with SQLite3 package

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Help with SQLite3 package

Michel
Hi pharoers,

I am a newbie with Pharo.

I installed the SQLite3 package in the Pharo2 image with the
MetacelloConfigurationBrowser and tried a test with this script :
db := SQLiteConnection fileNamed: '/home/michel/base_CD/BaseCD.db'.
resu := db executeQuery: 'SELECT * FROM T_album'.
resu inspect.

And I got this error : External module not found.

I am on Fedora linux and I think that I should give somewhere (in
SQLiteReference class ?) the address of the libsqlite3.so file. Am I
right ?

Kind Regards,
Michel.

Reply | Threaded
Open this post in threaded view
|

Re: Help with SQLite3 package

Stéphane Ducasse

On Nov 20, 2013, at 6:13 PM, Michel <[hidden email]> wrote:

> Hi pharoers,
>
> I am a newbie with Pharo.

Welcome :)
We are all newbies on different topics.

> I installed the SQLite3 package in the Pharo2 image with the MetacelloConfigurationBrowser and tried a test with this script :
> db := SQLiteConnection fileNamed: '/home/michel/base_CD/BaseCD.db'.
> resu := db executeQuery: 'SELECT * FROM T_album'.
> resu inspect.

I do not know :) Now somebody will probably help.
Now this is a cool example of why we need a test and automatic package validation.

> And I got this error : External module not found.

It looks like you need a plugin

> I am on Fedora linux and I think that I should give somewhere (in SQLiteReference class ?) the address of the libsqlite3.so file. Am I right ?

I do not know but  it depends on the logic of the plugin because a plugin could have the logic to find the lib.

>
> Kind Regards,
> Michel.
>


Reply | Threaded
Open this post in threaded view
|

Re: Help with SQLite3 package

jtuchel
In reply to this post by Michel
Hi Michel,

I am neither a Pharo nor a sqlite expert, but I would guess the sqlite
library is not in your image directory or you are starting pharo without
setting the PATH to a location that contains the sqlite library.

HTH,

Joachim

Am 20.11.13 18:13, schrieb Michel:

> Hi pharoers,
>
> I am a newbie with Pharo.
>
> I installed the SQLite3 package in the Pharo2 image with the
> MetacelloConfigurationBrowser and tried a test with this script :
> db := SQLiteConnection fileNamed: '/home/michel/base_CD/BaseCD.db'.
> resu := db executeQuery: 'SELECT * FROM T_album'.
> resu inspect.
>
> And I got this error : External module not found.
>
> I am on Fedora linux and I think that I should give somewhere (in
> SQLiteReference class ?) the address of the libsqlite3.so file. Am I
> right ?
>
> Kind Regards,
> Michel.
>
>


--
-----------------------------------------------------------------------
Objektfabrik Joachim Tuchel          mailto:[hidden email]
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1


Reply | Threaded
Open this post in threaded view
|

Re: Help with SQLite3 package

Michel
Hi Joachim,

I have a sqlite library in /usr/lib named 'libsqlite3.so.0.8.6'. This
directory is of course in the path.

I made a copy of this library in my pharo2.0/bin directory and changed
its name to 'libsqlite3.so' and it fixed the problem !

So I got it thanks to your help and a little luck. Depending on the
linux distro this library name would differ. Somebody knows where it is
defined in the image ?

Regards,
Michel.

> Hi Michel,
>
> I am neither a Pharo nor a sqlite expert, but I would guess the sqlite
> library is not in your image directory or you are starting pharo
> without setting the PATH to a location that contains the sqlite library.
>
> HTH,
>
> Joachim
>
> Am 20.11.13 18:13, schrieb Michel:
>> Hi pharoers,
>>
>> I am a newbie with Pharo.
>>
>> I installed the SQLite3 package in the Pharo2 image with the
>> MetacelloConfigurationBrowser and tried a test with this script :
>> db := SQLiteConnection fileNamed: '/home/michel/base_CD/BaseCD.db'.
>> resu := db executeQuery: 'SELECT * FROM T_album'.
>> resu inspect.
>>
>> And I got this error : External module not found.
>>
>> I am on Fedora linux and I think that I should give somewhere (in
>> SQLiteReference class ?) the address of the libsqlite3.so file. Am I
>> right ?
>>
>> Kind Regards,
>> Michel.
>>
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: Help with SQLite3 package

jtuchel
In reply to this post by Michel
Michel,

Maybe you should consider using a link instead of a copy of the file.
I would also suggest to only add a link within to the sqlite installation directory rather than the pharo directory. Because then pharo will find sqlite3.so as well and you have way fewer dependencies.

Joachim

Michel <[hidden email]> schrieb:

>Hi Joachim,
>
>I have a sqlite library in /usr/lib named 'libsqlite3.so.0.8.6'. This
>directory is of course in the path.
>
>I made a copy of this library in my pharo2.0/bin directory and changed
>its name to 'libsqlite3.so' and it fixed the problem !
>
>So I got it thanks to your help and a little luck. Depending on the
>linux distro this library name would differ. Somebody knows where it is
>defined in the image ?
>
>Regards,
>Michel.
>
>> Hi Michel,
>>
>> I am neither a Pharo nor a sqlite expert, but I would guess the sqlite
>> library is not in your image directory or you are starting pharo
>> without setting the PATH to a location that contains the sqlite library.
>>
>> HTH,
>>
>> Joachim
>>
>> Am 20.11.13 18:13, schrieb Michel:
>>> Hi pharoers,
>>>
>>> I am a newbie with Pharo.
>>>
>>> I installed the SQLite3 package in the Pharo2 image with the
>>> MetacelloConfigurationBrowser and tried a test with this script :
>>> db := SQLiteConnection fileNamed: '/home/michel/base_CD/BaseCD.db'.
>>> resu := db executeQuery: 'SELECT * FROM T_album'.
>>> resu inspect.
>>>
>>> And I got this error : External module not found.
>>>
>>> I am on Fedora linux and I think that I should give somewhere (in
>>> SQLiteReference class ?) the address of the libsqlite3.so file. Am I
>>> right ?
>>>
>>> Kind Regards,
>>> Michel.
>>>
>>>
>>
>>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Help with SQLite3 package

Michel
Thanks Joachim. I did it and it's better.
Michel.

> Michel,
>
> Maybe you should consider using a link instead of a copy of the file.
> I would also suggest to only add a link within to the sqlite installation directory rather than the pharo directory. Because then pharo will find sqlite3.so as well and you have way fewer dependencies.
>
> Joachim
>
> Michel <[hidden email]> schrieb:
>
>> Hi Joachim,
>>
>> I have a sqlite library in /usr/lib named 'libsqlite3.so.0.8.6'. This
>> directory is of course in the path.
>>
>> I made a copy of this library in my pharo2.0/bin directory and changed
>> its name to 'libsqlite3.so' and it fixed the problem !
>>
>> So I got it thanks to your help and a little luck. Depending on the
>> linux distro this library name would differ. Somebody knows where it is
>> defined in the image ?
>>
>> Regards,
>> Michel.
>>
>>> Hi Michel,
>>>
>>> I am neither a Pharo nor a sqlite expert, but I would guess the sqlite
>>> library is not in your image directory or you are starting pharo
>>> without setting the PATH to a location that contains the sqlite library.
>>>
>>> HTH,
>>>
>>> Joachim
>>>
>>> Am 20.11.13 18:13, schrieb Michel:
>>>> Hi pharoers,
>>>>
>>>> I am a newbie with Pharo.
>>>>
>>>> I installed the SQLite3 package in the Pharo2 image with the
>>>> MetacelloConfigurationBrowser and tried a test with this script :
>>>> db := SQLiteConnection fileNamed: '/home/michel/base_CD/BaseCD.db'.
>>>> resu := db executeQuery: 'SELECT * FROM T_album'.
>>>> resu inspect.
>>>>
>>>> And I got this error : External module not found.
>>>>
>>>> I am on Fedora linux and I think that I should give somewhere (in
>>>> SQLiteReference class ?) the address of the libsqlite3.so file. Am I
>>>> right ?
>>>>
>>>> Kind Regards,
>>>> Michel.
>>>>
>>>>
>>>
>>
>>