How to install lua & VSCode on CentOS 7

[root@contoso ~]# yum install -y cpp binutils glibc glibc-kernheaders glibc-common glibc-devel gcc make readline-devel

[root@contoso ~]# curl -R -O

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  296k  100  296k    0     0  57650      0  0:00:05  0:00:05 --:--:-- 63885
[root@contoso ~]# tar -C /usr/local -xzf lua-5.3.4.tar.gz
[root@contoso ~]# ls /usr/local
bin  etc  games  include  lib  lib64  libexec  lua-5.3.4  sbin  share  src
[root@contoso ~]# cd /usr/local/lua-5.3.4
[root@contoso lua-5.3.4]# make linux test
cd src && make linux
make[1]: Entering directory `/usr/local/lua-5.3.4/src'
make all SYSCFLAGS="-DLUA_USE_LINUX" SYSLIBS="-Wl,-E -ldl -lreadline"
make[2]: Entering directory `/usr/local/lua-5.3.4/src'
gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX    -c -o lua.o lua.c
gcc -std=gnu99 -o lua   lua.o liblua.a -lm -Wl,-E -ldl -lreadline 
gcc -std=gnu99 -O2 -Wall -Wextra -DLUA_COMPAT_5_2 -DLUA_USE_LINUX    -c -o luac.o luac.c
gcc -std=gnu99 -o luac   luac.o liblua.a -lm -Wl,-E -ldl -lreadline 
make[2]: Leaving directory `/usr/local/lua-5.3.4/src'
make[1]: Leaving directory `/usr/local/lua-5.3.4/src'
src/lua -v
Lua 5.3.4  Copyright (C) 1994-2017, PUC-Rio
[root@contoso ~]# cat >> /etc/profile
export LUAROOT=/usr/local/lua
export PATH=$PATH:$LUAROOT/bin
export LUAPATH=~/code/lua
[root@contoso ~]# source /etc/profile

安装Visual Studio Code

sudo rpm --import
sudo sh -c 'echo -e "[code]\nname=Visual Studio Code\nbaseurl=\nenabled=1\ngpgcheck=1\ngpgkey=" > /etc/yum.repos.d/vscode.repo'

dnf check-update
sudo dnf install code

Or on older versions using yum:
yum check-update
sudo yum install -y code

[myth@contoso ~]$ su -
Password: 123

Last login: Mon May 14 23:26:23 CST 2018 from on pts/0
[root@contoso ~]# code
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.


[root@contoso ~]# code --user-data-dir=~/code/lua


  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他