升级openssl3.3,安装cpan依赖报错

报错信息如下

[root@localhost ~]# cpan IPC::Cmd                                    
Fetching with HTTP::Tiny:
http://www.cpan.org/authors/01mailrc.txt.gz
HTTP::Tiny failed with an internal error: Could not read from socket: 'Connection reset by peer'


Trying with
    /usr/bin/curl -L -f -s -S --netrc-optional
to get
    http://www.cpan.org/authors/01mailrc.txt.gz
curl: (56) Recv failure: Connection reset by peer

    Function system("/usr/bin/curl -L -f -s -S --netrc-optional "http://www.cpan.org/authors/01mailrc.txt.gz"  > "/root/.cpan/sources/authors/01mailrc.txt.gz.tmp24570"")
    returned status 56 (wstat 14336), left
/root/.cpan/sources/authors/01mailrc.txt.gz.tmp24570 with size 0
    Warning: no success downloading '/root/.cpan/sources/authors/01mailrc.txt.gz.tmp24570'. Giving up on it.

Trying with
    /usr/bin/curl -L -f -s -S --netrc-optional
to get
    http://www.cpan.org/authors/01mailrc.txt.gz
curl: (56) Recv failure: Connection reset by peer

    Function system("/usr/bin/curl -L -f -s -S --netrc-optional "http://www.cpan.org/authors/01mailrc.txt.gz"  > "/root/.cpan/sources/authors/01mailrc.txt.gz.tmp24570"")
    returned status 56 (wstat 14336), left
/root/.cpan/sources/authors/01mailrc.txt.gz.tmp24570 with size 0
    Warning: no success downloading '/root/.cpan/sources/authors/01mailrc.txt.gz.tmp24570'. Giving up on it.
No external ftp command available

Fetching with HTTP::Tiny:
http://www.cpan.org/authors/01mailrc.txt.gz
HTTP::Tiny failed with an internal error: Could not read from socket: 'Connection reset by peer'


Trying with
    /usr/bin/curl -L -f -s -S --netrc-optional
to get
    http://www.cpan.org/authors/01mailrc.txt.gz
curl: (56) Recv failure: Connection reset by peer

    Function system("/usr/bin/curl -L -f -s -S --netrc-optional "http://www.cpan.org/authors/01mailrc.txt.gz"  > "/root/.cpan/sources/authors/01mailrc.txt.gz.tmp24570"")
    returned status 56 (wstat 14336), left
/root/.cpan/sources/authors/01mailrc.txt.gz.tmp24570 with size 0
    Warning: no success downloading '/root/.cpan/sources/authors/01mailrc.txt.gz.tmp24570'. Giving up on it.

Trying with
    /usr/bin/curl -L -f -s -S --netrc-optional
to get
    http://www.cpan.org/authors/01mailrc.txt.gz
curl: (56) Recv failure: Connection reset by peer

    Function system("/usr/bin/curl -L -f -s -S --netrc-optional "http://www.cpan.org/authors/01mailrc.txt.gz"  > "/root/.cpan/sources/authors/01mailrc.txt.gz.tmp24570"")
    returned status 56 (wstat 14336), left
/root/.cpan/sources/authors/01mailrc.txt.gz.tmp24570 with size 0
    Warning: no success downloading '/root/.cpan/sources/authors/01mailrc.txt.gz.tmp24570'. Giving up on it.
No external ftp command available

Please check, if the URLs I found in your configuration file
(http://www.cpan.org/) are valid. The urllist can be edited. E.g. with 'o
conf urllist push ftp://myurl/'

Could not fetch authors/01mailrc.txt.gz

**cpan IPC::Cmd 执行该命令报错尝试解决办法**

**更改CPAN镜像:** 有时候默认的CPAN镜像可能宕机或有问题。你可以更换为另一个镜像。编辑CPAN配置并更新`urllist`。

进入CPAN shell:

cpan
o conf urllist
o conf urllist shift http://www.cpan.org/
o conf urllist unshift http://mirror.cpan.org/
o conf commit

**手动更新CPAN配置:** 你可以手动编辑CPAN配置文件,通常位于`~/.cpan/CPAN/MyConfig.pm`或root用户的`/root/.cpan/CPAN/MyConfig.pm`。添加或更新`urllist`设置:

```
'urllist' => [
    'http://mirror.cpan.org/',
    'http://www.cpan.org/',
],

```

**使用不同的CPAN安装工具:** 尝试使用`cpanm`(CPAN Minus),这是一个更轻量且用户友好的工具来安装Perl模块。

首先安装`cpanm`:

```sh
curl -L https://cpanmin.us | perl - --sudo App::cpanminus
```

然后使用`cpanm`安装所需的模块:

```sh
cpanm IPC::Cmd
```

后续升级可以参考我发的脚本

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值