linux git clone Network file descriptor is not connected

执行curl命令出错:

[lj@localhost ~]$ curl https://sh.rustup.rs -sSf | sh
curl: (35) Network file descriptor is not connected

首先排除了网络问题:ping www.baidu.com 无丢包

[lj@localhost ~]$ ping www.baidu.com
PING www.a.shifen.com (39.156.66.14) 56(84) bytes of data.
64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=1 ttl=128 time=25.1 ms
64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=2 ttl=128 time=22.4 ms
64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=3 ttl=128 time=23.7 ms
64 bytes from 39.156.66.14 (39.156.66.14): icmp_seq=4 ttl=128 time=22.9 ms
^C
--- www.a.shifen.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 12044ms
rtt min/avg/max/mdev = 22.493/23.583/25.179/1.037 ms

后来发现是curl版本问题,需要升级nss
用root权限运行yum update nss命令

[lj@localhost ~]$ yum update nss
已加载插件:fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
您需要 root 权限执行此命令。
[lj@localhost ~]$ sudo !!
sudo yum update nss
[sudo] lj 的密码:
已加载插件:fastestmirror, langpacks
Repository base is listed more than once in the configuration
Repository updates is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
No packages marked for update

再次运行curl命令,没有报错

[lj@localhost ~]$ curl https://sh.rustup.rs -sSf | sh
info: downloading installer
Warning: Not enforcing strong cipher suites for TLS, this is potentially less secure

Welcome to Rust!

This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.

Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:

  /home/lj/.rustup

猜你喜欢

转载自blog.csdn.net/qq_40713201/article/details/125175967