Showing posts with label CentOS 4.6. Show all posts
Showing posts with label CentOS 4.6. Show all posts

Monday, May 1, 2017

How To Compile a C++ Source Code in CentOS

  • Linux (CentOS)
    • g++ <source code>
      • g++ foo.c where foo.c is the source code, output will be a.out
    • g++ -o <output> <source code>
      • g++ -o foo foo.c where foo is executable, and foo.c is the source code

Monday, March 7, 2016

How to Install GIT on CentOS (4.6)

Installing GIT on CentOS 4.6
The version that works for me is v1.7.8.1
I tried the latest version (as of this writing) v2.7 but I kept failing on ./configure

Here are the steps:

$ wget http://git-core.googlecode.com/files/git-1.7.8.1.tar.gz
$ tar xvzf git-1.7.8.1.tar.gz
$ cd git-1.7.8.1
$ ./configure
$ make
$ make install

In case our are prompted to install required libraries GIT has dependency on, run the below command to install them:

$ sudo yum install curl-devel expat-devel gettext-devel openssl-devel perl-devel zlib-devel



If you are having trouble with yum, maybe you need to reconfigure your yum. Do the following:

1. Open /etc/yum.repos.d/CentOS-Base.repo in an editor
2. Comment out the "mirrorlist" entries.
3. Uncomment the "baseurl" entries and change them to http://vault.centos.org/4.9/os/$basearch