darling icon indicating copy to clipboard operation
darling copied to clipboard

Homebrew installation failed: Permission denied

Open acheong08 opened this issue 3 years ago • 3 comments

Downloading packages...
Downloading CLTools_macOS_SDK_Remove_1012.pkg...
Installing...
installer: Installing package com.apple.pkg.CLTools_SDK_OSX1012 version 9.2.0.0.1.1510905681 (94 KB)
installer: Extracting files
installer: Installation complete
Downloading CLTools_Executables.pkg...
Installing...
installer: Installing package com.apple.pkg.CLTools_Executables version 9.2.0.0.1.1510905681 (597942 KB)
installer: Extracting files
makewhatis: //usr/share/man//man7/mdoc.7: No such file or directory
makewhatis: //usr/share/man//man1/less.1: No such file or directory
makewhatis: //usr/share/man//man1/lessecho.1: No such file or directory
makewhatis: //usr/share/man//man1/more.1: No such file or directory
makewhatis: //usr/share/man//man1/post-grohtml.1: No such file or directory
makewhatis: //usr/share/man//man1/pre-grohtml.1: No such file or directory
makewhatis: ///usr/share/man//man7/mdoc.7: No such file or directory
makewhatis: ///usr/share/man//man1/less.1: No such file or directory
makewhatis: ///usr/share/man//man1/lessecho.1: No such file or directory
makewhatis: ///usr/share/man//man1/more.1: No such file or directory
makewhatis: ///usr/share/man//man1/post-grohtml.1: No such file or directory
makewhatis: ///usr/share/man//man1/pre-grohtml.1: No such file or directory
makewhatis: ///usr/share/man//whatis: Not a directory
makewhatis: ///Library/Developer/CommandLineTools/usr/share/man//whatis: Not a directory
installer: Installation complete
Downloading DevSDK_OSX1012.pkg...
Installing...
installer: Installing package com.apple.pkg.DevSDK_OSX1012 version 9.2.0.0.1.1510905681 (261534 KB)
installer: Extracting files
Cannot create symlink /./System/Library/Frameworks/Automator.framework/Headers: Permission denied
Installation failed with exit code 1
Failed during: /usr/bin/sudo /usr/bin/xcode-select --install

System Information OS: Ubuntu 22.04 LTS x86_64 Host: MacBookPro15,2 1.0 Kernel: 5.17.4-t2 CPU: Intel i5-8279U (8) @ 4.100GHz GPU: Intel CoffeeLake-U GT3e [Iris Plus Graphics 655] Memory: 3942MiB / 7801MiB

Software Version
Linux Kernel 5.17.4-t2
Darling cef3a6a06
(Using darlingserver branch)

acheong08 avatar May 02 '22 14:05 acheong08

Running the install command again allows it to proceed with the following warnings:

git: error: unable to read SDK settings for '/Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk'
git: error: SDK "macosx" cannot be located
git: error: unable to read SDK settings for '/Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk'
git: error: SDK "macosx" cannot be located
git: error: unable to read SDK settings for '/Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk'
git: error: SDK "macosx" cannot be located
git: error: unable to read SDK settings for '/Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk'
git: error: SDK "macosx" cannot be located
git: error: unable to read SDK settings for '/Library/Developer/CommandLineTools/SDKs/MacOSX10.13.sdk'
git: error: SDK "macosx" cannot be located

acheong08 avatar May 02 '22 14:05 acheong08

I do not know if the following is related, but I fail to install homebrew with the following error:

mkdir: /Users/mloeper/Library/Caches/Homebrew: Permission denied
Failed during: /usr/bin/sudo /bin/mkdir -p /Users/mloeper/Library/Caches/Homebrew

It looks like /Users/mloeper/Library is totally unwritable from inside darling shell. Even using sudo. Has anyone an idea?

MartinLoeper avatar Nov 02 '23 00:11 MartinLoeper

This is a known bug that's difficult to reproduce: sometimes the prefix will be created with incorrect permissions, leading to errors when trying to modify it. You can try shutting down Darling (darling shutdown), deleting the prefix (rm -rf ~/.darling), and then running Darling again to recreate the prefix.

facekapow avatar Nov 02 '23 01:11 facekapow