fix_apt_and_install.sh 593 B

12345678910111213
  1. #!/usr/bin/env bash
  2. set -euo pipefail
  3. export DEBIAN_FRONTEND=noninteractive
  4. SRC=/etc/apt/sources.list.d/debian.sources
  5. if [[ -f "$SRC" ]]; then
  6. sed -i 's|http://mirrors.tuna.tsinghua.edu.cn/debian-security|http://deb.debian.org/debian-security|g' "$SRC"
  7. sed -i 's|http://mirrors.tuna.tsinghua.edu.cn/debian|http://deb.debian.org/debian|g' "$SRC"
  8. fi
  9. apt-get update -qq
  10. apt-get install -y --no-install-recommends gcc g++ make python3 python3-venv python3-pip
  11. echo "python3=$(command -v python3) $(python3 --version)"
  12. echo "gcc=$(command -v gcc) $(gcc --version | head -1)"
  13. echo "INSTALL_OK"