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"
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.
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?
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.
Last I checked, raco pkg migrate only handles user-scope packages.
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
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:
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
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
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?
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