You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Hello all,
when trying to start ./hammerdbcli on my VirtualBox VM running Fedora Server 39, I get the following error:
"While loading module "Thread". . .
can't find package Thread
while executing
"package require $m "
I've been trying to get to the bottom of this problem, unfortunately without any success yet. Any help would be appreciated!
OK, so you definitely shouldn't modify hammerdbcli it will not work with a system installed tclsh as it has been modified.
Change this back to
./bin/tclsh8.6
then cd to the HammerDB directory and run
./hammerdbcli
if there is not a tclsh8.6 executable in the HammerDB bin directory then now we have this new error another possible cause you may have is that you have downloaded the HammerDB source from GitHub and are trying to run it without compiling it first and not the pre-compiled executable available as a release file.
If this is the case, you need to download the executable version instead from here
https://www.hammerdb.com/download.html
.
Alternatively, you can use a pre-built Docker …
This error comes from HammerDB not being able to find the lib directory. Make sure you run HammerDB from the HammerDB home directory. hammerdbcli is a shell script that will set the library path to:
$ export LD_LIBRARY_PATH=./lib:$LD_LIBRARY_PATH
and then run the executable so it will need to find the libraries in
./lib
from where you are. Note that the Thread package is simply the first one that it tries to load, so not loading Thread is a symptom of this.
You can troubelshoot by running the tclsh directly as follows and see the same thing. So if we don't have
./lib
in our library path then this is the same error as you are seeing run manually.
[HammerDB-4.9]$ ./bin/tclsh8.6
% package require thread
can't find package thread
Now if we export our library path at the command shell to put ./lib at the start.
$ export LD_LIBRARY_PATH=./lib:$LD_LIBRARY_PATH
and then run from the HammerDB directory where we have ./bin with the executables and ./lib with the libraries - now we can find the Thread package.
[HammerDB-4.9]$ ./bin/tclsh8.6
% package require Thread
2.8.7
Now running hammerdbcli will work as well.
This dependency on running from the home directory and finding the correct paths is discussed here #597 and plans are in progress to build a single file executable that will prevent this issue.
Thank you for your reply, much appreciated! Unfortunately I'm already running the commands from the HammerDB home directory. One more thing to add though: In hammerdbcli, I changed the path for tclsh8.6 from ./bin/tclsh8.6 to usr/bin/tclsh8.6. Before doing so, I received the following error: ./hammerdbcli: row 10: /home/HammerDB/bin/tclsh8.6: file or directory not found when executing hammerdbcli.
OK, so you definitely shouldn't modify hammerdbcli it will not work with a system installed tclsh as it has been modified.
Change this back to ./bin/tclsh8.6 then cd to the HammerDB directory and run ./hammerdbcli if there is not a tclsh8.6 executable in the HammerDB bin directory then now we have this new error another possible cause you may have is that you have downloaded the HammerDB source from GitHub and are trying to run it without compiling it first and not the pre-compiled executable available as a release file.
If this is the case, you need to download the executable version instead from here https://www.hammerdb.com/download.html.
Alternatively, you can use a pre-built Docker image or build the executables from source you have downloaded by following the HammerDB documentation and blog on how to do this.