# Pack installer does not check installed packs for dependencies?

**URL:** <https://swi-prolog.discourse.group/t/pack-installer-does-not-check-installed-packs-for-dependencies/9707>\
**Category:** Installing\
**Created:** [June 19, 2026, 1:17pm UTC](https://swi-prolog.discourse.group/t/pack-installer-does-not-check-installed-packs-for-dependencies/9707 "2026-06-19T13:17:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicos](https://avatars.discourse-cdn.com/v4/letter/n/7feea3/32.png) [@nicos](https://swi-prolog.discourse.group/u/nicos)\
**Post date:** [June 19, 2026, 1:17pm UTC](https://swi-prolog.discourse.group/t/pack-installer-does-not-check-installed-packs-for-dependencies/9707/1 "2026-06-19T13:17:58Z")

</div>

I think I posted before about this issue in the forum.  
Hopefully, the following is a more complete report.

Behaviour:

I am trying to install bio\_db (4.8) which in its pack.pl includes: “requires(lib)”.  
I have latest lib installed in my system. But I still get  
(a) a request to install it, and  
(b) a “fail” if I say i don’t like the installation plan

```prolog
στοικός;~% swipl
% /home/nicos/.rcpl compiled 0.00 sec, 8 clauses
Welcome to SWI-Prolog (threaded, 64 bits, version 10.1.9-12-g05068fb7d)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.

For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).

13 ?- pack_remove(bio_db).
% Removing '/home/nicos/.local/share/swi-prolog/pack/bio_db' and contents
true.

14 ?- pack_property( lib, version(V) ).
V = '2.11'.

15 ?- pack_install('https://stoics.org.uk/~nicos/sware/packs/bio_db/bio_db-4.8.tgz'). 
Installation plan:
  Install bio_db at version 4.8 from https://stoics.org.uk/~nicos/sware/packs/bio_db/bio_db-4.8.tgz
Download packs? Y/n? 
% Downloading bio_db ... 217,635 bytes
% Found new dependencies after downloading ([lib]).
% Contacting server at https://www.swi-prolog.org/pack/query ... ok
Installation plan:
  Keep bio_db at version 4.8
  Install lib at version 2.11 as dependency for [bio_db] from https://stoics.org.uk/~nicos/sware/packs/lib/lib-2.11.tgz (downloaded 126 times)
Download packs? Y/n? 
false.

```

Desired:  
(a) the system checks for the installed packs to satisfy dependencies  
(b) there is a 3rd option of only installing the requested pack, without the dependencies  
(like when removing a pack with dependencies; where is asked for remove all, or just the requested one)

Technical:

According to comment in download\_plan/3:

```prolog
   %! download_plan(+Targets, +Plan, +Options) is semidet.
   %
      % Download or update all packages from Plan. We need to do this as a
      % first step because we may not have (up-to-date) dependency
      % information about all packs. For example, a pack may be installed at
      % the git HEAD revision that is not yet know to the server or it may
      % be installed from a url that is not known at all at the server.

```

This shouldn’t apply here.

The local installation is the official version from the server, the pack will be installed from a published static tgz. So it should not be in the Plan or given that download\_plan/2 knows that it is installed at latest version, should not proceed with suggesting request.

At the very least, the user should have an option to ignore dependencies so the requested pack can be installed.

Tiny typo in prolog\_pack.pl: “that is not yet know to the server” → “that is not yet known to the server”

Note, that the more annoying scenario is when the local version of “lib” is a private newer version, in which case re-installing the public version needs to be following by re-installing the local version.

Regards,

## Nicos Angelopoulos

> **[Nicos Angelopoulos](https://stoics.org.uk/~nicos/)**
>
> logic programming

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [June 19, 2026, 2:12pm UTC](https://swi-prolog.discourse.group/t/pack-installer-does-not-check-installed-packs-for-dependencies/9707/2 "2026-06-19T14:12:38Z")

</div>

> [@nicos](#):
>
> (a) the system checks for the installed packs to satisfy dependencies

Looks like a bug ☹

> [@nicos](#):
>
> (b) there is a 3rd option of only installing the requested pack, without the dependencies  
> (like when removing a pack with dependencies; where is asked for remove all, or just the requested one)

Saying n(o) actually has this effect. Agreed, not very elegantly as it says “false” ☹ It does lead to an installed bio\_db pack and no update of the dependencies. A priory installation of packs without dependencies is a feature I’ve not seen in mature package managers like `apt` or `dnf`. You can always do so by hand if you really want.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [July 1, 2026, 8:36am UTC](https://swi-prolog.discourse.group/t/pack-installer-does-not-check-installed-packs-for-dependencies/9707/3 "2026-07-01T08:36:55Z")

</div>

> [@nicos](#):
>
> Desired:  
> (a) the system checks for the installed packs to satisfy dependencies

Fixed with 72e253b3896fc0021e4b50542bbd580197569d42
