在 RHEL 7 上安装 vscode

在 RHEL 7 上安装 vscode

我尝试vscode在 redhat 上安装,但yum install code失败并出现以下错误。

[root@GLCHBS-SS220387 ~]# sudo yum install code
Loaded plugins: product-id, search-disabled-repos, subscription-manager
Resolving Dependencies
--> Running transaction check
---> Package code.x86_64 0:1.36.1-1562627663.el7 will be installed
--> Processing Dependency: libxkbfile.so.1()(64bit) for package: code-1.36.1-1562627663.el7.x86_64
--> Processing Dependency: libXss.so.1()(64bit) for package: code-1.36.1-1562627663.el7.x86_64
--> Processing Dependency: libsecret-1.so.0()(64bit) for package: code-1.36.1-1562627663.el7.x86_64
--> Running transaction check
---> Package libXScrnSaver.x86_64 0:1.2.2-6.1.el7 will be installed
---> Package libsecret.x86_64 0:0.18.6-1.el7 will be installed
---> Package libxkbfile.x86_64 0:1.0.9-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================================================================
 Package                                       Arch                                   Version                                                Repository                                     Size
=================================================================================================================================================================================================
Installing:
 code                                          x86_64                                 1.36.1-1562627663.el7                                  vscode                                         75 M
Installing for dependencies:
 libXScrnSaver                                 x86_64                                 1.2.2-6.1.el7                                          GIS-repo-LIVE                                  24 k
 libsecret                                     x86_64                                 0.18.6-1.el7                                           GIS-repo-LIVE                                 153 k
 libxkbfile                                    x86_64                                 1.0.9-3.el7                                            GIS-repo-LIVE                                  83 k

Transaction Summary
=================================================================================================================================================================================================
Install  1 Package (+3 Dependent packages)

Total download size: 75 M
Installed size: 76 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): libXScrnSaver-1.2.2-6.1.el7.x86_64.rpm                                                                                                                             |  24 kB  00:00:00
(2/4): libxkbfile-1.0.9-3.el7.x86_64.rpm                                                                                                                                  |  83 kB  00:00:00
(3/4): libsecret-0.18.6-1.el7.x86_64.rpm                                                                                                                                  | 153 kB  00:00:00
code-1.36.1-1562627663.el7.x86 FAILED
https://packages.microsoft.com/yumrepos/vscode/code-1.36.1-1562627663.el7.x86_64.rpm: [Errno 12] Timeout on https://packages.microsoft.com/yumrepos/vscode/code-1.36.1-1562627663.el7.x86_64.rpm: (28, 'Connection timed out after 30000 milliseconds')
Trying other mirror.
code-1.36.1-1562627663.el7.x86 FAILED
https://packages.microsoft.com/yumrepos/vscode/code-1.36.1-1562627663.el7.x86_64.rpm: [Errno 12] Timeout on https://packages.microsoft.com/yumrepos/vscode/code-1.36.1-1562627663.el7.x86_64.rpm: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
code-1.36.1-1562627663.el7.x86 FAILED
https://packages.microsoft.com/yumrepos/vscode/code-1.36.1-1562627663.el7.x86_64.rpm: [Errno 12] Timeout on https://packages.microsoft.com/yumrepos/vscode/code-1.36.1-1562627663.el7.x86_64.rpm: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
code-1.36.1-1562627663.el7.x86 FAILED
https://packages.microsoft.com/yumrepos/vscode/code-1.36.1-1562627663.el7.x86_64.rpm: [Errno 12] Timeout on https://packages.microsoft.com/yumrepos/vscode/code-1.36.1-1562627663.el7.x86_64.rpm: (28, 'Connection timed out after 30001 milliseconds')

我该如何解决同样的问题?

该链接工作正常,如果我得到它,它会立即下载。

[app01@GLCHBS-SS220387 ~]$ wget https://packages.microsoft.com/yumrepos/vscode/code-1.36.1-1562627663.el7.x86_64.rpm
--2019-07-31 14:18:43--  https://packages.microsoft.com/yumrepos/vscode/code-1.36.1-1562627663.el7.x86_64.rpm
Resolving proxy.eu.novartis.net (proxy.eu.novartis.net)... 192.37.1.42, 192.37.1.41, 192.37.1.40, ...
Connecting to proxy.eu.novartis.net (proxy.eu.novartis.net)|192.37.1.42|:2010... connected.
Proxy request sent, awaiting response... 200 OK
Length: 78586592 (75M) [application/x-redhat-package-manager]
Saving to: ‘code-1.36.1-1562627663.el7.x86_64.rpm’

100%[=======================================================================================================================================================>] 78,586,592  2.06MB/s   in 19s

2019-07-31 14:19:02 (4.02 MB/s) - ‘code-1.36.1-1562627663.el7.x86_64.rpm’ saved [78586592/78586592]

[app01@GLCHBS-SS220387 ~]$ ls
code-1.36.1-1562627663.el7.x86_64.rpm  index.html

答案1

yum正在抛出[Errno 12],稍后将其扩展为连接超时。

这可能是您自己或packages.microsoft.com 的网络连接问题。

然而,搜索此错误号时出现了之前提出的问题,其中清理yum及其缓存解决了该问题。

yum clean all && yum clean metadata && yum clean dbcache && yum makecache && yum update

https://www.linuxquestions.org/questions/linux-newbie-8/%5Berrno-12%5D-timeout-urlopen-error-timed-out-700681/

相关内容