3

我想编写一个 brew 公式,但它看起来像我在 Mono 的 GAC 中注册的库需要 sudo 权限。这与不 sudoing 的 brew 想法背道而驰。

有解决办法吗?

gacutil -i /private/tmp/fsharp-qdRr/fsharp-3.0.24/lib/release/4.0/FSharp.Core.dll -root /Library/Frameworks/Mono.framework/Versions/3.0.1/lib/ -package 4.0
gacutil -i /private/tmp/fsharp-qdRr/fsharp-3.0.24/lib/release/2.1/FSharp.Core.dll -root /Library/Frameworks/Mono.framework/Versions/3.0.1/lib/ -package 2.1
gacutil -i /private/tmp/fsharp-qdRr/fsharp-3.0.24/lib/release/2.0/FSharp.Core.dll -root /Library/Frameworks/Mono.framework/Versions/3.0.1/lib/ -package 2.0
Failure adding assembly /private/tmp/fsharp-qdRr/fsharp-3.0.24/lib/release/2.0/FSharp.Core.dll to the cache: gac directories could not be created, possibly permission issues.
Failure adding assembly /private/tmp/fsharp-qdRr/fsharp-3.0.24/lib/release/4.0/FSharp.Core.dll to the cache: gac directories could not be created, possibly permission issues.
Failure adding assembly /private/tmp/fsharp-qdRr/fsharp-3.0.24/lib/release/2.1/FSharp.Core.dll to the cache: gac directories could not be created, possibly permission issues.make[2]: *** [install-lib-4] Error 1

并且作为安装点提到的目录归根用户所有

➜   pwd
/Library/Frameworks/Mono.framework/Versions/3.0.1/lib
➜   ls -ld .
drwxr-xr-x  324 root  admin  11016 Dec  1 17:41 .
4

1 回答 1

2

Mono 允许您拥有多个 GAC 文件夹——这样您可以保留每个用户的 GAC(在您具有写入/执行权限的某些文件夹中)和系统范围的 GAC。每当从 GAC 加载程序集时,它将首先搜索用户的 GAC,然后在必要时回退到系统范围的 GAC。

于 2012-12-01T20:56:57.780 回答