Cant find the redis client package?

Cant find the redis package ?

?- pack_list(redis).
% Contacting server at https://www.swi-prolog.org/pack/query … ok
p resp@0.3 - Redis protocol parser and writer
p resp_parse@0.1 - Redis protocol parser and writer
true.

?- pack_install(redis).
% Contacting server at https://www.swi-prolog.org/pack/query … done
Warning: No registered pack matches “redis”
false.

?- use_module(library(redis)).
ERROR: source_sink `library(redis)’ does not exist
ERROR: In:
ERROR: [19] throw(error(existence_error(source_sink,…),_9268))
ERROR: [15] ‘$resolve_source_path’(library(redis),_9300,[if(not_loaded),…]) at /usr/lib/swi-prolog/boot/init.pl:2315
ERROR: [14] ‘$load_file’(library(redis),user,[if(not_loaded),…]) at /usr/lib/swi-prolog/boot/init.pl:2289
ERROR: [9]
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.
?-

That is quite clear, no? :slight_smile: library(redis) is packages with the recent development versions. It is not available for the stable versions (will come with 8.4.0). Don’t worry, the development versions are 99% of the time more reliable than the stable versions. They come with some infrequent regression, but such issues are typically fixed within a day after reporting.

so if i switch to devel version , i will have it there …

thats what i understood to … when searching around

1 Like

My OS:

lsb_release --all
LSB Version: core-9.20170808ubuntu1-noarch:security-9.20170808ubuntu1-noarch
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

After:
sudo apt-add-repository ppa:swi-prolog/stable
sudo apt-get update
sudo apt-get install swi-prolog

I have :
swipl --version
SWI-Prolog version 8.2.4 for x86_64-linux

:-use_module(library(redis)).
ERROR: source_sink `library(redis)’ does not exist
ERROR: In:
ERROR: [19] throw(error(existence_error(source_sink,…),_11104))
ERROR: [15] ‘$resolve_source_path’(library(redis),_11136,[if(not_loaded),…]) at /usr/lib/swi-prolog/boot/init.pl:2318
ERROR: [14] ‘$load_file’(library(redis),user,[if(not_loaded),…]) at /usr/lib/swi-prolog/boot/init.pl:2292
ERROR: [9]
ERROR:
ERROR: Note: some frames are missing due to last-call optimization.
ERROR: Re-run your program in debug mode (:- debug.) to get more detail.

grep -r redis /usr/lib/swi-prolog

Binary file /usr/lib/swi-prolog/bin/x86_64-linux/swipl-ld matches
/usr/lib/swi-prolog/doc/packages/libedit.html:redisplay, error or fatal. In
/usr/lib/swi-prolog/doc/packages/nlp.html:

This module is free software; you may redistribute it and/or modify
/usr/lib/swi-prolog/xpce/prolog/contrib/rubik/rubikpce.pl: refresh(+Frame) will redisplay the cube associated with Frame on the /usr/lib/swi-prolog/xpce/prolog/lib/swi/swi_console.pl: 'redistribute it under certain conditions.', /usr/lib/swi-prolog/xpce/prolog/lib/man/v_manual.pl: 'redistribute it under certain conditions.', Binary file /usr/lib/swi-prolog/xpce/appl-help/dialog.hlp matches Binary file /usr/lib/swi-prolog/xpce/man/reference/class/device.doc matches Binary file /usr/lib/swi-prolog/xpce/man/reference/class/text.doc matches Binary file /usr/lib/swi-prolog/xpce/man/reference/index.obj matches /usr/lib/swi-prolog/library/dialect/iso/iso_predicates.pl:allow redistribution under a new name and interface using the GPL, we /usr/lib/swi-prolog/library/clp/clpr.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpr/store_r.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpr/fourmotz_r.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpr/itf_r.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpr/nf_r.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpr/bb_r.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpr/bv_r.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpr/ineq_r.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpq.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpqr/itf.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpqr/project.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpqr/geler.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpqr/ordering.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpqr/redund.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpqr/class.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpqr/dump.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpq/fourmotz_q.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpq/store_q.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpq/nf_q.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpq/ineq_q.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpq/itf_q.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpq/bb_q.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/clp/clpq/bv_q.pl: This program is free software; you can redistribute it and/or /usr/lib/swi-prolog/library/double_metaphone.pl: This module is free software; you may redistribute it and/or /usr/lib/swi-prolog/library/editline.pl: redisplay, error or fatal. In addition, the following Continue
/usr/lib/swi-prolog/library/editline.pl: Continue = redisplay
/usr/lib/swi-prolog/library/editline.pl: Continue = redisplay.
/usr/lib/swi-prolog/library/editline.pl: Continue = redisplay.
Binary file /usr/lib/swi-prolog/lib/x86_64-linux/pl2xpce.so matches
Binary file /usr/lib/swi-prolog/lib/x86_64-linux/libedit4pl.so matches

So no redis in stable ?

It is only in the development version for now.

The “dev” version is actually very stable – I don’t think anyone has reported a regression, and only the occasional problem with a new feature.

So:

sudo apt remove swi-prolog
sudo add-apt-repository --remove ppa:swi-prolog/stable
sudo apt-add-repository ppa:swi-prolog/devel
sudo apt update
sudo apt install swi-prolog
2 Likes

Everything is working as expected, thank you.