To install Chestnut Package Manager you need Python 2.4 or later installed on your machine.
Installation is very simple. Unpack the tar archive
tar xzvf Chestnut-2.2.0.tar.gz
Then run the installation script
python setup.py install --home=$HOME
it is recommended that $HOME/bin is in your PATH environment variable.
After the installation is done, you will have three executables in your $HOME/bin directory: cnrun, cnls and cnpath.
Before using Chestnut, you have to specify the directories where packages will be searched. A possible choice for personal packages is $HOME/Packages. You can also have system-wide directories in /usr/local/Packages and /opt/Packages, for example. These paths must be specified in the CN_PACKAGE_SEARCH_PATH environment variable.
export CN_PACKAGE_SEARCH_PATH=$HOME/Packages:/usr/local/Packages/:/opt/Packages
with higher priority to the first directory, and lower priorities to the following ones (exactly as in PATH). It is suggested that you add the previous line into your .bash_profile, so that it gets parsed every time you perform the login.
You also need to create the directories given above. Some of them require superuser privileges, therefore the program sudo is needed to perform the task. Your password will probably be asked.
$ sudo mkdir /usr/local/Packages $ sudo chmod 777 /usr/local/Packages $ sudo mkdir -p /opt/Packages $ sudo chmod 777 /opt/Packages $ mkdir $HOME/Packages
We now have three preferred storage directories for our packages. Of course, we don’t have any package yet, but we will add one soon.

Leave a Reply