SWI-Prolog requires the following packages:
To install the required packages manually (i.e., when compiling swipl from scratch or using a converted RPM package), do the following:
sudo apt-get install libc6 libgmp3c2 libncurses5 libreadline5 libgmp3-dev libreadline5-dev
Another way to install the required packages is to install the swi-prolog
package itself (available in Ubuntu universe repository, unavailable in Etch stable) and then remove it:
sudo apt-get install swi-prolog ... sudo apt-get remove swi-prolog