Re: How to load package sqlite3 using package require cmd ?



On Oct 14, 8:50 am, MSE...@xxxxxxxxx wrote:
On Oct 13, 4:09 pm, schlenk <schl...@xxxxxxxxxxxxxxxx> wrote:



On Oct 13, 3:46 pm, duzuike <duzu...@xxxxxxxxx> wrote:

Hi,

My OS is xubuntu, I have installed sqlite3(v3.4.2) and tcl8.5,but I
don't know the correct way to load the sqlite3 package.

%package versions slqite3
3.4

% package require sqlite3  3.4
attempt to provide package sqlite3 3.4 failed: package sqlite3 3.4.2
provided instead
while evaluating {package require sqlite3 3.4}

%package require sqlite3 3.4.2
can't find package sqlite3 3.4.2
while evaluating {package require sqlite3 3.4.2}

But I can always load sqlite3 using 'load /usr/lib/sqlite3/
libtclsqlite3.so.0' without problem .

I think the "package require cmd" is a good grammar, but why I can't
load the package ?

Packager error..., file a bug report with ubuntu.

They probably wrote a broken pkgIndex.tcl file which states that it
provides sqlite3 3.4 but in fact it provided 3.4.2.
(so you can fix the pkgIndex.tcl file by hand)

Michael

Why not simply

 package require sqlite3

without asking for any version (if there is only one present/
installed), thats what I use.

it would still be useful to fix the pkgIndex.tcl for later if/when a
newer version is added.
No. Newer versions of Tcl are more picky about a mismatch between
announced version and provided version. If those do not match you get
an error. So fixing the pkgIndex.tcl is strictly needed.

Michael

.



Relevant Pages

  • Re: "package ifneeded" and "catch" - I think, its a misbehaviour.
    ... provides one version whereas the actual library claims to provide a different version. ... No, the error is that some package claimed to be version X, but when it was actually loaded turned out to be version Y. This is clearly an error in the installation of that package. ... that "error in the installation of sqlite3" has been already ...
    (comp.lang.tcl)
  • Re: How to load package sqlite3 using package require cmd ?
    ... don't know the correct way to load the sqlite3 package. ... while evaluating ...
    (comp.lang.tcl)
  • Re: How to load package sqlite3 using package require cmd ?
    ... don't know the correct way to load the sqlite3 package. ... while evaluating ...
    (comp.lang.tcl)
  • Re: sqlite3 and Sqlite_Init
    ... sqlite3 and that sqlite-2.8.17 doesdefine Sqlite_Init and is being ... loaded automatically when "package require sqlite3" is invoked from ... ...so there is some mechanism in the load of sqlite3 that also loads ... the scons compilation process. ...
    (comp.lang.tcl)
  • Re: sqlite3 and Sqlite_Init
    ... when I run the application from the tclsh command line all is well but ... This function is responsible for registering the package and any commands provided. ... In SQLite 3 this function is called Sqlite3_Init, although it may also provide Sqlite_Init depending on compile-time options. ... Note the sqlite3 on the end. ...
    (comp.lang.tcl)