# Issue with pack\_install not accepting GitHub URLs

**URL:** <https://swi-prolog.discourse.group/t/issue-with-pack-install-not-accepting-github-urls/7226>\
**Category:** Help!\
**Created:** [February 7, 2024, 11:21am UTC](https://swi-prolog.discourse.group/t/issue-with-pack-install-not-accepting-github-urls/7226 "2024-02-07T11:21:15Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![crgz](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/crgz/32/6144_2.png) [@crgz](https://swi-prolog.discourse.group/u/crgz)\
**Post date:** [February 7, 2024, 11:21am UTC](https://swi-prolog.discourse.group/t/issue-with-pack-install-not-accepting-github-urls/7226/1 "2024-02-07T11:21:15Z")

</div>

Hey everyone,

I’ve been encountering an unexpected issue with `pack_install` in SWI-Prolog version 9.2.0. It seems that it mysteriously stopped accepting GitHub URLs, causing errors during installation. I’m attempting to install Prolog packs directly from GitHub using `pack_install`. Here’s an example of the URL I’m trying to install:

```prolog
pack_install('https://github.com/fnogatz/date_time/archive/v0.1.4.zip').

```

**I’m using:** SWI-Prolog version 9.2.0

**I want the code to:** Install packages from GitHub using `pack_install`.

**But what I’m getting is:** Type errors indicating that `text` was expected but `version([0,1,4])` were found.

**My code looks like this:**

```prolog
?- pack_install('https://github.com/fnogatz/date_time/archive/v0.1.4.zip').
ERROR: Type error: `text' expected, found `version([0,1,4])' (a compound)

```

It seems like pack\_install is not interpreting the version numbers correctly when provided with GitHub URLs.

Has anyone else experienced this issue or knows of a workaround? Any help would be greatly appreciated!

Thanks.

---

<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:** [February 7, 2024, 12:35pm UTC](https://swi-prolog.discourse.group/t/issue-with-pack-install-not-accepting-github-urls/7226/2 "2024-02-07T12:35:52Z")

</div>

This bug is already fixed in the git version. The work-around is to use either

```
?- pack_install(date_time, [url('https://github.com/fnogatz/date_time/archive/v0.1.4.zip')]).

```

Or, more easily

```
?- pack_install(date_time).

```

Nor, yet more easily

```
swipl pack install date_time

```

If you want a specific version

```
swipl pack install --version =0.1.4 date_time

```

---

<div class="post-metadata">

**Author:** ![crgz](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/crgz/32/6144_2.png) [@crgz](https://swi-prolog.discourse.group/u/crgz)\
**Post date:** [February 7, 2024, 12:42pm UTC](https://swi-prolog.discourse.group/t/issue-with-pack-install-not-accepting-github-urls/7226/3 "2024-02-07T12:42:57Z")

</div>

Thank you so much, Jan! I’ll proceed with the work-around. Your timely response is greatly appreciated!

---

<div class="post-metadata">

**Author:** ![crgz](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/crgz/32/6144_2.png) [@crgz](https://swi-prolog.discourse.group/u/crgz)\
**Post date:** [February 7, 2024, 1:03pm UTC](https://swi-prolog.discourse.group/t/issue-with-pack-install-not-accepting-github-urls/7226/4 "2024-02-07T13:03:52Z")

</div>

I’d like to learn more about these features. However, I couldn’t locate them on the [SWI-Prolog -- Command line options](https://www.swi-prolog.org/pldoc/man?section=cmdline) page. Could you please direct me to where I can find information on them?"

---

<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:** [February 7, 2024, 1:33pm UTC](https://swi-prolog.discourse.group/t/issue-with-pack-install-not-accepting-github-urls/7226/5 "2024-02-07T13:33:57Z")

</div>

See [SWI-Prolog -- SWI-Prolog app scripts](https://www.swi-prolog.org/pldoc/man?section=swipl-app)

---

<div class="post-metadata">

**Author:** ![crgz](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/crgz/32/6144_2.png) [@crgz](https://swi-prolog.discourse.group/u/crgz)\
**Post date:** [February 7, 2024, 4:50pm UTC](https://swi-prolog.discourse.group/t/issue-with-pack-install-not-accepting-github-urls/7226/6 "2024-02-07T16:50:02Z")

</div>

Jan, your support truly exemplifies world-class service. Thank you!
