之前看到阮一峰科技爱好者周刊关于exa的介绍,觉得挺炫酷的,自己也想玩一下,今天尝试安装,遇到了一些些坑,记录一下。
背景
我的Linux是CentOS 7,很干净几乎啥都没装的状态。
安装步骤
1. 安装wget
yum install -y wget
2. 进入安装目录
cd /usr/local/
3. 下载安装包
wget https://github.com/ogham/exa/releases/download/v0.9.0/exa-linux-x86_64-0.9.0.zip
4. 解压
unzip exa-linux-x86_64-0.9.0.zip
4.1 如果提示找不到unzip,所以先安装好unzip再重复第4步
yum install -y unzip
5. 重命名一下
mv exa-linux-x86_64 /usr/local/bin/exa
6. 执行exa
cd ../bin
exa
提示:exa: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by exa)
7. 安装glibc-2.18
wget http://mirrors.ustc.edu.cn/gnu/libc/glibc-2.18.tar.gz
tar -zxvf glibc-2.18.tar.gz
cd glibc-2.18
mkdir build
cd build
../configure --prefix=/usr
提示:checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/usr/local/bin/glibc-2.18/build':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
8. 不着急,提示说缺少gcc,咱就去装个gcc先
yum install -y gcc
9. 编译安装(需要耐心等待一段时间 )
../configure --prefix=/usr
make -j4
sudo make install
10. 试试运行exa
cd /usr/local/bin
exa -T
可以愉快地玩耍了~~