We help IT Professionals succeed at work.

Problem to install package

362 Views
Last Modified: 2018-08-28
Dear,
Any help to this problem?
31h.png
Comment
Watch Question

it_saigeDeveloper
CERTIFIED EXPERT
Distinguished Expert 2019

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

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).
Peter ChanProblem 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

David Johnson, CDSimple Geek from the '70s
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
try from a browser to connect to www.nuget.org until you can do this add-package will not work.
Peter ChanProblem 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

it_saigeDeveloper
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
Did you verify your package source?

-saige-
Peter ChanProblem resolver

Author

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

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.
Peter ChanProblem 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

David Johnson, CDSimple Geek from the '70s
CERTIFIED EXPERT
Distinguished Expert 2019

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

Peter ChanProblem 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

it_saigeDeveloper
CERTIFIED EXPERT
Distinguished Expert 2019

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-
David Johnson, CDSimple Geek from the '70s
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
since v2 is no longer functional.. is there a solid reason why you are not using visual studio 2017?  (community edition is free)
Peter ChanProblem 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.
Developer
CERTIFIED EXPERT
Distinguished Expert 2019
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION