chocolatey-community / chocolatey-packages

Chocolatey Community Maintainers Team Packages - packages that are managed and maintained by core community team for community package repository (https://community.chocolatey.org/packages)
https://community.chocolatey.org/profiles/chocolatey-community
Apache License 2.0
448 stars 381 forks source link

(git.install) Installation fails #1378

Closed I-R closed 5 years ago

I-R commented 5 years ago

(git.install) Installation fails

Expected Behavior

Installation works without issues

Current Behavior

Installer script does not find Commandlets from chocolatey-core

ERROR: The term 'Get-AppInstallLocation' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. git.install can be automatically uninstalled.

Steps to Reproduce (for bugs)

choco install -y -v git.install

Context

Same is true for other packages (e.g. yed)

Your Environment

AdmiringWorm commented 5 years ago

Sounds like you have a rogue package library directory in the lib folder.

Look in the directory %ChocolateyInstall%\lib to see if there are any similarly named directories (only difference being that one have a version number, and another don't).

We you got any directories like that, try deleting the one with the version number (remember to back up the directory first, just in case), and then try installing git.install again. (I am actually assuming there is a directory called chocolatey-core.extension and chocolatey-core.extension.1.3.3, or something similar).

NOTE: The variable %ChocolateyInstall% is the install location of the chocolatey program, typically C:\ProgramData\Chocolatey.

I-R commented 5 years ago

Hey, thanks for that. I only had the folder chocolatey-core.extension.1.3.3. After moving that away, installation of yed and git worked!

Just to be save - i also see folders: PS C:\ProgramData\chocolatey\lib> ls .\chocolatey

Verzeichnis: C:\ProgramData\chocolatey\lib\chocolatey

Mode LastWriteTime Length Name


-a---- 21.10.2019 12:36 4067171 chocolatey.nupkg

PS C:\ProgramData\chocolatey\lib> ls .\chocolatey.0.10.15\

Verzeichnis: C:\ProgramData\chocolatey\lib\chocolatey.0.10.15

Mode LastWriteTime Length Name


d----- 21.10.2019 14:34 tools -a---- 21.10.2019 14:33 4067171 chocolatey.0.10.15.nupkg

is that correct?

rdscorreia74 commented 5 years ago

Hello, I am also experiencing similar issues. I have already uninstalled (removed choco's install folder) and reinstalled but it didn't help. Windows 7 Pro (Spanish ISO). Any help will be greatly appreciated.

C:\ProgramData\chocolatey>choco install git --force -y Chocolatey v0.10.15 Installing the following packages: git By installing you accept licenses for the packages. git v2.24.0 already installed. Forcing reinstall of version '2.24.0'. Please use upgrade if you meant to upgrade to a new version. Progress: Downloading git 2.24.0... 100%

chocolatey-core.extension v1.3.4 (forced) [Approved] chocolatey-core.extension package files install completed. Performing other installation steps. Installed/updated chocolatey-core extensions. The install of chocolatey-core.extension was successful. Software installed to 'C:\ProgramData\chocolatey\extensions\chocolatey-core'

git.install v2.24.0 (forced) [Approved] git.install package files install completed. Performing other installation steps. You must provide a value expression on the right-hand side of the '-' operator. The specified module 'C:\ProgramData\chocolatey\extensions\chocolatey-core\chocolatey-core.psm1' was not loaded because no valid module file was found in any module directory. Using Git LFS Installing 64-bit git.install... git.install has been installed. ERROR: The term 'Get-AppInstallLocation' is not recognized as the name of a cmdlet, function, script file, or operable p rogram. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. The install of git.install was NOT successful. Error while running 'C:\ProgramData\chocolatey\lib\git.install\tools\chocolateyInstall.ps1'. See log for details.

git v2.24.0 (forced) [Approved] git package files install completed. Performing other installation steps. The install of git was successful. Software install location not explicitly set, could be in package or default install location if installer.

Chocolatey installed 2/3 packages. 1 packages failed. See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures

I-R commented 5 years ago

Well, for me the suggested solution worked. I am no expert in that, i only did, what had been suggested and deleted the folder chocolatey-core.extension.1.3.3 and did a choco install -y git.

rdscorreia74 commented 5 years ago

Well, for me the suggested solution worked. I am no expert in that, i only did, what had been suggested and deleted the folder chocolatey-core.extension.1.3.3 and did a choco install -y git.

I see. Well, that didn't work for me. And I even went as further as completely removing chocolatey from my computer and that didn't work as well, hence why I decided to post here for help...

rdscorreia74 commented 5 years ago

I don't think our issues are related. So I decided to open a new issue and will take it from there.