当前位置: 首页 > article >正文

VS Code 配置 Rust-Analyzer 报错

报错信息:

Bootstrap Error" rust-analyzer requires glibc >= 2.28 in latest build.

参考了好多地方,

https://github.com/rust-lang/rust-analyzer/issues/11558
https://blog.csdn.net/aLingYun/article/details/120923694
https://rust-analyzer.github.io/manual.html#vs-code

内容:

Summary of a workaround
the last working build: 0.2.948
the first broken build: 0.2.956
who is affected: anyone running Ubuntu < v.20

Option 1 - downgrade
1.Open the extension page in VS Code
2. Click on [V] next to Uninstall button
3. Select 0.2.948 and reload

Notes
You will be perpetually stuck on that version.

Option 2 - use pre-prelease via rustup
Install rust-analyzer-preview by running rustup toolchain install nightly --component rust-analyzer-preview
Go to VSCode settings and search for rust-analyzer.server.path. You should see something along these lines
image
Click on Edit in settings.json and add “rust-analyzer.server.path”: “~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rust-analyzer”
Reload VSCode

Notes
You will have to update the extension manually with rustup update
Even if rust-analyzer is built using nightly you can still use stable as your default channel
Component availability: https://rust-lang.github.io/rustup-components-history/
是把rust-analyzer 安装上了,但设置路径这一步一直不起效果。

最后偷梁换柱的方式成功了,用自己下载rust-analyzer 替换了VSCode 的 rust-analyzer ,成功了。

 $  ln -s ~/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/rust-analyzer ~/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.1566-linux-x64/server/rust-analyzer

后面发现,其实是应该该这里的文件 🤦‍。同样起作用。
在这里插入图片描述


http://www.kler.cn/news/304599.html

相关文章:

  • VUE下拉选择分页,远程搜索
  • 软件测试工程师面试整理-测试方法
  • ZCC40036 过压保护芯片
  • 用SpringBoot进行阿里云大模型接口调用同步方法和异步方法
  • C# 中的多线程同步:原子变量、原子操作、内存顺序和可见性
  • uni-app 聊天界面滚动到消息底部
  • Java后端程序员简单操作Linux系统命令
  • 深度学习——数据预处理,张量降维
  • Qt 边框border - qss样式
  • C++类与对象深度解析(一):从抽象到实践的全面入门指南
  • Linux相关:在阿里云下载centos系统镜像
  • Leetcode Hot 100刷题记录 -Day16(旋转图像)
  • 15.2 定义一个prometheus数据存储使用的pv
  • A Single Generic Prompt forSegmenting Camouflaged Objects
  • java: 程序包org.junit.jupiter.api不存在
  • 数据分析-前期数据处理
  • MacOS Sonoma(14.x) 大写模式或中文输入法下的英文模式,光标下方永远会出现的CapsLock箭头Icon的去除办法
  • Prompt提示词技巧
  • OA项目值用户登入首页展示
  • ArrayList、LinkedList和Vector的区别
  • Python 的分支结构
  • 如何选择适合企业的高效财税自动化软件
  • 桌面应用框架:tauri是后起之秀,赶上electron路还很长。
  • Mysql | 知识 | 理解是怎么加锁的
  • ansible企业实战
  • 高级java每日一道面试题-2024年9月09日-数据库篇-事务提交后数据仍然没有持久化,可能的原因是什么?
  • 海外服务器:开启全球业务的关键钥匙
  • 神经网络的公式推导与代码实现(论文复现)
  • OFDM系统PAPR算法的MATLAB仿真,对比SLM,PTS以及CAF,对比不同傅里叶变换长度
  • Java中的Lambda表达式和Stream API详解