Ben le code qui remonte l'erreur ne fait rien de bien compliqué:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
| import sys
try:
from ctypes import *
except ImportError:
print>>sys.stderr, "A required module: 'ctypes' not found."
sys.exit(1)
try:
if sys.platform[:3] == "win":
# we're on windows
_lib = CDLL("libpl.dll")
else:
# UNIX-like
try:
_lib = CDLL("libpl.so")
except IndexError:
# let's try the cwd
_lib = CDLL("./libpl.so")
except OSError:
print>>sys.stderr, "libpl (shared) not found. Possible reasons:"
print>>sys.stderr, "1) SWI-Prolog not installed as a shared library. Install SWI-Prolog (5.6.34 works just fine)"
sys.exit(1) |
Dans la procédure d'install:
1 2 3 4 5 6 7 8 9
| # clp library is useful for constraint handling problems, so let's install it too:
$ cd cd packages/clpqr
$ ./configure --prefix=/usr --enable-shared
$ make && sudo make install
# Create a soft link:
$ sudo ln -s /usr/lib/pl-5.6.34/lib/i686-linux/libpl.so.5.6.34 /usr/lib/libpl.so |
Après c'est peut être comme dans les police d'assurance... En tout petit en bas est écrit:
If you get an error, such as "libpl (shared) not found." or "FATAL ERROR: Resource not found" be sure you have installed SWI-Prolog as a share library. Check your default library directory (usually /usr/lib) for libpl.so.
Que contient le fichier: /etc/ld.so.conf?
-W
Partager