0. 安装GO
1. 设置GO环境
go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy.cn,direct
避免错误:
dial tcp 142.250.73.145:443: i/o timeout
(Go development environment cannot connect to the default Google Go module proxy (proxy.golang.org). The IP address 142.250.73.145 belongs to Google, and port 443 is used for secure HTTPS traffic. This block typically happens due to network restrictions, firewalls, or regional censorship (such as the Great Firewall of China))
2. 下载apptainer及依赖包
git clone https://github.com/apptainer/apptainer.git
cd apptainer
git checkout v1.5.1
#### 在网络好的机器下载依赖包
go mod vendor
3. 将下载好的源代码和依赖包移到网络不好的机器
4. 在目标机器安装apptainer
目标机器保持1的环境变量
./mconfig --prefix=`pwd`/mybuild --without-suid
cd $(/bin/pwd)/builddir
make
make install

1454

被折叠的 条评论
为什么被折叠?



