# Migrate packages from 8.13 to 8.14 on Debian

**URL:** <https://racket.discourse.group/t/migrate-packages-from-8-13-to-8-14-on-debian/3151>\
**Category:** Questions & Answers\
**Created:** [September 5, 2024, 7:20am UTC](https://racket.discourse.group/t/migrate-packages-from-8-13-to-8-14-on-debian/3151 "2024-09-05T07:20:40Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Cyrille](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cyrille](https://racket.discourse.group/u/Cyrille)\
**Post date:** [September 5, 2024, 7:20am UTC](https://racket.discourse.group/t/migrate-packages-from-8-13-to-8-14-on-debian/3151/1 "2024-09-05T07:20:40Z")

</div>

Can't update. Here is the error message

`open-output-file: error opening file path: /usr/share/racket/pkgs/.LOCKpkgs.rktd system error: Permission non accordée; errno=13 context...: /usr/share/racket/collects/racket/private/kw-file.rkt:139:2: call-with-output-file* /usr/share/racket/collects/racket/file.rkt:752:0: call-with-file-lock /usr/share/racket/collects/pkg/main.rkt:499:14 body of (submod "/usr/share/racket/collects/pkg/main.rkt" main) /usr/share/racket/collects/raco/raco.rkt:41:0 body of "/usr/share/racket/collects/raco/raco.rkt" body of "/usr/share/racket/collects/raco/main.rkt" `

---

<div class="post-metadata">

**Author:** ![jbclements](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/jbclements/32/11_2.png) [@jbclements](https://racket.discourse.group/u/jbclements)\
**Post date:** [September 5, 2024, 7:48pm UTC](https://racket.discourse.group/t/migrate-packages-from-8-13-to-8-14-on-debian/3151/2 "2024-09-05T19:48:11Z")

</div>

Can you share a bit more about the sequence of events that got you here? Specifically, was this error triggered by running the racket-...-.sh installation file, a later package update step, or something else? If I were a tiny bit cleverer I could figure this out, but perhaps you can help me here.

---

<div class="post-metadata">

**Author:** ![jbclements](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/jbclements/32/11_2.png) [@jbclements](https://racket.discourse.group/u/jbclements)\
**Post date:** [September 5, 2024, 7:49pm UTC](https://racket.discourse.group/t/migrate-packages-from-8-13-to-8-14-on-debian/3151/3 "2024-09-05T19:49:34Z")

</div>

Oh! based on your message title, it sounds like maybe this was a use of raco pkg migrate, is that right? If so, perhaps the migrate task is trying to update packages that were installed system-wide?

---

<div class="post-metadata">

**Author:** ![LiberalArtist](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/liberalartist/32/151_2.png) [@LiberalArtist](https://racket.discourse.group/u/LiberalArtist)\
**Post date:** [September 6, 2024, 6:39am UTC](https://racket.discourse.group/t/migrate-packages-from-8-13-to-8-14-on-debian/3151/4 "2024-09-06T06:39:46Z")

</div>

It would help a lot to know what command you ran to get these messages, and at what point it happened!

They may or may not be related, but some times I remember this lock file coming up:

- [open-output-file forbidden write access to ... Racket/8.1/pkgs/\_LOCKpkgs.rktd · Issue #3851 · racket/racket · GitHub](https://github.com/racket/racket/issues/3851)
- [Package updates fail unless I run DrRacket as administrator · Issue #4526 · racket/racket · GitHub](https://github.com/racket/racket/issues/4526)
- [raco pkg: work with unwritable but empty pkg directory · racket/racket@49eab2f · GitHub](https://github.com/racket/racket/commit/49eab2fb722cc056b821be93652ce0800a7f889e) (discussed in [this comment](https://github.com/racket/racket/issues/3851#issuecomment-931790564) on #3851)
- [keep ".LOCKpkgs.rktd" for source install · racket/racket@39fda5e · GitHub](https://github.com/racket/racket/commit/39fda5ec9eac8bd17d276cc35e28c55ed66e9e64) (not sure if I'd seen this one before now …)

OTOH, I regularly use `raco pkg migrate` in a setup where the "installation" scope, equivalent to `/usr/share/racket/*`, is installed via Guix on a read-only filesystem.

> [@jbclements](#):
>
> If so, perhaps the migrate task is trying to update packages that were installed system-wide?

Last I checked, `raco pkg migrate` only handles user-scope packages.

---

<div class="post-metadata">

**Author:** ![Cyrille](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cyrille](https://racket.discourse.group/u/Cyrille)\
**Post date:** [September 6, 2024, 5:12pm UTC](https://racket.discourse.group/t/migrate-packages-from-8-13-to-8-14-on-debian/3151/5 "2024-09-06T17:12:52Z")

</div>

As a user :

```scheme
raco pkg migrate 8.13

```

or from drracket (as a user) -\> package -\> install package some package.

I don't remember having any problem when upgrading to 8.13.

---

<div class="post-metadata">

**Author:** ![Cyrille](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cyrille](https://racket.discourse.group/u/Cyrille)\
**Post date:** [September 6, 2024, 5:20pm UTC](https://racket.discourse.group/t/migrate-packages-from-8-13-to-8-14-on-debian/3151/6 "2024-09-06T17:20:34Z")

</div>

`raco pkg config` gives

```scheme
name:
  8.14
catalogs:
  https://download.racket-lang.org/releases/8.14/catalog/
  https://pkgs.racket-lang.org
  https://planet-compats.racket-lang.org
default-scope:
  user
   Note: `default-scope` in installation scope is not effective,
   because `default-scope` is configured in a narrower scope
download-cache-dir:
  /home/cyrille/.racket/download-cache
download-cache-max-files:
  1024
download-cache-max-bytes:
  268435456
git-checkout-credentials:
trash-max-packages:
  512
trash-max-seconds:
  172800
network-retries:
  5

```

---

<div class="post-metadata">

**Author:** ![Cyrille](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cyrille](https://racket.discourse.group/u/Cyrille)\
**Post date:** [September 6, 2024, 5:26pm UTC](https://racket.discourse.group/t/migrate-packages-from-8-13-to-8-14-on-debian/3151/7 "2024-09-06T17:26:05Z")

</div>

Seems to be solved with 🙂

` raco pkg migrate -u 8.13`

---

<div class="post-metadata">

**Author:** ![Cyrille](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cyrille](https://racket.discourse.group/u/Cyrille)\
**Post date:** [September 6, 2024, 5:49pm UTC](https://racket.discourse.group/t/migrate-packages-from-8-13-to-8-14-on-debian/3151/8 "2024-09-06T17:49:26Z")

</div>

The packages are installed but :

- I have many errors due to

```scheme
raco setup: path: /usr/share/racket/pkgs/htdp-lib/test-engine/test-info.scm
raco setup: system error: no such file or directory; rkt_err=3

```

- when I launch drracket with say `#lang fsm`, I've got the following message :

```scheme
../../usr/share/racket/collects/racket/file.rkt:757:8: open-output-file: error opening file
  path: /usr/share/racket/pkgs/.LOCKpkgs.rktd
  system error: Permission non accordée; errno=13

Interactions disabled.

```

😠

---

<div class="post-metadata">

**Author:** ![Cyrille](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cyrille](https://racket.discourse.group/u/Cyrille)\
**Post date:** [September 7, 2024, 4:19am UTC](https://racket.discourse.group/t/migrate-packages-from-8-13-to-8-14-on-debian/3151/9 "2024-09-07T04:19:11Z")

</div>

To answer jbclements, the upgrade was made via apt without any error.

The packages to be upgraded were not installed system-wide : they are not present in /usr/share/racket/pkgs/.

---

<div class="post-metadata">

**Author:** ![Cyrille](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cyrille](https://racket.discourse.group/u/Cyrille)\
**Post date:** [September 7, 2024, 4:10pm UTC](https://racket.discourse.group/t/migrate-packages-from-8-13-to-8-14-on-debian/3151/10 "2024-09-07T16:10:37Z")

</div>

From a fresh re-install, the pkgs moved from `~/.racket/8.14/pkgs` to `~/.local/share/racket/8.14/pkgs` if that helps.

---

<div class="post-metadata">

**Author:** ![LiberalArtist](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/liberalartist/32/151_2.png) [@LiberalArtist](https://racket.discourse.group/u/LiberalArtist)\
**Post date:** [September 7, 2024, 7:06pm UTC](https://racket.discourse.group/t/migrate-packages-from-8-13-to-8-14-on-debian/3151/11 "2024-09-07T19:06:08Z")

</div>

> [@Cyrille](#):
>
> To answer jbclements, the upgrade was made via apt without any error.

> [@Cyrille](#):
>
> From a fresh re-install

Did you re-install using APT, or some other way?

I'll ping @bremner (who maintains the Debian packages) just in case he has any thoughts, but I would consider this a Racket bug.

It looks like the Debian package `racket-common` vestion `8.14+dfsg1-1` installs `/usr/share/racket/pkgs/.LOCKpkgs.rktd`. I just checked, and the equivalent file also exists in the Guix packaging, with which I use `raco pkg migrate` regularly. If the permissions are different than what I see:

```scheme
philip@bastet:~$ ls -l /gnu/store/09x10nv8y78lmdjpdw37gphg926bwvdx-racket-8.13/lib/racket/pkgs/.LOCKpkgs.rktd 
-r--r--r-- 1 root root 0 Dec 31 1969 /gnu/store/09x10nv8y78lmdjpdw37gphg926bwvdx-racket-8.13/lib/racket/pkgs/.LOCKpkgs.rktd

```

that might be one way to end up with a problem.

> [@LiberalArtist](#):
>
> They may or may not be related, but some times I remember this lock file coming up:
> 
> - [open-output-file forbidden write access to ... Racket/8.1/pkgs/\_LOCKpkgs.rktd · Issue #3851 · racket/racket · GitHub](https://github.com/racket/racket/issues/3851)
> - [Package updates fail unless I run DrRacket as administrator · Issue #4526 · racket/racket · GitHub](https://github.com/racket/racket/issues/4526)
> - [raco pkg: work with unwritable but empty pkg directory · racket/racket@49eab2f · GitHub](https://github.com/racket/racket/commit/49eab2fb722cc056b821be93652ce0800a7f889e) (discussed in [this comment](https://github.com/racket/racket/issues/3851#issuecomment-931790564) on #3851)
> - [keep ".LOCKpkgs.rktd" for source install · racket/racket@39fda5e · GitHub](https://github.com/racket/racket/commit/39fda5ec9eac8bd17d276cc35e28c55ed66e9e64) (not sure if I'd seen this one before now …)

The message in @mflatt's [keep ".LOCKpkgs.rktd" for source install · racket/racket@39fda5e · GitHub](https://github.com/racket/racket/commit/39fda5ec9eac8bd17d276cc35e28c55ed66e9e64) says that it `Closes PR 15062`, but I can't find what issue or PR that might have been referring to.

---

<div class="post-metadata">

**Author:** ![Cyrille](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cyrille](https://racket.discourse.group/u/Cyrille)\
**Post date:** [September 7, 2024, 8:06pm UTC](https://racket.discourse.group/t/migrate-packages-from-8-13-to-8-14-on-debian/3151/12 "2024-09-07T20:06:21Z")

</div>

I removed all racket package with aptitude, deleted my `~/.racket` where the 8.13 and 8.14 pkgs were and re-installed `racket-8.14+dfsg1-1` using aptitude (I'm on testing).  
I then was able to install my packages the usual way within drracket.  
The packages installed went in `~/.local/share/racket/8.14/pkgs`, not in `~/.racket`

Finally,

```scheme
$ ls-l /usr/share/racket/pkgs/.LOCKpkgs.rktd 
-rw-r--r-- 1 root root 0 2024-08-29 16:37:09 /usr/share/racket/pkgs/.LOCKpkgs.rktd

```

---

<div class="post-metadata">

**Author:** ![jbclements](https://yyz2.discourse-cdn.com/free1/user_avatar/racket.discourse.group/jbclements/32/11_2.png) [@jbclements](https://racket.discourse.group/u/jbclements)\
**Post date:** [September 8, 2024, 7:38pm UTC](https://racket.discourse.group/t/migrate-packages-from-8-13-to-8-14-on-debian/3151/13 "2024-09-08T19:38:26Z")

</div>

Apologies if I'm missing something here, but I do believe that we changed from using `~/.racket` to using `~/.local/share/racket` some time ago; I wonder whether your problem is related to this? I can certainly imagine some more-recent piece of code assuming that the current user-local directory is the only place it needs to look. For instance, if raco pkg migrate saw that you had package `foo` installed but then couldn't find it in `~/.local/share/racket` and then decided it must ... be installed in the global location. This is pure guesswork on my part, almost certainly wrong in some details?

---

<div class="post-metadata">

**Author:** ![Cyrille](https://avatars.discourse-cdn.com/v4/letter/c/4491bb/32.png) [@Cyrille](https://racket.discourse.group/u/Cyrille)\
**Post date:** [September 8, 2024, 8:15pm UTC](https://racket.discourse.group/t/migrate-packages-from-8-13-to-8-14-on-debian/3151/14 "2024-09-08T20:15:34Z")

</div>

My installation is two or thrree years old so maybe at the time pkgs were in `~/.racket`. Nonetheless everything is ok now.  
Waiting for the next version !  
Thx
