天天看點

給Cygwin重新安裝curl給Cygwin重新安裝curl 提示 沒有cywmetalink-3.dll找到子產品

之前已經安裝過了cygwin了,但是重裝了系統了。

不過發現cygwin倒是還可以繼續使用。

現在想要使用其中的curl工具。

但是卻在cygwin安裝目錄

E:\dev_install_root\cygwin\bin

對應的bin下面沒有找到curl.exe。

倒是很詭異的看到了curl-config檔案。

現在想要給目前的cygwin安裝curl。

1.由于之前

E:\Dev_Tools\Cygwin\cygwin_download_2

中已經有了之前安裝時候所下載下傳的本地的安裝所需的檔案,

是以其下有檔案夾http%3a%2f%2fmirrors.163.com%2fcygwin%2f

http%3a%2f%2fmirrors.163.com%2fcygwin%2f下有release檔案夾和setup.ini配置檔案。

2.專門看了下那個setup.ini,導緻找到了curl相關的内容:

<a href="http://www.crifan.com/install_curl_into_cygwin/">?</a>

<code>@ curl</code>

<code>sdesc:</code><code>"Multi-protocol file transfer command-line tool"</code>

<code>ldesc: "curl is a</code><code>command</code> <code>line tool and library</code><code>for</code> <code>transferring files</code>

<code>with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP,</code>

<code>TELNET, DICT, and FILE. curl supports SSL certificates, HTTP POST, HTTP</code>

<code>PUT, FTP uploading, HTTP form based upload, proxies, cookies,</code>

<code>user+password authentication (Basic, Digest, NTLM, Negotiate...),</code><code>file</code>

<code>transfer resume, proxy tunneling and a busload of other useful tricks."</code>

<code>category: Net Web</code>

<code>requires: libcurl4 zlib0 cygwin</code>

<code>version: 7.24.0-3</code>

<code>install</code><code>: release</code><code>/curl/curl-7</code><code>.24.0-3.</code><code>tar</code><code>.bz2 382557 a15eb0b04985a0be7e941b359d307768</code>

<code>source</code><code>: release</code><code>/curl/curl-7</code><code>.24.0-3-src.</code><code>tar</code><code>.bz2 1985097 f23b3e091e052f7b3e9a54ee622ecf2f</code>

<code>[prev]</code>

<code>version: 7.24.0-2</code>

<code>install</code><code>: release</code><code>/curl/curl-7</code><code>.24.0-2.</code><code>tar</code><code>.bz2 382165 935c3577492e3fe79eb4b1683a9716bb</code>

<code>source</code><code>: release</code><code>/curl/curl-7</code><code>.24.0-2-src.</code><code>tar</code><code>.bz2 1985377 2d3603e9767c0de437a6a9a77da35e63</code>

<code>@ curl-devel</code>

<code>sdesc:</code><code>"Obsolete package"</code>

<code>ldesc:</code><code>"Obsolete package"</code>

<code>category: _obsolete</code>

<code>requires: libcurl-devel</code>

<code>version: 7.24.0-1</code>

<code>install</code><code>: release</code><code>/curl/curl-devel/curl-devel-7</code><code>.24.0-1.</code><code>tar</code><code>.bz2 14 4059d198768f9f8dc9372dc1c54bc3c3</code>

3.去運作之前的cygwin的安裝檔案setup.exe,然後選擇從本地安裝,然後選擇上面的那個E:\Dev_Tools\Cygwin\cygwin_download_2檔案夾。

然後可以自動解析,之後,在選擇子產品的界面,輸入curl,找到了相關的curl的庫,然後都設定為reinstall:

給Cygwin重新安裝curl給Cygwin重新安裝curl 提示 沒有cywmetalink-3.dll找到子產品

其中,參考了:

<a href="http://stackoverflow.com/questions/3647569/how-do-i-install-curl-on-cygwin">How do I install cURL on cygwin?</a>

知道了curl是在Net下面的。

不過,很明顯,上述我是已經不管三七二十一,把Libs,Net,Web的curl,全部選擇上了。

然後點選下一步去安裝。

然後就是很快的就下載下傳并安裝好了:

給Cygwin重新安裝curl給Cygwin重新安裝curl 提示 沒有cywmetalink-3.dll找到子產品

結果很悲催的是,E:\dev_install_root\cygwin\bin下面,還是沒有找到curl啊。

4.後來又去對應的

E:\Dev_Tools\Cygwin\cygwin_download_2\http%3a%2f%2fmirrors.163.com%2fcygwin%2f\release\curl

下看到了有已經下載下傳的那4個相關的:

curl-devel,libcurl3,libcurl4,libcurl-devel

然後每個檔案夾都有對應的tar檔案,打開後發現,的确裡面也都沒有包含curl.exe,是以即使都安裝上,也還是沒有curl.exe的

5.然後又回去參考:

看到兩種方法:

I just ran into this. If you’re not seeing curl in the list (see ibaralf’s screenshot), then you may have out-of-date cygwin sources. In one of the screens in cygwin’s setup.exe wizard, you have the option to "Install from Internet" or "Install from Local Directory". If you have the "Install from Local Directory" option enabled, then you may not see curl in the list. Switch to "Install from Internet" and select a mirror and then you should see curl.

I searched for curl on the cygwin packages part of their home page. I found this link <code>http://cygwin.com/packages/curl/</code>. But that wasn’t helpful because I couldn’t download anything So I searched for the <code>curl-7.20.1-1 cygwin</code> on Google. I found this helpful site <code>mirrors.xmission.com/cygwin/release/curl/</code> That site had a link to download <code>curl-7.20.1-1.tar.bz2</code>. I unzipped it using 7zip. It unzips it into <code>./user/bin/</code> or something so I had to find<code>curl.exe</code> in the local <code>/usr/bin</code> folder and put it into my <code>/bin</code> folder of<code>c:\cygwin</code> Finally I could use cURL! This drove me crazy. I hope it helps someone!

貌似第二種感覺更靠譜。

不過也可以先試試第一種。

然後繼續重新運作setup.exe,期間還被告知有更新的版本的setup.exe,不過懶得管了。

然後繼續,選擇了那個:

給Cygwin重新安裝curl給Cygwin重新安裝curl 提示 沒有cywmetalink-3.dll找到子產品

<a href="ftp://mirrors.xmission.com/">ftp://mirrors.xmission.com</a>

的源,然後下一步,然後搜curl,找到了真正想要的:

curl: Multi-protocol file transfer tool

給Cygwin重新安裝curl給Cygwin重新安裝curl 提示 沒有cywmetalink-3.dll找到子產品

然後再點選下一步去安裝,即可。

不過很悲催的是,由于不小心,沒有取消全部的别的子產品,是以估計是預設選擇安裝了很多别的子產品,是以現在卻是去下載下傳很多别的子產品:

給Cygwin重新安裝curl給Cygwin重新安裝curl 提示 沒有cywmetalink-3.dll找到子產品

索性取消掉算了。

然後又按照之前步驟重新執行一次,隻是在選擇子產品是,所有的都選擇reinstall,然後再另外搜curl,然後對于其中的curl,是選擇安裝的:

給Cygwin重新安裝curl給Cygwin重新安裝curl 提示 沒有cywmetalink-3.dll找到子產品

然後由于是reinstall,而之前已經安裝好的子產品,本地都已經有檔案了,是以是瞬間下載下傳好了:

給Cygwin重新安裝curl給Cygwin重新安裝curl 提示 沒有cywmetalink-3.dll找到子產品

結果,又還是去下載下傳很多其他子產品了。

是以,再次取消掉。

這次重新再弄一次,選擇的是,download without installing,然後選擇子產品是,隻選擇curl,并且選擇的是keep,結果還是會去下載下傳很多其他的子產品。

是以,還是放棄此法。

5換用另外那種,直接去:

<a href="http://mirrors.xmission.com/cygwin/release/curl/">http://mirrors.xmission.com/cygwin/release/curl/</a>

bin\curl.exe

share\doc\xxx

share\man\xxx

是以,直接全部拷貝到cygwin的usr檔案夾:

E:\dev_install_root\cygwin\usr

下面,即可。

隻不過此處悲催的,又是遇到一堆權限問題,但是後來還是慢慢的解決了。

5.然後再去重新打開cygwin視窗,驗證是否可以找到crul了。

結果還是沒有找到。

是以,看來是cygwin沒有把/usr/bin加到其path中,此點也是很奇怪的。

不過懶得管了,幹脆手動再次把/usr/bin下的curl.exe移至/bin下面即可。

終于,cygwin中可以找到curl了:

<code>Administrator@NYBDHB7EB3XEHP6 ~</code>

<code>$ curl --help</code>

<code>Usage: curl [options...] &lt;url&gt;</code>

<code>Options: (H) means HTTP</code><code>/HTTPS</code> <code>only, (F) means FTP only</code>

<code>     </code><code>--anyauth       Pick</code><code>"any"</code> <code>authentication method (H)</code>

<code> </code><code>-a, --append        Append to target</code><code>file</code> <code>when uploading (F</code><code>/SFTP</code><code>)</code>

<code>     </code><code>--basic         Use HTTP Basic Authentication (H)</code>

<code>     </code><code>--cacert FILE   CA certificate to verify peer against (SSL)</code>

<code>     </code><code>--capath DIR    CA directory to verify peer against (SSL)</code>

<code> </code><code>-E, --cert CERT[:PASSWD] Client certificate</code><code>file</code> <code>and password (SSL)</code>

<code>     </code><code>--cert-</code><code>type</code> <code>TYPE Certificate</code><code>file</code> <code>type</code> <code>(DER</code><code>/PEM/ENG</code><code>) (SSL)</code>

<code>     </code><code>--ciphers LIST  SSL ciphers to use (SSL)</code>

<code>     </code><code>--compressed    Request compressed response (using deflate or</code><code>gzip</code><code>)</code>

<code> </code><code>-K, --config FILE   Specify</code><code>which</code> <code>config</code><code>file</code> <code>to</code><code>read</code>

<code>     </code><code>--connect-timeout SECONDS  Maximum</code><code>time</code> <code>allowed</code><code>for</code> <code>connection</code>

<code> </code><code>-C, --</code><code>continue</code><code>-at OFFSET  Resumed transfer offset</code>

<code> </code><code>-b, --cookie STRING</code><code>/FILE</code>  <code>String or</code><code>file</code> <code>to</code><code>read</code> <code>cookies from (H)</code>

<code> </code><code>-c, --cookie-jar FILE  Write cookies to this</code><code>file</code> <code>after operation (H)</code>

<code>     </code><code>--create-</code><code>dirs</code>   <code>Create necessary</code><code>local</code> <code>directory hierarchy</code>

<code>     </code><code>--crlf          Convert LF to CRLF</code><code>in</code> <code>upload</code>

<code>     </code><code>--crlfile FILE  Get a CRL list</code><code>in</code> <code>PEM</code><code>format</code> <code>from the given</code><code>file</code>

<code>......</code>

【總結】

其實,想要在cygwin中安裝單個子產品,工具等,直接可以從網上找cygwin的景象,比如:

<a href="http://mirrors.xmission.com/cygwin/release/">http://mirrors.xmission.com/cygwin/release/</a>

其中curl的位址是:

然後手動下載下傳對應的工具,解壓,放到對應的bin或sbin等路徑下即可。

網易鏡像

32位

下載下傳對應的curl,然後本地直接解壓,得到一個usr檔案夾,其下有

<a href="http://www.crifan.com/install_curl_into_cygwin/" target="_blank">?</a>

<a href="http://mirrors.xmission.com/cygwin/x86/release/curl/%3Ca" target="_blank">http://mirrors.xmission.com/cygwin/x86/release/curl/&lt;a&lt; a=""&gt;href="http://mirrors.xmission.com/cygwin/release/curl/" target=_blank&gt;</a>

================================================

提示 沒有cywmetalink-3.dll

分析後得出 子產品名是metalink 找到子產品

$ curl

D:/cygwin/bin/curl.exe: error while loading shared libraries: cygcurl-4.dll: cannot open shared object file: No such file or directory

下載下傳安裝即可

==============================================

今天在網易源安裝了最新版的Cygwin,剛剛在Cygwin下執行curl的時候,出現如下提示資訊

1

$curl: error while loading shared libraries: ?: cannot open shared object file: No such file or directory

解決辦法:

第一步.使用cygcheck檢查:

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51

52

53

$cygcheck curl

C:\Dell\Cygwin\bin\curl.exe

C:\Dell\Cygwin\bin\cygcurl-4.dll

C:\Dell\Cygwin\bin\cyggcc_s-1.dll

C:\Dell\Cygwin\bin\cygwin1.dll

C:\Windows\system32\KERNEL32.dll

C:\Windows\system32\API-MS-Win-Core-RtlSupport-L1-1-0.dll

C:\Windows\system32\ntdll.dll

C:\Windows\system32\KERNELBASE.dll

C:\Windows\system32\API-MS-Win-Core-ProcessThreads-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-Heap-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-Memory-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-Handle-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-Synch-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-File-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-IO-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-ThreadPool-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-LibraryLoader-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-NamedPipe-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-Misc-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-SysInfo-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-Localization-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-ProcessEnvironment-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-String-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-Debug-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-ErrorHandling-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-Fibers-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-Util-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Core-Profile-L1-1-0.dll

C:\Windows\system32\API-MS-Win-Security-Base-L1-1-0.dll

C:\Dell\Cygwin\bin\cygcrypto-1.0.0.dll

C:\Dell\Cygwin\bin\cygz.dll

C:\Dell\Cygwin\bin\cyggssapi-3.dll

C:\Dell\Cygwin\bin\cygheimntlm-0.dll

C:\Dell\Cygwin\bin\cygkrb5-26.dll

C:\Dell\Cygwin\bin\cygasn1-8.dll

C:\Dell\Cygwin\bin\cygroken-18.dll

C:\Dell\Cygwin\bin\cygcrypt-0.dll

C:\Dell\Cygwin\bin\cygcom_err-2.dll

C:\Dell\Cygwin\bin\cygwind-0.dll

C:\Dell\Cygwin\bin\cyghx509-5.dll

C:\Dell\Cygwin\bin\cygintl-8.dll

C:\Dell\Cygwin\bin\cygiconv-2.dll

C:\Dell\Cygwin\bin\cygsqlite3-0.dll

C:\Dell\Cygwin\bin\cygheimbase-1.dll

C:\Dell\Cygwin\bin\cygidn-11.dll

C:\Dell\Cygwin\bin\cyglber-2-4-2.dll

C:\Dell\Cygwin\bin\cygldap-2-4-2.dll

C:\Dell\Cygwin\bin\cygssl-1.0.0.dll

C:\Dell\Cygwin\bin\cygssh2-1.dll

C:\Dell\Cygwin\bin\cygmetalink-3.dll

C:\Dell\Cygwin\bin\cygexpat-1.dll

cygcheck: track_down: could not find cygsasl2-2.dll

發現是缺少了cygsasl2-2.dll

第二步.分析丢失的子產品并安裝:

有檔案名分析丢失的子產品名字應該為cygsasl2,當然也有可能是cygsasl,cyg,sasl2等,一個個都使用Cygwin的Setup.exe安裝上,發現丢失的子產品名字應該是sasl2,點選install,問題解決

<a href="http://mirrors.163.com/cygwin/" target="_blank">http://mirrors.163.com/cygwin/</a>

技術改變世界!

--狂詩絕劍

繼續閱讀