如何在 Ubuntu 26.04 上安装 robotpkg 仓库

本指南介绍如何在 Ubuntu 26.04 上使用新的仓库格式安装 robotpkg 仓库。

install-robotpkg-repository.sh
sudo mkdir -p /usr/share/keyrings && \
sudo curl -sS https://robotpkg.openrobots.org/packages/debian/robotpkg.asc -o /usr/share/keyrings/robotpkg.asc && \
sudo tee /etc/apt/sources.list.d/robotpkg.sources <<EOF && \
Types: deb
URIs: http://robotpkg.openrobots.org/packages/debian/pub
Suites: $(lsb_release -cs)
Components: robotpkg
Architectures: amd64
Signed-By: /usr/share/keyrings/robotpkg.asc
EOF
sudo apt update && \
SHELL_RC="$HOME/.$(basename $SHELL)rc" && \
if [ -f "$SHELL_RC" ]; then
  printf "\n# RobotPKG Paths\nexport PATH=/opt/openrobots/bin:\$PATH\nexport LD_LIBRARY_PATH=/opt/openrobots/lib:\$LD_LIBRARY_PATH\n" >> "$SHELL_RC"
  echo "已将路径添加到 $SHELL_RC"
  export PATH=/opt/openrobots/bin:$PATH
  export LD_LIBRARY_PATH=/opt/openrobots/lib:$LD_LIBRARY_PATH
else
  echo "无法自动检测 RC 文件。请手动将路径添加到你的 shell 配置中。"
fi

Check out similar posts by category: Linux, Robotics