Crafty installation is pretty simple. The command
will install crafty at /usr/games/crafty and the book files at /usr/share/crafty/books.bin.
If the book files are not installed they can be manually installed by
Sometimes the book are not automatically installed in the home folder and it will result in the following error when crafty is run from the command line.
This implies that we need to import the book.bin and books.bin which contain a vast array of opening moves into the local ~/.crafty directory. For that, we need to run the setup_crafty.sh. However, it needs to be made executable by the normal user first. As root go to the directory /usr/share/doc/crafty and do the following,
Then logout from root, go back to the same directory /usr/share/doc/crafty and run as user:
Don't run the last command as root otherwise the .crafty directory will be created in the /root directory! It will spit out a few lines of info. Copy the lines
to .bashrc file and then
After that source
Run
Crafty. It should be able to see the book files now.
sudo apt-get install crafty
will install crafty at /usr/games/crafty and the book files at /usr/share/crafty/books.bin.
If the book files are not installed they can be manually installed by
sudo apt-get install crafty-books-medtosmall
Sometimes the book are not automatically installed in the home folder and it will result in the following error when crafty is run from the command line.
Machine is NUMA, 1 nodes (6 cpus/node) unable to open book file [./book.bin]. book is disabled unable to open book file [./books.bin]. ERROR, unable to open game history file, exiting
This implies that we need to import the book.bin and books.bin which contain a vast array of opening moves into the local ~/.crafty directory. For that, we need to run the setup_crafty.sh. However, it needs to be made executable by the normal user first. As root go to the directory /usr/share/doc/crafty and do the following,
su
cd /usr/share/doc/crafty
sudo chmod 777 setup_crafty.sh
Then logout from root, go back to the same directory /usr/share/doc/crafty and run as user:
./setup_crafty.sh
Don't run the last command as root otherwise the .crafty directory will be created in the /root directory! It will spit out a few lines of info. Copy the lines
export CRAFTY_LOG_PATH=/home/<USERNAME>/.crafty export CRAFTY_RC_PATH=/home/<USERNAME>/.crafty export CRAFTY_TB_PATH=/home/<USERNAME>/.crafty export CRAFTY_BOOK_PATH=/home/<USERNAME>/.crafty
to .bashrc file and then
source .bashrc
After that source
source /home/<USERNAME>/.crafty/env_settings
Comments