Cannot activate rust-analyzer

I use VS Code, and my rust-analyzer can't work.
cannot activate rust-analyzer

This is my output:
INFO [9/2/2022, 9:55:15 AM]: Extension version: 0.3.1186
INFO [9/2/2022, 9:55:15 AM]: Using configuration {
cargoRunner: null,
runnableEnv: null,
server: { path: null, extraEnv: null },
trace: { server: 'off', extension: true },
debug: {
engine: 'auto',
sourceFileMap: {
'/rustc/': '${env:USERPROFILE}/.rustup/toolchains//lib/rustlib/src/rust'
},
openDebugPane: false,
engineSettings: {}
},
restartServerOnConfigChange: false,
typing: {
continueCommentsOnNewline: true,
autoClosingAngleBrackets: { enable: false }
},
assist: { expressionFillDefault: 'todo' },
cachePriming: { enable: true, numThreads: 0 },
cargo: {
autoreload: true,
buildScripts: { enable: true, overrideCommand: null, useRustcWrapper: true },
features: ,
noDefaultFeatures: false,
noSysroot: false,
target: null,
unsetTest: [ 'core' ]
},
checkOnSave: {
allTargets: true,
command: 'check',
enable: true,
extraArgs: ,
features: null,
noDefaultFeatures: null,
overrideCommand: null,
target: null
},
completion: {
autoimport: { enable: true },
autoself: { enable: true },
callable: { snippets: 'fill_arguments' },
postfix: { enable: true },
privateEditable: { enable: false },
snippets: {
custom: {
'Arc::new': {
postfix: 'arc',
body: 'Arc::new(${receiver})',
requires: 'std::sync::Arc',
description: 'Put the expression into an Arc',
scope: 'expr'
},
'Rc::new': {
postfix: 'rc',
body: 'Rc::new(${receiver})',
requires: 'std::rc::Rc',
description: 'Put the expression into an Rc',
scope: 'expr'
},
'Box::pin': {
postfix: 'pinbox',
body: 'Box::pin(${receiver})',
requires: 'std::boxed::Box',
description: 'Put the expression into a pinned Box',
scope: 'expr'
},
Ok: {
postfix: 'ok',
body: 'Ok(${receiver})',
description: 'Wrap the expression in a Result::Ok',
scope: 'expr'
},
Err: {
postfix: 'err',
body: 'Err(${receiver})',
description: 'Wrap the expression in a Result::Err',
scope: 'expr'
},
Some: {
postfix: 'some',
body: 'Some(${receiver})',
description: 'Wrap the expression in an Option::Some',
scope: 'expr'
}
}
}
},
diagnostics: {
disabled: ,
enable: true,
experimental: { enable: false },
remapPrefix: {},
warningsAsHint: ,
warningsAsInfo:
},
files: { excludeDirs: , watcher: 'client' },
highlightRelated: {
breakPoints: { enable: true },
exitPoints: { enable: true },
references: { enable: true },
yieldPoints: { enable: true }
},
hover: {
actions: {
debug: { enable: true },
enable: true,
gotoTypeDef: { enable: true },
implementations: { enable: true },
references: { enable: false },
run: { enable: true }
},
documentation: { enable: true, keywords: { enable: true } },
links: { enable: true }
},
imports: {
granularity: { enforce: false, group: 'crate' },
group: { enable: true },
merge: { glob: true },
prefix: 'plain'
},
inlayHints: {
bindingModeHints: { enable: false },
chainingHints: { enable: true },
closingBraceHints: { enable: true, minLines: 25 },
closureReturnTypeHints: { enable: 'never' },
lifetimeElisionHints: { enable: 'never', useParameterNames: false },
maxLength: 25,
parameterHints: { enable: true },
reborrowHints: { enable: 'never' },
renderColons: true,
typeHints: {
enable: true,
hideClosureInitialization: false,
hideNamedConstructor: false
}
},
joinLines: {
joinAssignments: true,
joinElseIf: true,
removeTrailingComma: true,
unwrapTrivialBlock: true
},
lens: {
debug: { enable: true },
enable: true,
forceCustomCommands: true,
implementations: { enable: true },
references: {
adt: { enable: false },
enumVariant: { enable: false },
method: { enable: false },
trait: { enable: false }
},
run: { enable: true }
},
linkedProjects: [ 'rust-project.json' ],
lru: { capacity: null },
notifications: { cargoTomlNotFound: true },
procMacro: {
attributes: { enable: true },
enable: true,
ignored: {},
server: null
},
runnables: { command: null, extraArgs: },
rustc: { source: null },
rustfmt: {
extraArgs: ,
overrideCommand: null,
rangeFormatting: { enable: false }
},
semanticHighlighting: {
doc: { comment: { inject: { enable: true } } },
operator: { enable: true, specialization: { enable: false } },
punctuation: {
enable: false,
separate: { macro: { bang: false } },
specialization: { enable: false }
},
strings: { enable: true }
},
signatureInfo: { detail: 'full', documentation: { enable: true } },
workspace: {
symbol: { search: { kind: 'only_types', limit: 128, scope: 'workspace' } }
}
}
INFO [9/2/2022, 9:55:15 AM]: PersistentState: { serverVersion: '0.3.1186' }
INFO [9/2/2022, 9:55:16 AM]: Extension version: 0.3.1186
INFO [9/2/2022, 9:55:16 AM]: Using configuration {
cargoRunner: null,
runnableEnv: null,
server: { path: null, extraEnv: null },
trace: { server: 'off', extension: true },
debug: {
engine: 'auto',
sourceFileMap: {
'/rustc/': '${env:USERPROFILE}/.rustup/toolchains//lib/rustlib/src/rust'
},
openDebugPane: false,
engineSettings: {}
},
restartServerOnConfigChange: false,
typing: {
continueCommentsOnNewline: true,
autoClosingAngleBrackets: { enable: false }
},
assist: { expressionFillDefault: 'todo' },
cachePriming: { enable: true, numThreads: 0 },
cargo: {
autoreload: true,
buildScripts: { enable: true, overrideCommand: null, useRustcWrapper: true },
features: ,
noDefaultFeatures: false,
noSysroot: false,
target: null,
unsetTest: [ 'core' ]
},
checkOnSave: {
allTargets: true,
command: 'check',
enable: true,
extraArgs: ,
features: null,
noDefaultFeatures: null,
overrideCommand: null,
target: null
},
completion: {
autoimport: { enable: true },
autoself: { enable: true },
callable: { snippets: 'fill_arguments' },
postfix: { enable: true },
privateEditable: { enable: false },
snippets: {
custom: {
'Arc::new': {
postfix: 'arc',
body: 'Arc::new(${receiver})',
requires: 'std::sync::Arc',
description: 'Put the expression into an Arc',
scope: 'expr'
},
'Rc::new': {
postfix: 'rc',
body: 'Rc::new(${receiver})',
requires: 'std::rc::Rc',
description: 'Put the expression into an Rc',
scope: 'expr'
},
'Box::pin': {
postfix: 'pinbox',
body: 'Box::pin(${receiver})',
requires: 'std::boxed::Box',
description: 'Put the expression into a pinned Box',
scope: 'expr'
},
Ok: {
postfix: 'ok',
body: 'Ok(${receiver})',
description: 'Wrap the expression in a Result::Ok',
scope: 'expr'
},
Err: {
postfix: 'err',
body: 'Err(${receiver})',
description: 'Wrap the expression in a Result::Err',
scope: 'expr'
},
Some: {
postfix: 'some',
body: 'Some(${receiver})',
description: 'Wrap the expression in an Option::Some',
scope: 'expr'
}
}
}
},
diagnostics: {
disabled: ,
enable: true,
experimental: { enable: false },
remapPrefix: {},
warningsAsHint: ,
warningsAsInfo:
},
files: { excludeDirs: , watcher: 'client' },
highlightRelated: {
breakPoints: { enable: true },
exitPoints: { enable: true },
references: { enable: true },
yieldPoints: { enable: true }
},
hover: {
actions: {
debug: { enable: true },
enable: true,
gotoTypeDef: { enable: true },
implementations: { enable: true },
references: { enable: false },
run: { enable: true }
},
documentation: { enable: true, keywords: { enable: true } },
links: { enable: true }
},
imports: {
granularity: { enforce: false, group: 'crate' },
group: { enable: true },
merge: { glob: true },
prefix: 'plain'
},
inlayHints: {
bindingModeHints: { enable: false },
chainingHints: { enable: true },
closingBraceHints: { enable: true, minLines: 25 },
closureReturnTypeHints: { enable: 'never' },
lifetimeElisionHints: { enable: 'never', useParameterNames: false },
maxLength: 25,
parameterHints: { enable: true },
reborrowHints: { enable: 'never' },
renderColons: true,
typeHints: {
enable: true,
hideClosureInitialization: false,
hideNamedConstructor: false
}
},
joinLines: {
joinAssignments: true,
joinElseIf: true,
removeTrailingComma: true,
unwrapTrivialBlock: true
},
lens: {
debug: { enable: true },
enable: true,
forceCustomCommands: true,
implementations: { enable: true },
references: {
adt: { enable: false },
enumVariant: { enable: false },
method: { enable: false },
trait: { enable: false }
},
run: { enable: true }
},
linkedProjects: [ 'rust-project.json' ],
lru: { capacity: null },
notifications: { cargoTomlNotFound: true },
procMacro: {
attributes: { enable: true },
enable: true,
ignored: {},
server: null
},
runnables: { command: null, extraArgs: },
rustc: { source: null },
rustfmt: {
extraArgs: ,
overrideCommand: null,
rangeFormatting: { enable: false }
},
semanticHighlighting: {
doc: { comment: { inject: { enable: true } } },
operator: { enable: true, specialization: { enable: false } },
punctuation: {
enable: false,
separate: { macro: { bang: false } },
specialization: { enable: false }
},
strings: { enable: true }
},
signatureInfo: { detail: 'full', documentation: { enable: true } },
workspace: {
symbol: { search: { kind: 'only_types', limit: 128, scope: 'workspace' } }
}
}
INFO [9/2/2022, 9:55:16 AM]: Extension version: 0.3.1186
INFO [9/2/2022, 9:55:16 AM]: Using configuration {
cargoRunner: null,
runnableEnv: null,
server: { path: null, extraEnv: null },
trace: { server: 'off', extension: true },
debug: {
engine: 'auto',
sourceFileMap: {
'/rustc/': '${env:USERPROFILE}/.rustup/toolchains//lib/rustlib/src/rust'
},
openDebugPane: false,
engineSettings: {}
},
restartServerOnConfigChange: false,
typing: {
continueCommentsOnNewline: true,
autoClosingAngleBrackets: { enable: false }
},
assist: { expressionFillDefault: 'todo' },
cachePriming: { enable: true, numThreads: 0 },
cargo: {
autoreload: true,
buildScripts: { enable: true, overrideCommand: null, useRustcWrapper: true },
features: ,
noDefaultFeatures: false,
noSysroot: false,
target: null,
unsetTest: [ 'core' ]
},
checkOnSave: {
allTargets: true,
command: 'check',
enable: true,
extraArgs: ,
features: null,
noDefaultFeatures: null,
overrideCommand: null,
target: null
},
completion: {
autoimport: { enable: true },
autoself: { enable: true },
callable: { snippets: 'fill_arguments' },
postfix: { enable: true },
privateEditable: { enable: false },
snippets: {
custom: {
'Arc::new': {
postfix: 'arc',
body: 'Arc::new(${receiver})',
requires: 'std::sync::Arc',
description: 'Put the expression into an Arc',
scope: 'expr'
},
'Rc::new': {
postfix: 'rc',
body: 'Rc::new(${receiver})',
requires: 'std::rc::Rc',
description: 'Put the expression into an Rc',
scope: 'expr'
},
'Box::pin': {
postfix: 'pinbox',
body: 'Box::pin(${receiver})',
requires: 'std::boxed::Box',
description: 'Put the expression into a pinned Box',
scope: 'expr'
},
Ok: {
postfix: 'ok',
body: 'Ok(${receiver})',
description: 'Wrap the expression in a Result::Ok',
scope: 'expr'
},
Err: {
postfix: 'err',
body: 'Err(${receiver})',
description: 'Wrap the expression in a Result::Err',
scope: 'expr'
},
Some: {
postfix: 'some',
body: 'Some(${receiver})',
description: 'Wrap the expression in an Option::Some',
scope: 'expr'
}
}
}
},
diagnostics: {
disabled: ,
enable: true,
experimental: { enable: false },
remapPrefix: {},
warningsAsHint: ,
warningsAsInfo:
},
files: { excludeDirs: , watcher: 'client' },
highlightRelated: {
breakPoints: { enable: true },
exitPoints: { enable: true },
references: { enable: true },
yieldPoints: { enable: true }
},
hover: {
actions: {
debug: { enable: true },
enable: true,
gotoTypeDef: { enable: true },
implementations: { enable: true },
references: { enable: false },
run: { enable: true }
},
documentation: { enable: true, keywords: { enable: true } },
links: { enable: true }
},
imports: {
granularity: { enforce: false, group: 'crate' },
group: { enable: true },
merge: { glob: true },
prefix: 'plain'
},
inlayHints: {
bindingModeHints: { enable: false },
chainingHints: { enable: true },
closingBraceHints: { enable: true, minLines: 25 },
closureReturnTypeHints: { enable: 'never' },
lifetimeElisionHints: { enable: 'never', useParameterNames: false },
maxLength: 25,
parameterHints: { enable: true },
reborrowHints: { enable: 'never' },
renderColons: true,
typeHints: {
enable: true,
hideClosureInitialization: false,
hideNamedConstructor: false
}
},
joinLines: {
joinAssignments: true,
joinElseIf: true,
removeTrailingComma: true,
unwrapTrivialBlock: true
},
lens: {
debug: { enable: true },
enable: true,
forceCustomCommands: true,
implementations: { enable: true },
references: {
adt: { enable: false },
enumVariant: { enable: false },
method: { enable: false },
trait: { enable: false }
},
run: { enable: true }
},
linkedProjects: [ 'rust-project.json' ],
lru: { capacity: null },
notifications: { cargoTomlNotFound: true },
procMacro: {
attributes: { enable: true },
enable: true,
ignored: {},
server: null
},
runnables: { command: null, extraArgs: },
rustc: { source: null },
rustfmt: {
extraArgs: ,
overrideCommand: null,
rangeFormatting: { enable: false }
},
semanticHighlighting: {
doc: { comment: { inject: { enable: true } } },
operator: { enable: true, specialization: { enable: false } },
punctuation: {
enable: false,
separate: { macro: { bang: false } },
specialization: { enable: false }
},
strings: { enable: true }
},
signatureInfo: { detail: 'full', documentation: { enable: true } },
workspace: {
symbol: { search: { kind: 'only_types', limit: 128, scope: 'workspace' } }
}
}
INFO [9/2/2022, 9:55:16 AM]: Extension version: 0.3.1186
INFO [9/2/2022, 9:55:16 AM]: Using configuration {
cargoRunner: null,
runnableEnv: null,
server: { path: null, extraEnv: null },
trace: { server: 'off', extension: true },
debug: {
engine: 'auto',
sourceFileMap: {
'/rustc/': '${env:USERPROFILE}/.rustup/toolchains//lib/rustlib/src/rust'
},
openDebugPane: false,
engineSettings: {}
},
restartServerOnConfigChange: false,
typing: {
continueCommentsOnNewline: true,
autoClosingAngleBrackets: { enable: false }
},
assist: { expressionFillDefault: 'todo' },
cachePriming: { enable: true, numThreads: 0 },
cargo: {
autoreload: true,
buildScripts: { enable: true, overrideCommand: null, useRustcWrapper: true },
features: ,
noDefaultFeatures: false,
noSysroot: false,
target: null,
unsetTest: [ 'core' ]
},
checkOnSave: {
allTargets: true,
command: 'check',
enable: true,
extraArgs: ,
features: null,
noDefaultFeatures: null,
overrideCommand: null,
target: null
},
completion: {
autoimport: { enable: true },
autoself: { enable: true },
callable: { snippets: 'fill_arguments' },
postfix: { enable: true },
privateEditable: { enable: false },
snippets: {
custom: {
'Arc::new': {
postfix: 'arc',
body: 'Arc::new(${receiver})',
requires: 'std::sync::Arc',
description: 'Put the expression into an Arc',
scope: 'expr'
},
'Rc::new': {
postfix: 'rc',
body: 'Rc::new(${receiver})',
requires: 'std::rc::Rc',
description: 'Put the expression into an Rc',
scope: 'expr'
},
'Box::pin': {
postfix: 'pinbox',
body: 'Box::pin(${receiver})',
requires: 'std::boxed::Box',
description: 'Put the expression into a pinned Box',
scope: 'expr'
},
Ok: {
postfix: 'ok',
body: 'Ok(${receiver})',
description: 'Wrap the expression in a Result::Ok',
scope: 'expr'
},
Err: {
postfix: 'err',
body: 'Err(${receiver})',
description: 'Wrap the expression in a Result::Err',
scope: 'expr'
},
Some: {
postfix: 'some',
body: 'Some(${receiver})',
description: 'Wrap the expression in an Option::Some',
scope: 'expr'
}
}
}
},
diagnostics: {
disabled: ,
enable: true,
experimental: { enable: false },
remapPrefix: {},
warningsAsHint: ,
warningsAsInfo:
},
files: { excludeDirs: , watcher: 'client' },
highlightRelated: {
breakPoints: { enable: true },
exitPoints: { enable: true },
references: { enable: true },
yieldPoints: { enable: true }
},
hover: {
actions: {
debug: { enable: true },
enable: true,
gotoTypeDef: { enable: true },
implementations: { enable: true },
references: { enable: false },
run: { enable: true }
},
documentation: { enable: true, keywords: { enable: true } },
links: { enable: true }
},
imports: {
granularity: { enforce: false, group: 'crate' },
group: { enable: true },
merge: { glob: true },
prefix: 'plain'
},
inlayHints: {
bindingModeHints: { enable: false },
chainingHints: { enable: true },
closingBraceHints: { enable: true, minLines: 25 },
closureReturnTypeHints: { enable: 'never' },
lifetimeElisionHints: { enable: 'never', useParameterNames: false },
maxLength: 25,
parameterHints: { enable: true },
reborrowHints: { enable: 'never' },
renderColons: true,
typeHints: {
enable: true,
hideClosureInitialization: false,
hideNamedConstructor: false
}
},
joinLines: {
joinAssignments: true,
joinElseIf: true,
removeTrailingComma: true,
unwrapTrivialBlock: true
},
lens: {
debug: { enable: true },
enable: true,
forceCustomCommands: true,
implementations: { enable: true },
references: {
adt: { enable: false },
enumVariant: { enable: false },
method: { enable: false },
trait: { enable: false }
},
run: { enable: true }
},
linkedProjects: [ 'rust-project.json' ],
lru: { capacity: null },
notifications: { cargoTomlNotFound: true },
procMacro: {
attributes: { enable: true },
enable: true,
ignored: {},
server: null
},
runnables: { command: null, extraArgs: },
rustc: { source: null },
rustfmt: {
extraArgs: ,
overrideCommand: null,
rangeFormatting: { enable: false }
},
semanticHighlighting: {
doc: { comment: { inject: { enable: true } } },
operator: { enable: true, specialization: { enable: false } },
punctuation: {
enable: false,
separate: { macro: { bang: false } },
specialization: { enable: false }
},
strings: { enable: true }
},
signatureInfo: { detail: 'full', documentation: { enable: true } },
workspace: {
symbol: { search: { kind: 'only_types', limit: 128, scope: 'workspace' } }
}
}
INFO [9/2/2022, 9:55:16 AM]: Using server binary at /root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1186-linux-x64/server/rust-analyzer
DEBUG [9/2/2022, 9:55:16 AM]: Checking availability of a binary at /root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1186-linux-x64/server/rust-analyzer
DEBUG [9/2/2022, 9:55:16 AM]: /root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1186-linux-x64/server/rust-analyzer --version: {
status: 1,
signal: null,
output: [
null,
'',
"/root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1186-linux-x64/server/rust-analyzer: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.29' not found (required by /root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1186-linux-x64/server/rust-analyzer)\n" + "/root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1186-linux-x64/server/rust-analyzer: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.28' not found (required by /root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1186-linux-x64/server/rust-analyzer)\n"
],
pid: 25516,
stdout: '',
stderr: "/root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1186-linux-x64/server/rust-analyzer: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.29' not found (required by /root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1186-linux-x64/server/rust-analyzer)\n" + "/root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1186-linux-x64/server/rust-analyzer: /lib/x86_64-linux-gnu/libc.so.6: version GLIBC_2.28' not found (required by /root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1186-linux-x64/server/rust-analyzer)\n"
}
ERROR [9/2/2022, 9:55:16 AM]: Bootstrap error [Error: Failed to execute /root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1186-linux-x64/server/rust-analyzer --version
at OS (/root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1186-linux-x64/out/main.js:85:2328)
at async xS (/root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1186-linux-x64/out/main.js:84:1220)
at async fv (/root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1186-linux-x64/out/main.js:84:891)
at async E._activate (/root/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:85:8224)
at async E._waitForDepsThenActivate (/root/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:85:8166)
at async E._initialize (/root/.vscode-server/bin/784b0177c56c607789f9638da7b6bf3230d47a8c/out/vs/workbench/api/node/extensionHostProcess.js:85:7530)]

How to solve this problem? Thanks!

I assume you've run into this issue about RA builds requiring a newer glibc than you or I have. There are some workarounds in the linked discussion. I've chosen to pin the VSCode extension to a version that still worked.

1 Like

Thank you, I switch the rust-analyzer version to 0.3.1170, and it works~

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.