Last active
June 24, 2017 19:58
-
-
Save minhoryang/ab8d3c05afb4055632b3 to your computer and use it in GitHub Desktop.
RELEASE Tiny Lecture: INSTALL GIT BINARY WITHOUT ROOT/SUDOER @ UBUNTU
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mkdir /tmp/git | |
pushd /tmp/git | |
# 1. download git | |
apt-get source git | |
pushd git-* | |
# 2. build and install git | |
./configure --prefix=$HOME/.local/`uname -m`/ # want to install git for my home directory. | |
make | |
make install # Now you can reach git at ~/.local/`uname -m`/bin/git | |
pushd ~/ | |
git clone https://github.com/minhoryang/minhoryang.github.io.git | |
# but failed, no https supported! | |
popd | |
./configure --prefix=$HOME/.local/`uname -m`/ | tee /tmp/git_install.log | |
# "checking for curl_global_init in -lcurl... no" | |
# but we need to use curl for https | |
popd | |
apt-get source libcurl4-openssl-dev | |
pushd curl-* | |
./configure --prefix=$HOME/.local/`uname -m`/ | |
make | |
make install | |
# success! | |
# ~/.local/`uname -m`/lib/libcurl.so | |
# ~/.local/`uname -m`/include/curl.h | |
popd | |
pushd git-* | |
./configure --prefix=$HOME/.local/`uname -m`/ | |
# still not finding "libcurl" | |
LDFLAGS=-L$HOME/.local/`uname -m`/lib/ CPPFLAGS=-I$HOME/.local/`uname -m`/include/ ./configure --prefix=$HOME/.local/`uname -m`/ # FAILED | |
### IF NOT!!!!! (updated @ 20160921 by Taesung Lee) | |
./configure --prefix=$HOME/.local/`uname -m`/ --with-curl=$HOME/.local/`uname -m`/ | |
### IT WILL WORKS! | |
make | |
make install | |
pushd ~/ | |
$HOME/.local/`uname -m`/bin/git clone https://github.com/minhoryang/minhoryang.github.io.git | |
# successfully happy ending! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
checkcpuforpath () { | |
cpuinfo=`cat /proc/cpuinfo | grep "cpu family" | grep 15` | |
if [ -d ~/.local/bin ]; then | |
export PATH=~/.local/bin:$PATH | |
fi | |
if [ -d ~/.local/lib/python2.6/site-packages ]; then | |
export PYTHONPATH=/usr/lib/python2.6/:~/.local/lib/python2.6/site-packages:$PYTHONPATH | |
fi | |
if [ -n "$cpuinfo" ]; then | |
echo "Connected with cspro(1:2).sogang.ac.kr" | |
if [ -d ~/.local/bin_32 ]; then | |
export PATH=~/.local/bin_32:$PATH | |
fi | |
export PKG_CONFIG_PATH=~/.local/lib_32/pkgconfig:/usr/lib/pkgconfig | |
export LD_LIBRARY_PATH=/usr/lib/ | |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.local/lib_32 | |
if [ -d ~/.local/lib_32/python2.6/site-packages ]; then | |
export PYTHONPATH=~/.local/lib_32/python2.6/site-packages:$PYTHONPATH | |
fi | |
else | |
echo "Connected with cspro.sogang.ac.kr" | |
if [ -d ~/.local/bin_64 ]; then | |
export PATH=~/.local/bin_64:$PATH | |
fi | |
export PKG_CONFIG_PATH=~/.local/lib_64/pkgconfig:/usr/lib/pkgconfig | |
export LD_LIBRARY_PATH=/usr/lib/ | |
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:~/.local/lib_64 | |
if [ -d ~/.local/lib_64/python2.6/site-packages ]; then | |
export PYTHONPATH=~/.local/lib_64/python2.6/site-packages:$PYTHONPATH | |
fi | |
fi | |
export PATH=~/bin:$PATH | |
} |
몇일간의 고통이 해결되었네요 ㅠㅠㅠ 조만간 제 gist에도 정리해서 올려볼께요. 참고한 링크들 몽땅 모으고, 어떤 이슈 때문에 고통 받았는지...? 등등 ㅋㅋㅋㅋ
If you want to use your home directory even with mac, try this for everywhere.
$HOME/.local/`uname`/`uname -m`
@SGsupernova ㅋㅋㅋㅋㅋㅋㅋㅋㅋ 땡큐!!!!!
@SGsupernova @minhoryang
is curl necessary? what about wget?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
YOU SHOULD CHECK THIS OUT http://joemaller.com/908/how-to-install-git-on-a-shared-host/#comment-2513783741