Skip to content

Instantly share code, notes, and snippets.

@jonathantneal
Last active November 5, 2022 17:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonathantneal/09ad743ee3222c9be703343bf95b5c0e to your computer and use it in GitHub Desktop.
Save jonathantneal/09ad743ee3222c9be703343bf95b5c0e to your computer and use it in GitHub Desktop.
Installing Apps on M1

Before Starting

Install Command Line Tools for macOS:

xcode-select --install

Quick Installs

Quick Install Git

zsh -c "$(curl -fsSL http://jsxtools.com/curl/git)"

Quick Install Node

zsh -c "$(curl -fsSL http://jsxtools.com/curl/node)"

Instructions

These are the terminal commands required to manually install Git and its dependencies on macOS.

These instructions have been verified on a MacBook Pro (13-inch, M1, 2020) with an Apple M1 chip running macOS 11.0.

Git Node GPG

Git

Install autoconf

CFLAGS="-arch arm64" CXXFLAGS=$CFLAGS
curl -#OL https://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar xf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure
make
sudo make install

Verify autoconf

which autoconf
autoconf --version

Install Automake

CFLAGS="-arch arm64" CXXFLAGS=$CFLAGS
curl -#OL https://ftp.gnu.org/gnu/automake/automake-1.16.3.tar.gz
tar xf automake-1.16.3.tar.gz
cd automake-1.16.3
./configure
make
sudo make install

Verify Automake

which automake
automake --version

Install libtool

CFLAGS="-arch arm64" CXXFLAGS=$CFLAGS
curl -#OL https://ftp.gnu.org/gnu/libtool/libtool-2.4.2.tar.gz
tar xf libtool-2.4.2.tar.gz
cd libtool-2.4.2
./configure
make
sudo make install

Verify libtool

which libtool
libtool --version

Install Git

CFLAGS="-arch arm64" CXXFLAGS=$CFLAGS
curl -#OL https://github.com/git/git/archive/v2.29.2.tar.gz
tar xf v2.29.2.tar.gz
cd git-2.29.2
make configure
./configure
make
sudo make install

Verify Git

which git
git --version

Node

CFLAGS="-arch arm64" CXXFLAGS=$CFLAGS
curl -#OL https://nodejs.org/dist/v15.2.1/node-v15.2.1.tar.gz
tar xf node-v15.2.1.tar.gz
cd node-v15.2.1
./configure
BACKUP_PATH=$PATH PATH=/usr/bin:$PATH
make -j4
sudo make install
PATH=$BACKUP_PATH

Verify Node

which node
node --version

GPG

curl -#OL https://gnupg.org/ftp/gcrypt/npth/npth-1.6.tar.bz2
curl -#OL https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.39.tar.gz
curl -#OL https://gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-1.8.7.tar.bz2
curl -#OL https://gnupg.org/ftp/gcrypt/libksba/libksba-1.5.0.tar.bz2
curl -#OL https://gnupg.org/ftp/gcrypt/libassuan/libassuan-2.5.4.tar.bz2
curl -#OL https://gnupg.org/ftp/gcrypt/pinentry/pinentry-1.1.0.tar.bz2
curl -#OL https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.2.24.tar.bz2

tar xf npth-1.6.tar.bz2 && cd npth-1.6 && ./configure && make && sudo make install && cd ..
tar xf libgpg-error-1.39.tar.gz && cd libgpg-error-1.39 && ./configure && make && sudo make install && cd ..
tar xf libgcrypt-1.8.7.tar.bz2 && cd libgcrypt-1.8.7 && ./configure && make && sudo make install && cd ..
tar xf libksba-1.5.0.tar.bz2 && cd libksba-1.5.0 && ./configure && make && sudo make install && cd ..
tar xf libassuan-2.5.4.tar.bz2 && cd libassuan-2.5.4 && ./configure && make && sudo make install && cd ..
tar xf pinentry-1.1.0.tar.bz2 && cd pinentry-1.1.0 && ./configure && make && sudo make install && cd ..
tar xf gnupg-2.2.24.tar.bz2 && cd gnupg-2.2.24 && ./configure && make && sudo make install && cd ..

Verify GPG

which gpg
gpg --version
@reyhanmenetlioglu
Copy link

Hi! Now i am trying this codes to use git/github with pycharm cuz i couldn't see git option in VCS/ Pycharm. Do you have any idea?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment