Skip to content

Instantly share code, notes, and snippets.

@warking
Last active August 19, 2023 19:26
Show Gist options
  • Save warking/c9a9e6fb5938fbe8ff20 to your computer and use it in GitHub Desktop.
Save warking/c9a9e6fb5938fbe8ff20 to your computer and use it in GitHub Desktop.

Revisions

  1. warking revised this gist Dec 23, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion install_linuxbrew_on_centos7.sh
    Original file line number Diff line number Diff line change
    @@ -43,7 +43,8 @@ brew unlink gcc && brew link gcc
    export HOMEBREW_CC=gcc

    # Install core libraries and utilities
    brew install bzip2 curl expat git
    brew install bzip2 curl expat
    brew install git --with-brewed-curl --with-brewed-openssl --without-tcl-tk
    brew tap homebrew/dupes
    brew install coreutils findutils gawk gnu-sed gnu-which grep libpng libxml2 libxslt make ncurses readline
    PATH=`brew --prefix`/bin:`brew --prefix`/sbin
  2. warking revised this gist Dec 23, 2015. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion install_linuxbrew_on_centos7.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    # Non-root account is recommended for this process

    # centos-specific prepration
    sudo yum -y groupinstall 'Development Tools' && sudo yum -y install curl irb m4 ruby
    sudo yum -y update && sudo yum -y groupinstall 'Development Tools' && sudo yum -y install curl irb m4 ruby

    # Sanitize the environment
    PATH=~/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin
  3. warking renamed this gist Dec 23, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. warking revised this gist Dec 23, 2015. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -39,7 +39,8 @@ brew install patchelf
    ln -s /usr/lib64/libstdc++.so.6 /lib64/libgcc_s.so.1 `brew --prefix`/lib/
    brew install gcc --with-glibc -v
    rm -f ~/.linuxbrew/lib/{libstdc++.so.6,libgcc_s.so.1}
    brew link gcc
    brew unlink gcc && brew link gcc
    export HOMEBREW_CC=gcc

    # Install core libraries and utilities
    brew install bzip2 curl expat git
  5. warking created this gist Dec 23, 2015.
    54 changes: 54 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,54 @@
    # Non-root account is recommended for this process

    # centos-specific prepration
    sudo yum -y groupinstall 'Development Tools' && sudo yum -y install curl irb m4 ruby

    # Sanitize the environment
    PATH=~/.linuxbrew/bin:/usr/local/bin:/usr/bin:/bin
    unset LD_LIBRARY_PATH PKG_CONFIG_PATH

    # install linuxbrew
    git clone https://github.com/Homebrew/linuxbrew.git ~/.linuxbrew

    ln -s $(which gcc) `brew --prefix`/bin/gcc-$(gcc -dumpversion |cut -d. -f1,2)
    ln -s $(which g++) `brew --prefix`/bin/g++-$(g++ -dumpversion |cut -d. -f1,2)
    ln -s $(which gfortran) `brew --prefix`/bin/gfortran-$(gfortran -dumpversion |cut -d. -f1,2)

    brew doctor

    mkdir `brew --prefix`/lib
    #ln -s ~/.linuxbrew/lib ~/.linuxbrew/lib64
    #ln -s /usr/lib64/libstdc++.so.6 /lib64/libgcc_s.so.1 ~/.linuxbrew/lib/

    # install glibc
    brew install glibc
    brew remove binutils
    brew unlink glibc
    #ln -s lib `brew --prefix`/lib64
    ln -s `brew --prefix`/lib `brew --prefix`/lib64

    # install zlib
    brew install https://raw.githubusercontent.com/Homebrew/homebrew-dupes/master/zlib.rb

    # install binutils
    brew install binutils

    # install gcc
    brew link glibc
    brew install patchelf
    ln -s /usr/lib64/libstdc++.so.6 /lib64/libgcc_s.so.1 `brew --prefix`/lib/
    brew install gcc --with-glibc -v
    rm -f ~/.linuxbrew/lib/{libstdc++.so.6,libgcc_s.so.1}
    brew link gcc

    # Install core libraries and utilities
    brew install bzip2 curl expat git
    brew tap homebrew/dupes
    brew install coreutils findutils gawk gnu-sed gnu-which grep libpng libxml2 libxslt make ncurses readline
    PATH=`brew --prefix`/bin:`brew --prefix`/sbin

    # create symbol links
    ln -s ncursesw/curses.h ncursesw/form.h ncursesw/ncurses.h ncursesw/term.h ncursesw/termcap.h `brew --prefix`/include
    ln -s libncurses.a `brew --prefix`/lib/libcurses.a
    ln -s libncurses.so `brew --prefix`/lib/libcurses.so