Permission error when performing a user-local install
I was installing BreezeWiki from source (commit 6afb01d3ee9ea8c7f52648d1ad7335d7841d24f8), following these instructions: https://docs.breezewiki.com/Running.html When I ran `raco req -d` to install the Racket package dependencies of BreezeWiki, I got this error: ``` make-directory: cannot make directory path: /usr/share/racket/pkgs/rackunit-gui/rackunit/private/gui/compiled system error: Permission denied; errno=13 ``` <details> <summary>Complete log</summary> ``` $ raco req -d ✓ net-cookies-lib already installed in "/usr/share/racket/pkgs/net-cookies-lib". ✓ rackunit-lib already installed in "/usr/share/racket/pkgs/rackunit-lib". ✓ web-server-lib already installed in "/usr/share/racket/pkgs/web-server-lib". ✓ sequence-tools-lib already installed in "/usr/share/racket/pkgs/sequence-tools-lib". ✓ db already installed in "/usr/share/racket/pkgs/db". ◐ Installing remote package: "html-writing"... ◐ Installing remote package: "json-pointer"... ◐ Installing remote package: "typed-ini-lib"... ◐ Installing remote package: "memo"... ◐ Installing remote package: "html-parsing"... ◐ Installing remote package: "http-easy-lib"... Resolving "html-writing" via https://download.racket-lang.org/releases/9.1/catalog/ Resolving "html-writing" via https://pkgs.racket-lang.org Using cached17626309511762630951022 for https://www.neilvandyke.org/racket/html-writing.zip 00: Resolving "mcfly" via https://download.racket-lang.org/releases/9.1/catalog/ 00: Resolving "mcfly" via https://pkgs.racket-lang.org Resolving "overeasy" via https://download.racket-lang.org/releases/9.1/catalog/ Resolving "overeasy" via https://pkgs.racket-lang.org Downloading https://www.neilvandyke.org/racket/mcfly--2-2.zip Downloading https://www.neilvandyke.org/racket/overeasy--4-3.zip The following uninstalled packages were listed as dependencies and they were automatically installed: dependencies of html-writing: mcfly overeasy Resolving "json-pointer" via https://download.racket-lang.org/releases/9.1/catalog/ Resolving "json-pointer" via https://pkgs.racket-lang.org Using cached17626309531762630953747 for https://github.com/jessealama/json-pointer.git Resolving "ejs" via https://download.racket-lang.org/releases/9.1/catalog/ Resolving "ejs" via https://pkgs.racket-lang.org Using cached17626309551762630955016 for https://github.com/jessealama/ejs.git The following uninstalled packages were listed as dependencies and they were automatically installed: dependencies of json-pointer: ejs Resolving "typed-ini-lib" via https://download.racket-lang.org/releases/9.1/catalog/ Resolving "typed-ini-lib" via https://pkgs.racket-lang.org Using cached17626309561762630956490 for https://gitlab.com/xgqt/racket-ini.git?path=src%2Ftyped-ini-lib Resolving "ini-lib" via https://download.racket-lang.org/releases/9.1/catalog/ Resolving "ini-lib" via https://pkgs.racket-lang.org Using cached17626309561762630956490 for https://gitlab.com/xgqt/racket-ini.git?path=src%2Fini-lib The following uninstalled packages were listed as dependencies and they were automatically installed: dependencies of typed-ini-lib: ini-lib Resolving "memo" via https://download.racket-lang.org/releases/9.1/catalog/ Resolving "memo" via https://pkgs.racket-lang.org Using cached17626309581762630958250 for https://github.com/BourgondAries/memo.git 00: Resolving "finalizer" via https://download.racket-lang.org/releases/9.1/catalog/ 01: Resolving "nested-hash" via https://download.racket-lang.org/releases/9.1/catalog/ 01: Resolving "nested-hash" via https://pkgs.racket-lang.org 00: Resolving "finalizer" via https://pkgs.racket-lang.org Resolving "thread-utils" via https://download.racket-lang.org/releases/9.1/catalog/ Resolving "thread-utils" via https://pkgs.racket-lang.org Using cached17626309591762630959800 for git://github.com/Kalimehtar/finalizer Using cached17626309601762630960294 for https://github.com/BourgondAries/nested-hash.git Using cached17626309601762630960774 for https://github.com/Kalimehtar/thread-utils.git The following uninstalled packages were listed as dependencies and they were automatically installed: dependencies of memo: finalizer nested-hash thread-utils Resolving "html-parsing" via https://download.racket-lang.org/releases/9.1/catalog/ Resolving "html-parsing" via https://pkgs.racket-lang.org Downloading https://www.neilvandyke.org/racket/html-parsing--11-0.zip Resolving "http-easy-lib" via https://download.racket-lang.org/releases/9.1/catalog/ Resolving "http-easy-lib" via https://pkgs.racket-lang.org Using cached17719055361771905536346 for https://github.com/Bogdanp/racket-http-easy.git?path=http-easy-lib Resolving "resource-pool-lib" via https://download.racket-lang.org/releases/9.1/catalog/ Resolving "resource-pool-lib" via https://pkgs.racket-lang.org Using cached17626309631762630963968 for https://github.com/Bogdanp/racket-resource-pool.git?path=resource-pool-lib Resolving "actor-lib" via https://download.racket-lang.org/releases/9.1/catalog/ Resolving "actor-lib" via https://pkgs.racket-lang.org Downloading repository https://github.com/Bogdanp/racket-actor.git?path=actor-lib commit 0d46e1f039bbc22372171a077884f28ccd283c93 The following uninstalled packages were listed as dependencies and they were automatically installed: dependencies of http-easy-lib: resource-pool-lib dependencies of resource-pool-lib: actor-lib ◐ Setup for package "html-writing"... ◐ Setup for package "json-pointer"... ◐ Setup for package "typed-ini-lib"... make-directory: cannot make directory path: /usr/share/racket/pkgs/rackunit-gui/rackunit/private/gui/compiled system error: Permission denied; errno=13 context...: /usr/share/racket/collects/compiler/private/cm-minimal.rkt:717:0: compile-zo* /usr/share/racket/collects/compiler/private/cm-minimal.rkt:647:0: compile-zo*/cross-compile /usr/share/racket/collects/compiler/private/cm-minimal.rkt:461:15 /usr/share/racket/collects/compiler/private/cm-minimal.rkt:447:12: build /usr/share/racket/collects/compiler/private/cm-minimal.rkt:418:0: maybe-compile-zo /usr/share/racket/collects/compiler/private/cm-minimal.rkt:221:0: compile-root /usr/share/racket/collects/compiler/private/cm-minimal.rkt:329:16 /usr/share/racket/collects/compiler/private/cm-util.rkt:14:0: ormap-strict [repeats 10 more times] /usr/share/racket/collects/compiler/private/cm-minimal.rkt:221:0: compile-root /usr/share/racket/collects/compiler/private/cm-minimal.rkt:329:16 /usr/share/racket/collects/compiler/private/cm-util.rkt:14:0: ormap-strict [repeats 8 more times] /usr/share/racket/collects/compiler/private/cm-minimal.rkt:221:0: compile-root /usr/share/racket/collects/compiler/private/cm-minimal.rkt:329:16 /usr/share/racket/collects/compiler/private/cm-util.rkt:14:0: ormap-strict ... user break context...: /usr/share/racket/collects/setup/parallel-build.rkt:129:4: work-done method in collects-queue% /usr/share/racket/collects/setup/parallel-do.rkt:292:17 /usr/share/racket/collects/setup/parallel-do.rkt:246:4 /usr/share/racket/collects/setup/parallel-build.rkt:450:0: parallel-compile /usr/share/racket/collects/setup/setup-core.rkt:1205:10 /usr/share/racket/collects/setup/setup.rkt:80:3 .../private/lock.rkt:63:21 /usr/share/racket/collects/racket/file.rkt:763:8 /usr/share/racket/collects/racket/file.rkt:752:0: call-with-file-lock body of "/home/admin/.local/share/racket/9.1/pkgs/req-lib/req/raco-commands/raco-req.rkt" /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" ``` </details> Note that I'm not running `raco req` with sudo, and I'm not expecting it to try to write anything to a system-owned directory. However, the error message suggests that it is indeed trying to write files to a system-owned directory, which confuses me. The logs don't really make it clear which package, if any, is at fault. But the stack trace does not seem to point into any specific package, hence my starting at the raco-req issue tracker. Feel free to let me know if I am in the wrong place. If I run the command again, it doesn't print the error, which is doubly confusing, but does make it clear which packages are pre-installed system-globally (from the Racket Ubuntu PPA) and which ones have been installed user-locally: ``` $ raco req -d ✓ html-writing already installed in "/home/admin/.local/share/racket/9.1/pkgs/html-writing". ✓ json-pointer already installed in "/home/admin/.local/share/racket/9.1/pkgs/json-pointer". ✓ net-cookies-lib already installed in "/usr/share/racket/pkgs/net-cookies-lib". ✓ typed-ini-lib already installed in "/home/admin/.local/share/racket/9.1/pkgs/typed-ini-lib". ✓ rackunit-lib already installed in "/usr/share/racket/pkgs/rackunit-lib". ✓ web-server-lib already installed in "/usr/share/racket/pkgs/web-server-lib". ✓ memo already installed in "/home/admin/.local/share/racket/9.1/pkgs/memo". ✓ sequence-tools-lib already installed in "/usr/share/racket/pkgs/sequence-tools-lib". ✓ db already installed in "/usr/share/racket/pkgs/db". ✓ html-parsing already installed in "/home/admin/.local/share/racket/9.1/pkgs/html-parsing". ✓ http-easy-lib already installed in "/home/admin/.local/share/racket/9.1/pkgs/http-easy-lib". ``` I had completely deleted `~/.local/share/racket` prior to running this install command, so there was not any state left over from previously.
issue