Bubble

小六家的藏宝图

没有 root 权限怎么安装 bash-completion

2023-10-24 Study 喵小六

公司服务器没有 root 权限用起来确实比较难受。

我们今天来安装 bash-completion。

  1. 下载 bash-completion 源码
wget https://github.com/scop/bash-completion/releases/download/2.11/bash-completion-2.11.tar.xz
  1. 解压
tar -xvf bash-completion-2.11.tar.xz
  1. 进入目录
cd bash-completion-2.11
  1. (optional) autoreconf
autoreconf -i      # if not installing from prepared release tarball
  1. 修改 config 目录和 data 目录,原来为 /etc/local/share
./configure --sysconfdir=$HOME/.config --datadir=$HOME/.local/share
  1. 执行安装
make               # GNU make required
make check         # optional
make install       # as root
make installcheck  # optional, requires python3 with pytest >= 3.6, pexpect