linux 深度安装nodeJS和安装vuecli步骤
andy@andy-PC:~$ mv node-v6.10.0-linux-x64 nodejs
mv: 无法获取'node-v6.10.0-linux-x64' 的文件状态(stat): 没有那个文件或目录
andy@andy-PC:~$ mv node nodejs
mv: 无法获取'node' 的文件状态(stat): 没有那个文件或目录
andy@andy-PC:~$ sudo apt-get install nodejs
[sudo] andy 的密码:
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
nodejs 已经是最新版 (4.8.2~dfsg-1)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
andy@andy-PC:~$ sudo apt install nodejs-legacy
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列【新】软件包将被安装:
nodejs-legacy
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 290 kB 的归档。
解压缩后会消耗 329 kB 的额外空间。
获取:1 http://packages.deepin.com/deepin lion/main amd64 nodejs-legacy all 4.8.2~dfsg-1 [290 kB]
已下载 290 kB,耗时 0秒 (805 kB/s)
正在选中未选择的软件包 nodejs-legacy。
(正在读取数据库 ... 系统当前共安装有 196744 个文件和目录。)
正准备解包 .../nodejs-legacy_4.8.2~dfsg-1_all.deb ...
正在解包 nodejs-legacy (4.8.2~dfsg-1) ...
正在设置 nodejs-legacy (4.8.2~dfsg-1) ...
正在处理用于 man-db (2.7.6.1-2) 的触发器 ...
andy@andy-PC:~$ sudo apt install npm
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
没有可用的软件包 npm,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到
然而下列软件包会取代它:
node nodejs-bin
E: 软件包 npm 没有可安装候选
andy@andy-PC:~$ sudo npm install n -g
sudo: npm:找不到命令
andy@andy-PC:~$ ^C
andy@andy-PC:~$ sudo apt - get update
E: 无效的操作 get
andy@andy-PC:~$ sudo apt-get update
获取:1 http://packages.microsoft.com/repos/vscode stable InRelease [3,959 B]
命中:2 http://packages.deepin.com/deepin lion InRelease
获取:3 http://packages.microsoft.com/repos/vscode stable/main amd64 Packages [164 kB]
获取:4 http://linux.teamviewer.com/deb stable InRelease [9,388 B]
获取:5 http://linux.teamviewer.com/deb stable/main i386 Packages [4,746 B]
获取:6 http://linux.teamviewer.com/deb stable/main amd64 Packages [5,028 B]
已下载 187 kB,耗时 1秒 (127 kB/s)
正在读取软件包列表... 完成
andy@andy-PC:~$ sudo apt install npm
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
没有可用的软件包 npm,但是它被其它的软件包引用了。
这可能意味着这个缺失的软件包可能已被废弃,
或者只能在其他发布源中找到
然而下列软件包会取代它:
node nodejs-bin
E: 软件包 npm 没有可安装候选
andy@andy-PC:~$ ^C
andy@andy-PC:~$ nodejs -v
v4.8.2
andy@andy-PC:~$ sudo apt remove
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 2 个软件包未被升级。
andy@andy-PC:~$ sudo apt remove nodejs
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:
libuv1
使用'sudo apt autoremove'来卸载它(它们)。
下列软件包将被【卸载】:
nodejs nodejs-legacy
升级了 0 个软件包,新安装了 0 个软件包,要卸载 2 个软件包,有 2 个软件包未被升级。
解压缩后将会空出 14.6 MB 的空间。
您希望继续执行吗? [Y/n] y
(正在读取数据库 ... 系统当前共安装有 196751 个文件和目录。)
正在卸载 nodejs-legacy (4.8.2~dfsg-1) ...
正在卸载 nodejs (4.8.2~dfsg-1) ...
正在处理用于 man-db (2.7.6.1-2) 的触发器 ...
andy@andy-PC:~$ sudo apt install node
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:
libuv1
使用'sudo apt autoremove'来卸载它(它们)。
下列【新】软件包将被安装:
node
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 2 个软件包未被升级。
需要下载 11.5 MB 的归档。
解压缩后会消耗 53.1 MB 的额外空间。
获取:1 http://packages.deepin.com/deepin lion/main amd64 node amd64 10.15.3 [11.5 MB]
已下载 11.5 MB,耗时 1秒 (8,426 kB/s)
正在选中未选择的软件包 node。
(正在读取数据库 ... 系统当前共安装有 196683 个文件和目录。)
正准备解包 .../node_10.15.3_amd64.deb ...
正在解包 node (10.15.3) ...
正在处理用于 man-db (2.7.6.1-2) 的触发器 ...
正在设置 node (10.15.3) ...
andy@andy-PC:~$ npm
Usage: npm <command>
where <command> is one of:
access, adduser, audit, bin, bugs, c, cache, ci, cit,
completion, config, create, ddp, dedupe, deprecate,
dist-tag, docs, doctor, edit, explore, get, help,
help-search, hook, i, init, install, install-test, it, link,
list, ln, login, logout, ls, outdated, owner, pack, ping,
prefix, profile, prune, publish, rb, rebuild, repo, restart,
root, run, run-script, s, se, search, set, shrinkwrap, star,
stars, start, stop, t, team, test, token, tst, un,
uninstall, unpublish, unstar, up, update, v, version, view,
whoami
npm <command> -h quick help on <command>
npm -l display full usage info
npm help <term> search for help on <term>
npm help npm involved overview
Specify configs in the ini-formatted file:
/home/andy/.npmrc
or on the command line via: npm <command> --key value
Config info can be viewed via: npm help config
npm@6.4.1 /usr/lib/node_modules/npm
andy@andy-PC:~$ node -v
v10.15.3
andy@andy-PC:~$ npm install -g vue-cli
npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! { [Error: EACCES: permission denied, access '/usr/lib/node_modules']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access \'/usr/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /home/andy/.npm/_logs/2020-02-26T01_44_35_292Z-debug.log
andy@andy-PC:~$ npm install -g @vue/cli
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
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 checkPermissions Missing write access to /usr/lib/node_modules
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@^1.2.7 (node_modules/@vue/cli/node_modules/chokidar/node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.11: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! path /usr/lib/node_modules
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules'
npm ERR! { [Error: EACCES: permission denied, access '/usr/lib/node_modules']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access \'/usr/lib/node_modules\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /home/andy/.npm/_logs/2020-02-26T01_52_32_086Z-debug.log
andy@andy-PC:~$ npm update -g
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/agent-base
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/agentkeepalive
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/aproba
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/block-stream
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/bluebird
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/builtin-modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/chownr
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/cidr-regex
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/colors
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/cli-table3
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/es6-promise
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/figgy-pudding
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/fstream
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/genfun
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/get-caller-file
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/get-stream
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/graceful-fs
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/cmd-shim
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/hosted-git-info
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/https-proxy-agent
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/ignore-walk
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/inherits
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/glob
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/invert-kv
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/is-builtin-module
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/JSONStream
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/lcid
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/libnpmhook/node_modules/npm-registry-fetch
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/mimic-fn
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/minipass/node_modules/yallist
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/minipass
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/nopt
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/semver
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules/tar
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-bundled
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-packlist
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/retry
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-client/node_modules/ssri
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-client
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/figgy-pudding
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/pump
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules/mississippi
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/smart-buffer
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/socks
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/socks-proxy-agent
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/ssri
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/cacache
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/make-fetch-happen
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/mem
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/protoduck
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/read-cmd-shim
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/gentle-fs
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/readdir-scoped-modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/rimraf
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/semver
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/normalize-package-data
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-package-arg
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/lock-verify
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-pick-manifest
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/os-locale
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/slash
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/read-package-json
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/smart-buffer
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/socks
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/socks-proxy-agent
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/spdx-license-ids
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/ssri
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/string_decoder
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/stringify-package
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/tar/node_modules/yallist
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/unique-filename
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/uuid
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/worker-farm
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/write-file-atomic
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/bin-links
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/yallist
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/fs-minipass
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/lru-cache
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/cacache
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/make-fetch-happen
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-fetch
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/libnpmhook
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-profile
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/minizlib
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/tar
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/node-gyp
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-lifecycle
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/pacote
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/yargs
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/byte-size
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/call-limit
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/ci-info
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/config-chain
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/is-cidr
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/libcipm
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/libnpx
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-audit-report
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-install-checks
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/opener
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/query-string
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/read-package-tree
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/readable-stream
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/sha
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/copy-concurrently/node_modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/fs-write-stream-atomic/node_modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/gauge/node_modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/gentle-fs/node_modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/libnpmhook/node_modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/minipass/node_modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/node-gyp/node_modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-client/node_modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/npm-registry-fetch/node_modules/cacache/node_modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/tar/node_modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/are-we-there-yet
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/concat-stream
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/cross-spawn
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/duplexify
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/execa
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/flush-write-stream
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/from2
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/got
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/is-ci
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/move-concurrently
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/parallel-transform
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/run-queue
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/stream-iterate
npm WARN checkPermissions Missing write access to /usr/lib/node_modules/npm/node_modules/through2
npm ERR! path /usr/lib/node_modules/npm/node_modules/agent-base
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall access
npm ERR! Error: EACCES: permission denied, access '/usr/lib/node_modules/npm/node_modules/agent-base'
npm ERR! { [Error: EACCES: permission denied, access '/usr/lib/node_modules/npm/node_modules/agent-base']
npm ERR! stack:
npm ERR! 'Error: EACCES: permission denied, access \'/usr/lib/node_modules/npm/node_modules/agent-base\'',
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'access',
npm ERR! path: '/usr/lib/node_modules/npm/node_modules/agent-base' }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It is likely you do not have the permissions to access this file as the current user
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in:
npm ERR! /home/andy/.npm/_logs/2020-02-26T01_55_34_722Z-debug.log
andy@andy-PC:~$ npm -v
6.4.1
andy@andy-PC:~$ node -v
v10.15.3
andy@andy-PC:~$ sudo npm install --global vue-cli
[sudo] andy 的密码:
npm WARN deprecated vue-cli@2.9.6: This package has been deprecated in favour of @vue/cli
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated coffee-script@1.12.7: CoffeeScript on NPM has moved to "coffeescript" (no hyphen)
/usr/bin/vue -> /usr/lib/node_modules/vue-cli/bin/vue
/usr/bin/vue-init -> /usr/lib/node_modules/vue-cli/bin/vue-init
/usr/bin/vue-list -> /usr/lib/node_modules/vue-cli/bin/vue-list
+ vue-cli@2.9.6
added 240 packages from 205 contributors in 53.709s
andy@andy-PC:~$ vue -v
error: unknown option `-v'
andy@andy-PC:~$ vue
Usage: vue <command> [options]
Options:
-V, --version output the version number
-h, --help output usage information
Commands:
init generate a new project from a template
list list available official templates
build prototype a new project
create (for v3 warning only)
help [cmd] display help for [cmd]
andy@andy-PC:~$
andy@andy-PC:~$ vue -V
2.9.6
andy@andy-PC:~$