Problem to install package

HuaMin Chen
HuaMin Chen used Ask the Experts™
on
Dear,
Any help to this problem?
31h.png
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
Make sure that you have internet access and verify your package source.Capture.PNG-saige-
David FavorFractional CTO
Distinguished Expert 2018

Commented:
If you look closely at the error message you posted, you'll see that www.nugent.org could not be resolved.

You may have other problems to resolve + your question relates to a pure DNS issue.

I see...

imac> dig +short www.nugent.org a
64.99.80.121

Open in new window


So... one of two possibilities... Your internal caching DNS is flakey/glitchy (tech term for works sometimes, fails sometimes)...

Or... nugent.org DNS is flakey/glitchy...

A temp work around, is to add a record for nugent.org + www.nugent.org to your /etc/hosts file + finish your install + remove the /etc/hosts entry (because leaving a perpetual hard coded DNS entry is a very bad idea).
HuaMin ChenProblem resolver

Author

Commented:
Thanks to all.
David,
Sorry to that I've put this line

       64.99.80.121    www.nugent.org              # x client host

Open in new window

in hosts file (and then have rebooted the server), but I still get this error

PM> install-package MaxMind.MinFraud
Install-Package : The remote name could not be resolved: 'www.nuget.org'
At line:1 char:16
+ install-package <<<<  MaxMind.MinFraud
    + CategoryInfo          : NotSpecified: (:) [Install-Package], WebException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
 

Open in new window

Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

Top Expert 2016

Commented:
try from a browser to connect to www.nuget.org until you can do this add-package will not work.
HuaMin ChenProblem resolver

Author

Commented:
I have no problem to get into

https://www.nuget.org/

(on the server). But I am still getting this problem.
PM> install-package MaxMind.MinFraud
Install-Package : The remote name could not be resolved: 'www.nuget.org'
At line:1 char:16
+ install-package <<<<  MaxMind.MinFraud
    + CategoryInfo          : NotSpecified: (:) [Install-Package], WebException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
 
PM> 

Open in new window

Commented:
Did you verify your package source?

-saige-
HuaMin ChenProblem resolver

Author

Commented:
What to verify? How to resolve the current error?
David FavorFractional CTO
Distinguished Expert 2018

Commented:
Verify your DNS resolution is working, so us dig/nslookup to verify your DNS is working, ping the site to ensure packets are flowing (which might fail if site blocks ICMP traffic), then visit via browser, as David Johnson suggested.

Tip: Always imagine everything is broken + start debugging at the lowest common denominator.
HuaMin ChenProblem resolver

Author

Commented:
I get the below, on the server
C:\Users\Administrator>ping www.nugent.org

Pinging www.nugent.org [64.99.80.121] with 32 bytes of data:
Reply from 64.99.80.121: bytes=32 time=255ms TTL=241
Reply from 64.99.80.121: bytes=32 time=255ms TTL=241
Reply from 64.99.80.121: bytes=32 time=255ms TTL=241
Reply from 64.99.80.121: bytes=32 time=255ms TTL=241

Ping statistics for 64.99.80.121:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 255ms, Maximum = 255ms, Average = 255ms

Open in new window

Top Expert 2016

Commented:
Which version of visual studio are you using?
You may have to update nuget client from tools updates
Each package is licensed to you by its owner. NuGet is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.

Package Manager Console Host Version 4.7.0.5212

Type 'get-help NuGet' to see all available NuGet commands.

PM> install-package maxmind.minfraud


Attempting to gather dependency information for package 'maxmind.minfraud.2.0.0' with respect to project 'ee29114555', targeting '.NETFramework,Version=v4.6.1'
Gathering dependency information took 2.68 sec
Attempting to resolve dependencies for package 'maxmind.minfraud.2.0.0' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'maxmind.minfraud.2.0.0'
Resolved actions to install package 'maxmind.minfraud.2.0.0'
Retrieving package 'MaxMind.Db 2.4.0' from 'nuget.org'.
Retrieving package 'MaxMind.GeoIP2 3.0.0' from 'nuget.org'.
Retrieving package 'MaxMind.MinFraud 2.0.0' from 'nuget.org'.
Retrieving package 'Microsoft.CSharp 4.4.1' from 'nuget.org'.
Retrieving package 'Newtonsoft.Json 11.0.2' from 'nuget.org'.
Retrieving package 'System.ComponentModel.Annotations 4.4.1' from 'nuget.org'.
  GET 

Open in new window

HuaMin ChenProblem resolver

Author

Commented:
I'm using VS 2013 and here is what I've got

PM> install-package MaxMind.MinFraud
Install-Package : The remote name could not be resolved: 'www.nuget.org'
At line:1 char:16
+ install-package <<<<  MaxMind.MinFraud
    + CategoryInfo          : NotSpecified: (:) [Install-Package], WebException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
 
PM> install-package maxmind.minfraud
Install-Package : Object reference not set to an instance of an object.
At line:1 char:16
+ install-package <<<<  maxmind.minfraud
    + CategoryInfo          : NotSpecified: (:) [Install-Package], NullReferenceException
    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand
 
PM> 

Open in new window

Commented:
In VS 2013, to verify the package source.

Go to TOOLS -> NuGet Package Manager -> Package Manager Settings:Capture.PNGIn the Options dialog, select Package Sources and verify that your nuget.org package source matches one of the two following urls:

V2 - https://www.nuget.org/api/v2/
V3 - https://api.nuget.org/v3/index.json

NOTE - Note that the V2 API is deprecated and does not work with NuGet 4+.

https://docs.microsoft.com/en-us/nuget/policies/nuget-faq#nugetorg-not-accessible

-saige-
Top Expert 2016

Commented:
since v2 is no longer functional.. is there a solid reason why you are not using visual studio 2017?  (community edition is free)
HuaMin ChenProblem resolver

Author

Commented:
Saige,
What to adjust, due to the below problem (it does keep waiting)?
31j.pngDavid,
I want to resolve problem in VS 2013.
Commented:
From that screen click on Settings.  The screen you want to access looks like this:Capture.PNGYou want to click the plus button to add a new source:Capture.PNGType in a unique name, change the source and then Select 'Update' and then 'OK':Capture.PNGThis is also dependent on the version of Nuget you have installed.  To validate that go to 'TOOLS' -> 'Extensions and Updates...':Capture.PNGInside the 'Search Installed (Ctrl+E)' text box, type nuget:Capture.PNGHighlight 'NuGet Package Manager for Visual Studio 2013':Capture.PNG
-saige-

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial