Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cask fails to symlink/install to protected areas #21238

Closed
alexchandel opened this issue May 16, 2016 · 5 comments
Closed

Cask fails to symlink/install to protected areas #21238

alexchandel opened this issue May 16, 2016 · 5 comments

Comments

@alexchandel
Copy link
Contributor

Say I want to install things to the global domain instead of ~. A reasonable desire, given that homebrew-cask is global. homebrew-cask has no --rootdir=/ option for some reason, so I pass --appdir=/Applications --prefpanedir=/Library/PreferencePanes --qlplugindir=/Library/QuickLook --fontdir=/Library/Fonts --input_methoddir="/Library/Input Methods" --screen_saverdir="/Library/Screen Savers". If a cask with a QuickLook plugin is installed, cask then produces an error like

==> Downloading https://github.com/whomwah/qlstephen/releases/download/1.4.3/QLStephen.qlgenerator.1.4.3.zip
Already downloaded: /Library/Caches/Homebrew/qlstephen-1.4.3.zip
==> Verifying checksum for Cask qlstephen
==> Symlinking QuickLook Plugin 'QLStephen.qlgenerator' to '/Library/QuickLook/QLStephen.qlgenerator'
==> ln: /Library/QuickLook/QLStephen.qlgenerator: Permission denied
Error: Command failed to execute!

==> Failed command:
["/bin/ln", "-hfs", "--", "#<Pathname:/opt/homebrew-cask/Caskroom/qlstephen/1.4.3/QLStephen.qlgenerator>", "#<Pathname:/Library/QuickLook/QLStephen.qlgenerator>"]

==> Output of failed command:


==> Exit status of failed command:
#<Process::Status: pid 5868 exit 1>

This shouldn't happen.

@vitorgalvao
Copy link
Member

This is an atypical request, and low priority due to that. Like many other low priority issues that no other user cares for, this will be closed to make issue tracking tennable. It may be revisited in the future, but certainly not soon by the core team.

A PR may be looked at and discussed, but currently we’re slow on core maintainers to even look at those.

@alexchandel
Copy link
Contributor Author

@vitorgalvao Isn't this necessary to implement #13201 though? Since most of library probably (but not necessarily) requires sudo-ing?

@vitorgalvao
Copy link
Member

Not really. We will continue to avoid sudo whenever possible. #13201 says that the goal is to emulate regular manual installs. The recommended way to install QLPlugins and the like is under ~/Library, not /Library. Similarly, the recommended way to install apps is in /Applications, not ~/Applications.

We have seen many issues with apps requiring the use of ~/Applications, but few (if any) regarding the use of ~/Library. When the pater occurs, it’s usually a pkg anyway, and it takes care of it itself.

@alexchandel
Copy link
Contributor Author

alexchandel commented May 17, 2016

@vitorgalvao But I'd like to install casks for all users, just like I use homebrew to install CLT packages for all users. (also still studying 13966)

Won't the global state be confused for other users, when homebrew-cask begins moving instead of symlinking? Or will other users simply see the cask as not installed in any fashion?

@jawshooah
Copy link
Contributor

I'm not sure I understand why this is a problem with HBC. You want to install to a location that requires root access. We can't give you root access, so you must either chown the directory you wish to install to, or use sudo with cask.

@Homebrew Homebrew locked and limited conversation to collaborators May 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants