PS C:\Users\redacted> scoop install git
7zip is required to install this app. please run 'scoop install 7zip'
PS C:\Users\redacted> scoop install 7zip
installing 7zip (9.20)
downloading http://downloads.sourceforge.net/project/sevenzip/7-Zip/9.20/7z920-x64.msi...done
checking hash...ok
the MSI package is already installed on this system
PS C:\Users\redacted> scoop install git
7zip is required to install this app. please run 'scoop install 7zip'
PS C:\Users\redacted>
Would you know why this happens? Can't exactly use scoop without it knowing about it 7zip.
I have a better fix coming for this soon, but in the meantime you can probably get around it by adding the directory where you installed 7z.exe to your path. Scoop will let you install git if it can find 7z with gcm 7z.
Just chiming in to say that yes, adding the directory to the path and restarting powershell fixed the issue for me.
Adding the dir to path didn't fix it for me, uninstalling 7zip and reinstalling through scoop did though.
I also had to uninstall 7zip first, then 'scoop install 7zip' worked fine.
I'm going to grab a copy of the registry shell extensions to merge back into the registry for explorer support, how this can get deployed as part of the package I'm not sure yet.
I had the same problem and my workaround is this.
I created the following empty folders under the SCOOP_DIRapps7zip9.20 (where SCOOP_DIR is either the Appdata or the ProgramData folder, depends whether you want to "install" globally or not). Then I created the files 7z.cmd and 7z.ps1 under the SCOOP_DIRshims folder containing the following lines
7z.cmd
:: ensure $HOME is set for MSYS programs
@if "%home%"=="" set home=%homedrive%%homepath%\
@if "%home%"=="\" set home=%allusersprofile%\
@"C:\Program Files\7-Zip\7z.exe" %*
7z.ps1
# ensure $HOME is set for MSYS programs
if(!$env:home) { $env:home = "$home\" }
if($env:home -eq "\") { $env:home = $env:allusersprofile }
$path = 'C:\Program Files\7-Zip\7z.exe'
if($myinvocation.expectingInput) { $input | & $path @args } else { & $path @args }
So i was thinking, if it is possible to be able to add existing apps to scoop (actually a way of only setting up the right shim file).
I had the same issue after running the following command (as seen in the README)
sudo scoop install 7zip git openssh --global
What fixed it for me was
sudo scoop uninstall git -g # Select yes on the pop-up prompt
sudo scoop uninstall 7zip -g # Select yes on the pop-up prompt
scoop install 7zip git # As seen in the introduction video
Thanks for all these clever work-arounds! I'll get this working better as soon as I can.
This should be fixed now if you run scoop update;scoop install 7zip.
The 7-zip files are just extracted from the .msi instead of actually executing the install, so there won't be conflicts if you wish to fully install 7-zip separately (e.g. if you want the Windows explorer integrations provided by the installer).
Thanks! Clever solution.
@lukesampson Is there a way to install 7-zip using scoop that does execute the MSI and specify that they want the explorer integrations? Even if I have to make my own bucket to do that, is there a way it can be done?
Here's what I did to install 7zip via scoop and also keep the shell integrations.
First, remove any versions of 7zip installed externally (i.e outside scoop by manually downloading or whatever)
Now your shell context menu for 7zip and CRC SHA should be gone.
After that, go to your start menu and search for 7zip (it should show you the version installed by scoop)
OR manually go to Start Menu -> All apllications -> Scoop Apps -> 7zip
OR go to your scoop install folder. By default: ~/scoop/apps/7zip/current/7zFM.exe
Run it as administrator
Go to Tools -> Options -> 7zip and enable the shell integration
I had the same problem and my workaround is this.
I created the following empty folders under the SCOOP_DIRapps7zip9.20 (where SCOOP_DIR is either the Appdata or the ProgramData folder, depends whether you want to "install" globally or not). Then I created the files 7z.cmd and 7z.ps1 under the SCOOP_DIRshims folder containing the following lines7z.cmd
:: ensure $HOME is set for MSYS programs @if "%home%"=="" set home=%homedrive%%homepath%\ @if "%home%"=="\" set home=%allusersprofile%\ @"C:\Program Files\7-Zip\7z.exe" %*7z.ps1
# ensure $HOME is set for MSYS programs if(!$env:home) { $env:home = "$home\" } if($env:home -eq "\") { $env:home = $env:allusersprofile } $path = 'C:\Program Files\7-Zip\7z.exe' if($myinvocation.expectingInput) { $input | & $path @args } else { & $path @args }So i was thinking, if it is possible to be able to add existing apps to scoop (actually a way of only setting up the right shim file).
I tried this and not succeed. I dont have admin rights to uninistall the prevously installed one.
Finally, edited the install.ps1 and commented / conditioned to make it work. thanks for your idea.
Most helpful comment
Here's what I did to install 7zip via scoop and also keep the shell integrations.
First, remove any versions of 7zip installed externally (i.e outside scoop by manually downloading or whatever)
Now your shell context menu for 7zip and CRC SHA should be gone.
After that, go to your start menu and search for 7zip (it should show you the version installed by scoop)
OR manually go to Start Menu -> All apllications -> Scoop Apps -> 7zip
OR go to your scoop install folder. By default: ~/scoop/apps/7zip/current/7zFM.exe
Run it as administrator
Go to Tools -> Options -> 7zip and enable the shell integration