npm ERR! fatal: Unable to look up github.com (port 9418) (Name or service not known)
2020-06-21 05:10
2236 查看
有一台Linux机器通过配置代理能够上网,但执行npm install的时候报如下错误:
npm WARN deprecated chokidar@2.1.5: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated runjs@4.4.2: This project has been renamed to 'tasksfile'. Install using 'npm install tasksfile' instead. npm WARN deprecated core-js@2.6.11: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3. npm WARN deprecated fsevents@1.2.13: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated microcli@1.3.3: This project has been renamed to @pawelgalazka/cli . Install using @pawelgalazka/cli instead npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info. npm WARN deprecated chokidar@2.1.8: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated microargs@1.1.2: This project has been renamed to @pawelgalazka/cli-args. Install using @pawelgalazka/cli-args instead npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor. npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart() npm ERR! Error while executing: npm ERR! /usr/bin/git ls-remote -h -t git://github.com/adobe-webplatform/eve.git npm ERR! npm ERR! fatal: Unable to look up github.com (port 9418) (Name or service not known) npm ERR! npm ERR! exited with error code: 128 npm ERR! A complete log of this run can be found in: npm ERR! /home/smart/.npm/_logs/2020-05-08T07_58_46_667Z-debug.log
解决方法:
[smart@dms-npm microservice_vue_demo]$ git config --global url."https://".insteadOf git://
再重新执行npm install,如果没有报ERR,出现类似如下信息,则说明成功。
nodejieba@2.4.1 install /home/smart/jenkins/workspace/microservice_vue_demo/node_modules/nodejieba
node-pre-gyp install --fallback-to-build
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp WARN Tried to download(404): https://github.com/yanyiwu/nodejieba/releases/download/2.4.1/nodejieba-v2.4.1-node-v72-linux-x64.tar.gz
node-pre-gyp WARN Pre-built binaries not found for nodejieba@2.4.1 and node@12.16.3 (node-v72 ABI, glibc) (falling back to source compile with node-gyp)
make: Entering directory
/home/smart/jenkins/workspace/microservice_vue_demo/node_modules/nodejieba/build' CXX(target) Release/obj.target/nodejieba/lib/index.o CXX(target) Release/obj.target/nodejieba/lib/nodejieba.o SOLINK_MODULE(target) Release/obj.target/nodejieba.node COPY Release/nodejieba.node make: Leaving directory/home/smart/jenkins/workspace/microservice_vue_demo/node_modules/nodejieba/build’
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/babel-jest/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {“os”:“darwin”,“arch”:“any”} (current: {“os”:“linux”,“arch”:“x64”})
added 16 packages from 15 contributors in 47.883s
41 packages are looking for funding
run
npm fundfor details
相关文章推荐
- Github error – fatal: Unable to look up github.com (port 9418) (Name or service not known)
- Github error – fatal: Unable to look up github.com (port 9418) (Name or service not known)
- 获取Android源码时如何解决【fatal: Unable to look up android.git.kernel.org (port 9418) (Name or service not known)】的问题
- 获取Android源码时如何解决【fatal: Unable to look up android.git.kernel.org (port 9418) (Name or service not kn
- ssh: Could not resolve hostname github.com: Name or service not known; fatal: The remote end hung up
- Unable to resolve address ' ' service ' ': Name or service not known
- Unable to resolve address ' ' service ' ': Name or service not known
- apache启动失败:Name or service not known: mod_unique_id: unable to find IPv4 address of "narkii"
- git错误--ssh: Could not resolve hostname ssh.github.com: Name or service not known--解决方式
- Unable to resolve address ' ' service ' ': Name or service not known
- git错误--ssh: Could not resolve hostname ssh.github.com: Name or service not known--解决方式
- )Name or service not known: mod_unique_id: unable to find IPv4 addr ess of "wb_three_cgi20"
- Resolving www.linuxde.net... failed: Name or service not known. wget: unable to resolve host address
- fatal:unable to access '...github.com/.../.git':Failed to connect to github.com port 443: Timed out
- git clone时出现ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from
- CentOS设置静态ip、ping: www.baidu.com: Name or service not known解决方案
- git push错误:ssh:Could not resolve hostname gitee.com:Name or service not known 问题解决啦!
- Linux报错之ping: www.baidu.com: Name or service not known
- fatal: unable to access 'https://github.com/***': Failed to connect to github.com port 443:Timed out
- [Git]fatal: unable to access ...: Failed to connect to github.com port 443: Timed out