Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when installing Chocolatey package from local source

Tags:

chocolatey

I'm attempting to upgrade the 1password Chocolatey package to point to the latest version. Here are the steps I took:

  1. I downloaded the package from http://chocolatey.org/packages/1password.

  2. I opened the package in NuGet Package Explorer.

  3. I changed the download location to the new URL.

  4. I incremented the version number in the package metadata.

After doing this, I attempted to run locally with the following command:

cinst 1password -source C:\Workspace\1password.4.0.1.503.nupkg

This results in the following error:

Unable to find package '1password'.

Command 'install' failed (sometimes this indicates a partial failure). Additiona l info/packages: 1password

Here's a link to the nupkg file: https://www.dropbox.com/s/b8y0wfrv6y1ayej/1password.4.0.1.503.nupkg?dl=0

What am I doing wrong?

like image 729
Mike Cole Avatar asked Sep 26 '14 02:09

Mike Cole


People also ask

How do I install Chocolatey without Internet?

Internalized Packages - Best The best thing you can do here is a process called internalizing, where you download and extract the package, download all of the resources and embed them in the package (or put them somewhere local), edit the scripts to use those embedded/local resources and recompile the package.

How do I install Chocolatey without admin rights?

In order to allow non-administrator end users to install Chocolatey software, we first need to install and configure the Chocolatey agent service. By default, the Chocolatey service will create a local administrator user with a random 32 character password and run the service under that account.


1 Answers

What you are describing should work. I have just tried with Chocolatey 0.9.8.27, and it did indeed work. This is what I have done:

  1. Download your nupkg into my Downloads folder.
  2. Execute the following command (NOTE: cinst is the same as choco install)

    choco install 1password -source C:\Users\gep13\Downloads

  3. And Chocolatey successfully installed 1password version 4.0.1.503.

The only reason that I can think that your command wouldn't work is that the nupkg wouldn't exist in the C:\Workspace folder. Can you confirm that this is indeed where you have placed the nupkg package?

NOTE: The source argument needs to point to the folder that the *.nupkg reside in, NOT to the *.nupkg itself. It takes a directory as NuGet (the underlying mechanism that Chocolatey uses) can figure out what it the latest version of a package available in that directory. If you want to install a specific version of a *.nupkg from the source directory, you would then do something like:

choco install MyPackage -source c:\MyDirectory -version 1.2.3.4
like image 167
Gary Ewan Park Avatar answered Sep 18 '22 10:09

Gary Ewan Park