VSCode-leetcode 安装配置

ubuntu下VSCode-leetcode 安装配置

安装配置node.js[method1]

1.uninstall leetcode
2.install leetcode with labuladong
3.click left button [leetcode with labuladong]
4.vscode will hint that:“you need install node.js
5.click that hint will open a html witch can provide download link of node.js

tar -xvf node-v14.17.0-linux-x64
cd node-v14.17.0-linux-x64/bin/
./node

5.1.it may hint you that you need to install glibc

./node: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found

env error:

    configure: error: 
    *** These critical programs are missing or too old: gawk bison
    *** Check the INSTALL file for required versions.

5.2 solve method:

    sudo apt install gawk
    sudo apt install bison

5.3to solve it you need run that

将编译定义目录与源码目录分开即可。
cd ~
wget  https://mirror.bjtu.edu.cn/gnu/libc/glibc-2.28.tar.xz  [or]  wget https://ftp.gnu.org/gnu/glibc/glibc-2.28.tar.xz
tar -xvf glibc-2.28.tar.xz
cd glibc-2.28/
mkdir build
cd build
../configure --prefix=/usr/local/glibc-2.28/
make
make install

if you meet error:

/home/freja/glibc-2.28/build/elf/ldconfig: Warning: ignoring configuration file that cannot be opened: /opt/glibc-2.28/etc/ld.so.conf: No such file or directory

5.4creat this file can fix this problem

sudo touch /opt/glibc-2.28/etc/ld.so.conf
cd node-v14.17.0-linux-x64/bin/
./node
#ctrl+D 退出
cd ..
cd ..
#回到主目录
gedit .bashrc
#最后一行追加export PATH=$PATH:/home/freja/node-v14.17.0-linux-x64/bin/
source .bashrc
node#测试
#ctrl+D 退出
#添加软连接如下
sudo ln -s /home/freja/node-v14.17.0-linux-x64/bin/npm /usr/local/bin/
sudo ln -s /home/freja/node-v14.17.0-linux-x64/bin/node /usr/local/bin/

安装配置node.js[method2]

tar -xvf node-v14.17.0-linux-x64
cd node-v14.17.0-linux-x64/bin/
./node
#ctrl+D 退出
cd ..
cd ..
#回到主目录
gedit .bashrc
#最后一行追加export PATH=$PATH:/home/freja/node-v14.17.0-linux-x64/bin/
source .bashrc
node#测试
#ctrl+D 退出
#添加软连接如下
sudo ln -s /home/freja/node-v14.17.0-linux-x64/bin/npm /usr/local/bin/
sudo ln -s /home/freja/node-v14.17.0-linux-x64/bin/node /usr/local/bin/

可以顺利启动VSCode-leetcode
此时需要登陆leetcode账号

安装中文包

ctrl+shift+P打开vsc控制台
贴上Configure Display Language并回车
选择安装addtional language
自动跳转到插件安装页面
选择简体中文(simplified chinese)

登陆

点击左侧选项卡最下方leetcode图标
点击左上角小地球图标,右侧控制台选项选择leetcode中文版
控制台提示输入账号密码登陆
按指示分别输入账号,密码即可

use leetcode with labuladong

in

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值