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