2012-12-01 29 views
2

我想寫一個釀造公式,但它看起來像我的圖書館,它在Mono的GAC中註冊,需要sudo權限。這違背了釀酒的想法。如果安裝需要sudo,如何編寫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 

和安裝點中提到的目錄由root用戶

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

回答

1

單聲道可以讓你有multiple GAC folders資 - 這樣你可以保持每個用戶的GAC(在某些文件夾你有寫/執行權限)和全系統的GAC。無論何時從GAC加載程序集,它都會先搜索用戶的GAC,然後根據需要返回到系統範圍的GAC。

+0

聽起來不錯。我錯過了那部分。謝謝 – nicolas