我想写一个brew公式,但看起来我的库在Mono的GAC中注册,需要sudo权限。这违反了酿酒理念,不反对。
有解决方法吗?
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
,作为安装点提到的目录由root用户
拥有➜ pwd
/Library/Frameworks/Mono.framework/Versions/3.0.1/lib
➜ ls -ld .
drwxr-xr-x 324 root admin 11016 Dec 1 17:41 .
答案 0 :(得分:1)
Mono允许您拥有multiple GAC folders - 通过这种方式,您可以保留每用户GAC(在某个文件夹中具有写入/执行权限)和系统范围的GAC。每当从GAC加载程序集时,它将首先搜索用户的GAC,然后在必要时回退到系统范围的GAC。