如何使用 wget 在 unix 上安装 git?

How can I install git on unix using wget?

如何使用 wget 在 unix 上安装 git?

我试过了

 wget http://github-media-downloads.s3.amazonaws.com/osx/git-credential-osxkeychain.

然后我将其移至 /usr/bin 但 git 配置命令失败。

我也试过了 wget --no-check-certificate -q https://github.com/joyent/node/tarball/v0.7.1

wget: error getting response: No such file or directory

我正在 raspberrypi 上开发 Yocto poky 2.1.3 发行版映像并尝试安装 git。我的箱子里没有 apt 包。所以剩下的选项只有 wget.

我的猜测是您必须从源代码下载、构建和安装

wget https://github.com/git/git/archive/v2.17.1.tar.gz
tar zxvf v2.17.1.tar.gz
cd git # or whatever directory the tar.gz file contains
./configure
make
make install

或者类似的东西。

我建议开始使用 Yocto 中可用的安装包方式,有一个专用变量允许添加包以便安装到映像 IMAGE_INSTALL ,只需将此行添加到您的 conf/local.conf 文件中:

IMAGE_INSTALL_append = " git"