单声道/NuGet "找不到版本"



让mono/nuget正常工作,我无法在CentOS 6.4 w/mono上实现。

bash-4.1$ mono buildsupport/NuGet.exe install src/OurApp/packages.config -OutputDirectory src/packages
p1%{8}%<%t33%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;3%;mWARNING: libMonoPosixHelper.so
p1%{8}%<%t37%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;7%;mp1%{8}%<%t31%e%p1%{16}%<%t9%p1    {8}%-%d%e38;5;1%;m
Unable to find version '2.0.2' of package 'EventStore.Client'.

packages.config:

<?xml version="1.0" encoding="utf-8"?>
<packages>
  <package id="EventStore.Client" version="2.0.2" targetFramework="net45" />
  <package id="NodaTime" version="1.1.1" targetFramework="net45" />
</packages>

你是怎么做到的?

附录信息:

-bash-4.1$ mono --version
Mono JIT compiler version 3.2.3 (tarball Mon Sep 30 10:21:16 UTC 2013)
Copyright (C) 2002-2012 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
    TLS:           __thread
    SIGSEGV:       altstack
    Notifications: epoll
    Architecture:  amd64
    Disabled:      none
    Misc:          softdebug 
    LLVM:          supported, not enabled.
    GC:            sgen

我还导入了证书:

  Exec {
    user    => 'root',
    path    => '/usr/bin:/bin',
    require => [
      Anchor['mono::start'],
      Package['mono']
    ],
    before  => Anchor['mono::end'],
  }
  # http://www.mono-project.com/FAQ:_Security
  exec {
    'yes | certmgr -ssl -m https://nuget.org && touch /etc/.certs-nuget.org':
      creates => '/etc/.certs-nuget.org';
    'yes | certmgr -ssl -m https://packages.nuget.org/v1/FeedService.svc/ && touch /etc/.certs-packages.nuget.org':
      creates => '/etc/.certs-packages.nuget.org';
    'yes | certmgr -ssl -m https://go.microsoft.com && touch /etc/.certs-go.microsoft.com':
      creates => '/etc/.certs-go.microsoft.com';
    'yes | certmgr -ssl -m https://nugetgallery.blob.core.windows.net && touch /etc/.certs-nugetgallery.blob.core.windows.net':
      creates => '/etc/.certs-nugetgallery.blob.core.windows.net';
  }

关于NuGet.exe文件

-bash-4.1$ mono buildsupport/NuGet.exe 
NuGet Version: 2.7.41115.310
usage: NuGet <command> [args] [options] 
Type 'NuGet help <command>' for help on a specific command.
Available commands:
[snip]

~/.config/NuGet/NuGet.config

<configuration>
  <packageSources>
      <add key="https://nuget.org/api/v2/" value="https://nuget.org/api/v2/" />
      <add key="https://www.nuget.org/api/v2/" value="https://www.nuget.org/api/v2/" />
  </packageSources>
  <disabledPackageSources>
      <add key="https://www.nuget.org/api/v2/" value="true" />
  </disabledPackageSources>
</configuration>

我运行过:

# mozroots --import --sync
$ mozroots --import --sync
# mozroots --import --sync --machine

现在不知所措。非常感谢您的帮助。


编辑2:

另一次尝试显式"-源nuget":

-bash-4.1$ mono buildsupport/NuGet.exe install src/OurApp/packages.config -Source nuget
p1%{8}%<%t31%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;1%;mlibMonoPosixHelper.so
p1%{8}%<%t37%e%p1%{16}%<%t9%p1%{8}%-%d%e38;5;7%;m-bash-4.1$ echo $?
1

带配置:

<packageSources>
  <add key="nuget" value="http://nuget.org/api/v2/" />

编辑3:

在玩的时候,我像建议的那样运行tcpdump:

[root@tc ~]# tcpdump -c 10000 -s 0 -i eth0 -A tcp port http
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
19:28:08.560782 IP 10.0.2.15.33636 > 65.52.233.252.http: Flags [S], seq 832564500, win 14600, options [mss 1460,sackOK,TS val 44192757 ecr 0,nop,wscale 5], length 0
E..<..@.@.D.
...A4...d.P1.........9............
..S.........
19:28:08.682894 IP 65.52.233.252.http > 10.0.2.15.33636: Flags [S.], seq 1247496705, ack 832564501, win 65535, options [mss 1460], length 0
E..,[...@...A4..
....P.dJ[J.1...`...*.........
19:28:08.682933 IP 10.0.2.15.33636 > 65.52.233.252.http: Flags [.], ack 1, win 14600, length 0
E..(..@.@.D.
...A4...d.P1...J[J.P.9.....
19:28:08.689440 IP 10.0.2.15.33636 > 65.52.233.252.http: Flags [P.], seq 1:94, ack 1, win 14600, length 93
E.....@.@.DP
...A4...d.P1...J[J.P.9.7...GET /api/v2/ HTTP/1.0
User-Agent: NuGet/2.7.41115.310 (Unix 2.6.32.358)
Host: nuget.org

19:28:08.689633 IP 65.52.233.252.http > 10.0.2.15.33636: Flags [.], ack 94, win 65535, length 0
E..([...@...A4..
....P.dJ[J.1..rP...Aq........
19:28:08.812013 IP 65.52.233.252.http > 10.0.2.15.33636: Flags [P.], seq 1:545, ack 94, win 65535, length 544
E..H[...@...A4..
....P.dJ[J.1..rP.......HTTP/1.1 301 Moved Permanently
Content-Type: text/html; charset=UTF-8
Location: http://www.nuget.org/api/v2/
Server: Microsoft-IIS/8.0
X-Powered-By: ASP.NET
X-Frame-Options: deny
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Strict-Transport-Security: maxage=31536000; includeSubDomains
Date: Tue, 26 Nov 2013 19:28:08 GMT
Connection: close
Content-Length: 151
<head><title>Document Moved</title></head>
<body><h1>Object Moved</h1>This document may be found <a HREF="http://www.nuget.org/api/v2/">here</a></body>
19:28:08.812063 IP 10.0.2.15.33636 > 65.52.233.252.http: Flags [.], ack 545, win 15232, length 0
E..(..@.@.D.
...A4...d.P1..rJ[L"P.;.....
19:28:08.812132 IP 65.52.233.252.http > 10.0.2.15.33636: Flags [F.], seq 545, ack 94, win 65535, length 0
E..([...@...A4..
....P.dJ[L"1..rP...?P........
19:28:08.818738 IP 10.0.2.15.33636 > 65.52.233.252.http: Flags [F.], seq 94, ack 546, win 15232, length 0
E..(..@.@.D.
...A4...d.P1..rJ[L#P.;.....
19:28:08.818996 IP 65.52.233.252.http > 10.0.2.15.33636: Flags [.], ack 95, win 65535, length 0
E..([...@...A4..
....P.dJ[L#1..sP...?O........
19:28:08.828885 IP 10.0.2.15.33637 > 65.52.233.252.http: Flags [S], seq 1326131624, win 14600, options [mss 1460,sackOK,TS val 44193026 ecr 0,nop,wscale 5], length 0
E..<|.@.@...
...A4...e.PO.).......9............
..U.........
19:28:08.956672 IP 65.52.233.252.http > 10.0.2.15.33637: Flags [S.], seq 1247560705, ack 1326131625, win 65535, options [mss 1460], length 0
E..,[...@...A4..
....P.eJD.O.).`.............
19:28:08.956727 IP 10.0.2.15.33637 > 65.52.233.252.http: Flags [.], ack 1, win 14600, length 0
E..(|.@.@...
...A4...e.PO.).JD.P.9.....
19:28:08.957092 IP 10.0.2.15.33637 > 65.52.233.252.http: Flags [P.], seq 1:98, ack 1, win 14600, length 97
E...|.@.@...
...A4...e.PO.).JD.P.9.7...GET /api/v2/ HTTP/1.0
User-Agent: NuGet/2.7.41115.310 (Unix 2.6.32.358)
Host: www.nuget.org

19:28:08.957319 IP 65.52.233.252.http > 10.0.2.15.33637: Flags [.], ack 98, win 65535, length 0
E..([...@...A4..
....P.eJD.O.*
P....k........
19:28:09.088644 IP 65.52.233.252.http > 10.0.2.15.33637: Flags [P.], seq 1:759, ack 98, win 65535, length 758
E...[...@...A4..
....P.eJD.O.*
P...y...HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Length: 302
Content-Type: application/xml;charset=utf-8
Server: Microsoft-IIS/8.0
X-Content-Type-Options: nosniff
DataServiceVersion: 1.0;
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
X-Frame-Options: deny
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Strict-Transport-Security: maxage=31536000; includeSubDomains
Date: Tue, 26 Nov 2013 19:28:08 GMT
Connection: close
<?xml version="1.0" encoding="utf-8"?><service xml:base="http://www.nuget.org/api/v2/" xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom"><workspace><atom:title>Default</atom:title><collection href="Packages"><atom:title>Packages</atom:title></collection></workspace></service>
19:28:09.088684 IP 10.0.2.15.33637 > 65.52.233.252.http: Flags [.], ack 759, win 15918, length 0
E..(|.@.@...
...A4...e.PO.*
JF.P.>..G..
19:28:09.088745 IP 65.52.233.252.http > 10.0.2.15.33637: Flags [F.], seq 759, ack 98, win 65535, length 0
E..([...@...A4..
....P.eJF.O.*
P....t........
19:28:09.089109 IP 10.0.2.15.33637 > 65.52.233.252.http: Flags [F.], seq 98, ack 760, win 15918, length 0
E..(|.@.@...
...A4...e.PO.*
JF.P.>..E..
19:28:09.089246 IP 65.52.233.252.http > 10.0.2.15.33637: Flags [.], ack 99, win 65535, length 0
E..([...@...A4..
....P.eJF.O.*.P....s........
19:28:09.182818 IP 10.0.2.15.33638 > 65.52.233.252.http: Flags [S], seq 3627833592, win 14600, options [mss 1460,sackOK,TS val 44193380 ecr 0,nop,wscale 5], length 0
E..<..@.@...
...A4...f.P.<X.......9............
..Vd........
19:28:09.308623 IP 65.52.233.252.http > 10.0.2.15.33638: Flags [S.], seq 1247688705, ack 3627833593, win 65535, options [mss 1460], length 0
E..,[...@...A4..
....P.fJ^8..<X.`...).........
19:28:09.308676 IP 10.0.2.15.33638 > 65.52.233.252.http: Flags [.], ack 1, win 14600, length 0
E..(..@.@...
...A4...f.P.<X.J^8.P.9..@..
19:28:09.308972 IP 10.0.2.15.33638 > 65.52.233.252.http: Flags [P.], seq 1:333, ack 1, win 14600, length 332
E..t..@.@...
...A4...f.P.<X.J^8.P.9.8...GET /api/v2/Packages(Id=%27EventStore.Client%27,Version=%272.0.2%27) HTTP/1.1
DataServiceVersion: 1.0;NetFx
MaxDataServiceVersion: 2.0;NetFx
User-Agent: NuGet Command Line/2.7.41115.310 (Unix 2.6.32.358)
Accept: application/atom+xml,application/xml
Accept-Charset: UTF-8
Host: www.nuget.org
Accept-Encoding: gzip, deflate

19:28:09.309151 IP 65.52.233.252.http > 10.0.2.15.33638: Flags [.], ack 333, win 65535, length 0
E..([...@...A4..
....P.fJ^8..<ZEP...?.........
19:28:09.461263 IP 65.52.233.252.http > 10.0.2.15.33638: Flags [.], seq 1:1421, ack 333, win 65535, length 1420
E...[...@..bA4..
....P.fJ^8..<ZEP...}...HTTP/1.1 200 OK
Cache-Control: no-cache
Content-Type: application/atom+xml;type=entry;charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/8.0
X-Content-Type-Options: nosniff
DataServiceVersion: 2.0;
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
X-Frame-Options: deny
X-XSS-Protection: 1; mode=block
X-Content-Type-Options: nosniff
Strict-Transport-Security: maxage=31536000; includeSubDomains
Date: Tue, 26 Nov 2013 19:28:09 GMT
Content-Length: 1302
.............`.I.%&/m.{.J.J..t...`.$..@.........iG#).*..eVe]f.@......{....{....;.N'...?fd.l..J...!....?~|.?".....ez..MQ-?.hw..Q./...X^|...=.>...8z./..:...&Y.....mW......./..y;.......{.w.#.[6A..{.bog.....Zh.G3.....E..........O...lV...ww......./.i...._........GG............o....:.}...%Q.u[....,...G?...xo.3.........4k...h..5!.b.y.~..e^_..r.Y....G)c.h...~ ....=z...i...}......-...v.....g......w....zEP..]..Q...w....f.Xd.....]....zE..gG{;...ww..>}.{....G.;?.....q.n.U}.x.-r.,....._>...>.k....^...7K....eV..u"..Z..H...VeA.N....X...S;.Q.ZI.w{........U]...-.......s.-..u..w/.z...........E.O..u]..#.[J...M..K.+....x..1C.....t..?.O....2.;..;{ovw..<|....s...{..4_...)...}.~...i].@..7.<.2y...g.yU.-}..9NI..C..2m.u=.....g...".z.I.sn...B..:=..E..F3..E...C..a.$..eYe..jM.|r.-.{{......S~.o.7U.<%MT..Wu.WC.'....v...?#...
......5M.6w.P.M..x...0..@4.i..V.&....*.l..Q[.s~/l,..O...y..Mp./    ..uN......9..F...x.y..X......$...X.f.^.'e....
19:28:09.461298 IP 10.0.2.15.33638 > 65.52.233.252.http: Flags [.], ack 1421, win 17040, length 0
E..(..@.@...
...A4...f.P.<ZEJ^=.P.B.....
19:28:09.461338 IP 65.52.233.252.http > 10.0.2.15.33638: Flags [P.], seq 1421:1449, ack 333, win 65535, length 28
E..D[...@...A4..
....P.fJ^=..<ZEP...,'..;.7......f~...O.....n....]..
19:28:09.461344 IP 10.0.2.15.33638 > 65.52.233.252.http: Flags [.], ack 1449, win 17040, length 0
E..(..@.@...
...A4...f.P.<ZEJ^=.P.B.....
19:28:09.461579 IP 65.52.233.252.http > 10.0.2.15.33638: Flags [P.], seq 1449:1804, ack 333, win 65535, length 355
E...[...@...A4..
....P.fJ^=..<ZEP....9...}....o_._,..O..z...p~..r.6[|g.}...O.~.....&u..{...w~...........xyvr..u1.<......S......lN...G..}|..y#..{.5 _..#.=.|.]4..a.b_.P.J..9.h..}....Z....E..:i.....y...dP...>..#....T.$w...Qs..&i.....1.xo:8/......O..m......T.t../..k...Z...T}}...9...  ...
19:28:09.461587 IP 10.0.2.15.33638 > 65.52.233.252.http: Flags [.], ack 1804, win 19880, length 0
E..(..@.@...
P.M..H..f.P.<ZEJ^?
19:28:09.463985 IP 10.0.2.15.33638 > 65.52.233.252.http: Flags [R.], seq 333, ack 1804, win 19880, length 0
E..(..@.@...
P.M..D..f.P.<ZEJ^?

wire^C
32 packets captured
34 packets received by filter

同样的错误。几分钟后,我再次运行它:

-bash-4.1$ mono buildsupport/NuGet.exe  install src/OurApp/packages.config -Source nuget
Installing 'EventStore.Client 2.0.2'.
Successfully installed 'EventStore.Client 2.0.2'.
Installing 'NodaTime 1.1.1'.
Successfully installed 'NodaTime 1.1.1'.

这次tcpdump说:

[root@tc ~]# tcpdump -c 10000 -s 0 -i eth0 -A tcp port http -w nuget.pcap
tcpdump: listening on eth0, link-type EN10MB (Ethernet), capture size 65535 bytes
^C1586 packets captured
1787 packets received by filter
201 packets dropped by kernel

所以现在我有了一个不工作时的ASCII表示(不幸的是,正如你可以从上面的转储中读取的那样,最终的回复是gzip,所以我安装了可以读取pcap文件并解压缩它的wireshark),以及一个工作时的pcap。。。

有什么不同。。。?我卸载了wireshark以确保它不是那样的,但它现在仍然有效。。。嗯,也许这条推特就是区别?

Ubuntu trusty/14.04上使用MonoJIT编译器版本3.2.8(Debian 3.2.8+dfsg-4ubuntu1)

我得到了同样的错误,发现这是由于Nuget.exe 的版本

3.3.0.212 失败,但旧版本2.8.1.0运行良好。

也通过更新到nuget版本:

nuget.exe update -self

将我的nuget.exe更新为3.4.4-rtm-final这导致了另一个问题。

因此,我的解决方案是使用较旧的nuget.exe.

最新更新