输出code --verbose
:
[main 3:45:14 PM] Error: listen EACCES /run/user/0/vscode-4369ae7e-1.29.1-main.sock
at Object._errnoException (util.js:1024:11)
at _exceptionWithHostPort (util.js:1046:20)
at Server.setupListenHandle [as _listen2] (net.js:1334:19)
at listenInCluster (net.js:1392:12)
at Server.listen (net.js:1487:5)
at /usr/share/code/resources/app/out/vs/code/electron-main/main.js:190:282
at new Promise (<anonymous>)
at Object.t.serve (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:190:215)
at n (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:503:143)
at Q (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:505:411)
at t.e.invokeFunction (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:220:247)
at /usr/share/code/resources/app/out/vs/code/electron-main/main.js:506:361
at Object.v [as _notify] (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:101:572)
at Object.enter (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:104:924)
at n.Class.derive._oncancel._run (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:106:790)
at n.Class.derive._oncancel._completed (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:106:231)
at u (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:109:680)
at V.then.o.(anonymous function) (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:109:894)
at Object.v [as _notify] (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:101:572)
at Object.enter (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:104:924)
at n.Class.derive._oncancel._run (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:106:790)
at n.Class.derive._oncancel._completed (/usr/share/code/resources/app/out/vs/code/electron-main/main.js:106:231)
at /usr/share/code/resources/app/out/vs/code/electron-main/main.js:137:453
at FSReqWrap.oncomplete (original-fs.js:153:5)
[main 3:45:14 PM] Lifecycle#kill()
输出bash -x code
:
++ id -u
+ '[' 1000 = 0 ']'
+ '[' '!' -L code ']'
++ dirname code
+ VSCODE_PATH=./..
+ ELECTRON=./../code
+ CLI=./../resources/app/out/cli.js
+ ELECTRON_RUN_AS_NODE=1
+ ./../code ./../resources/app/out/cli.js
/usr/bin/code: line 35: ./../code: No such file or directory
+ exit 127
内容/usr/bin/code
:
#!/usr/bin/env bash
#
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# If root, ensure that --user-data-dir or --file-write is specified
if [ "$(id -u)" = "0" ]; then
for i in $@
do
if [[ $i == --user-data-dir || $i == --user-data-dir=* || $i == --file-write ]]; then
CAN_LAUNCH_AS_ROOT=1
fi
done
if [ -z $CAN_LAUNCH_AS_ROOT ]; then
echo "You are trying to start vscode as a super user which is not recommended. If you really want to, you must specify an alternate user data directory using the --user-data-dir argument." 1>&2
exit 1
fi
fi
if [ ! -L $0 ]; then
# if path is not a symlink, find relatively
VSCODE_PATH="$(dirname $0)/.."
else
if which readlink >/dev/null; then
# if readlink exists, follow the symlink and find relatively
VSCODE_PATH="$(dirname $(readlink -f $0))/.."
else
# else use the standard install location
VSCODE_PATH="/usr/share/code"
fi
fi
ELECTRON="$VSCODE_PATH/code"
CLI="$VSCODE_PATH/resources/app/out/cli.js"
ELECTRON_RUN_AS_NODE=1 "$ELECTRON" "$CLI" "$@"
exit $?
有什么建议么?