如何从搬运工,工具箱卷曲切换到Windows路径定义的卷曲(How to switch from d

2019-09-26 14:26发布

I am installing the Platform specific binaries for hyperledger, but have a problem, since I have a windows device and am using docker-toolbox quickstart terminal.

The curl version installed on docker-toolbox is:

$ curl --version
curl 7.49.1 (x86_64-w64-mingw32) libcurl/7.49.1 OpenSSL/1.0.2h zlib/1.2.8 libidn/1.32 libssh2/1.7.0 nghttp2/1.11.1 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smtp smtps telnet tftp
Features: IDN IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL libz TLS-SRP HTTP2 Metalink

I installed the curl version 7.56 on my windows and added to the PATH. When I open the windows default terminal, the version is 7.56

How can I change the docker-quickstart curl to use my windows curl?

  • Reopening the quickstart terminal
  • I tried restarting the VM
  • Using sudo apt-get install curl inside the VM terminal, but it appears that there is no apt-get installed on the VM

Any ideas - the solution for the related question is insufficient, I want to have the latest curl

Answer 1:

您将需要从泊坞窗 - 工具箱快速入门终端窗口安装卷曲的新版本。



Answer 2:

创建一个文件名为.bash_profile在你的home目录( C:\Users\<username> )这行命令:

PATH=/c/your/curl/path/bin:$PATH

如果有许多路径相同的二进制文件,一个在PATH变量的最左侧将excuted。

在启动时,以便它的路径将是在PATH变量的最左侧的MinGW-W64(由泊坞快速启动终端使用)将前面加上其路径到PATH变量。 因此,MinGW的-W64的卷曲被excuted,而不是你最初在PATH变量定义的。

.bash_profile文件将开始的MinGW-W64(泊坞快速启动终端),当被执行以便可以添加上述命令预先设置文件在PATH变量。



文章来源: How to switch from docker-toolbox curl to the curl defined in windows path