This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

can't find package mysqltcl

Old posts that have not been replied to for several years.
Locked
f
festiz
Voice
Posts: 3
Joined: Fri Dec 03, 2004 8:22 am

can't find package mysqltcl

Post by festiz »

I've just installed mysqltcl v. 2.51 with the below lines.

Code: Select all

./configure -with-mysql-include=/usr/local/mysql/include/mysql/ -with-mysql-lib=/usr/local/mysql/lib/mysql/
make
su -c "make install"
So when i request the mysqltcl-module as such

Code: Select all

set mysql(vers) "2.51"
package require mysqltcl $mysql(vers)
I get the following error:

Code: Select all

can't find package mysqltcl 2.51 while executing
"package require mysqltcl $mysql(vers)"
    (file "scripts/usermin.tcl" line 14) invoked from within
Why is this happening? Why aint TCL locating my mysqltcl-module??
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

use pkg_mkIndex to create a package index and let the TCL interpreter know where is it by adding the package location to your auto_path:

Code: Select all

lappend auto_path <path-to-package-installation-dir>
f
festiz
Voice
Posts: 3
Joined: Fri Dec 03, 2004 8:22 am

Post by festiz »

Thank you! I made this little tclscript which I ran in console. Now I can require the package mysqltcl without any problems!

Code: Select all

pkg_mkIndex /usr/lib/mysqltcl-2.51
M
MacGOD
Voice
Posts: 3
Joined: Mon Dec 13, 2004 1:36 am

Post by MacGOD »

I get the same error, tried both suggestion, however still get the error.

When I go into tclsh and type package require mysqltcl I get 2.51 as a reply. But when eggdrop does it, gets package not found.

Anyone have anymore suggestions?

Thanks;

MacGOD

Some system info:
Ferdora
TCL 8.3
MySQL 4.0
mysqltcl 2.51
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

apparently you haven't tried hard enough ;)

locate your mysqltcl installation dir and use pkg_mkIndex as described above; if you are still unsuccessful, paste here what you've done and the results of it
M
MacGOD
Voice
Posts: 3
Joined: Mon Dec 13, 2004 1:36 am

Post by MacGOD »

I did everything stated above.

-- Shell Snip --
root@argos [~]# tclsh
% pkg_mkIndex /usr/local/lib/mysqltcl-2.51
% lappend auto_path /usr/local/lib/mysqltcl-2.51
/usr/share/tcl8.3 /usr/share /usr/lib /usr/local/lib/mysqltcl-2.51
-- End Snip --

When eggdrop is ran I get:

-- Shell Snip --
[00:52] Tcl error in file 'bt.conf':
[00:52] can't find package mysqltcl
while executing
"package require mysqltcl"
(file "myscript.tcl" line 10)
invoked from within
"source myscript.tcl"
(file "bt.conf" line 1276)
[00:52] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
-- End Snip --

When in tclsh I get:

-- Shell Snip --
-bash-2.05b$ tclsh
% package require mysqltcl
2.51
%
-- End Snip --

As far as I can tell, the problem lies in eggdrop. Anyone know of any possible reason?

Thanks;

MacGOD
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

did you lappend auto_path also in your eggdrop script?
M
MacGOD
Voice
Posts: 3
Joined: Mon Dec 13, 2004 1:36 am

Post by MacGOD »

duh, thanks for pointing out my stupid mistake :P

Works now. heh.
Locked