安装CoqIDE时jhbuild更新失败求助
Fix for
gtk-osx-build-setup.sh Errors When Installing CoqIDE on Mac Looking at your error output, the problem comes down to two outdated parts in the setup script:
- The jhbuild repository URL has permanently moved from
git.gnome.orgto GitLab (which triggers the 301 redirect you see). - The
stablebranch referenced in the script no longer exists in the jhbuild repository.
Here are two reliable ways to fix this:
Option 1: Patch the existing setup script
- Open the
gtk-osx-build-setup.shfile in your preferred text editor (e.g.,nano gtk-osx-build-setup.sh). - Find any lines pointing to
git.gnome.orgfor the jhbuild repo, and replace that URL withhttps://gitlab.gnome.org/GNOME/jhbuild.git. - Locate commands that try to switch to the
stablebranch (likegit checkout stable), and changestabletomaster—this is now the active main branch for jhbuild. - Save the script and re-run it with
sh gtk-osx-build-setup.sh.
Option 2: Manually set up jhbuild (more straightforward)
If patching the script feels like a hassle, you can skip it entirely and set up jhbuild manually:
- Clone the up-to-date jhbuild repository:
git clone https://gitlab.gnome.org/GNOME/jhbuild.git - Move into the cloned directory:
cd jhbuild - Configure and install jhbuild to your home directory:
./autogen.sh --prefix=$HOME/gtk make && make install - Add jhbuild to your shell's PATH so it's accessible system-wide:
export PATH=$HOME/gtk/bin:$PATH - After this, you can pick up with the remaining steps from the Coq installation guide (like running
jhbuild bootstrapto install required dependencies).
Quick Pre-Requisite Check
Ensure you have Xcode Command Line Tools installed first—run xcode-select --install if you haven't already done so, as this is required for building most macOS development tools.
内容的提问来源于stack exchange,提问作者Yasmine Shaorda
相关产品推荐
相关产品推荐

