[TUTO] Cara Install C++ pada vps

Minggu, 18 April 2010

[TUTO] Cara Install C++ pada vps

Ketika anda ingin menginstall sesuatu dan meng compile atau configurasi anda menemukan pesan error kurang lebih seperti ini:
"*******: error: C++ compiler cannot create executables"
nah sebetulnya kenapa sih?? apa vps kita jelek? murahann, atau apa?? kurang lengkap begitu :P sebetulnya masalahnya bukan pada murahan atau kurang lengkap, hanya saja C++ pada vps sampeyan belum di install, maka dari itu error :D kenapa begitu? karena murahan :D karena gak lengkap :P yang betul karena belum di install,, lalu bagaimana cara install nya?? sangat mudah,, silahkan login (kusus root) kalau bukan root alias user (yang tidak punya akses) sampeyan bisa bilang dan suruh sama yang punya root atau yang kasih sampeyan user :D
jika sudah siap silahkan anda mulai, cukup mudah ketik saja ini:
yum install gcc-c++
tunggu proses nya, ini download dan menginstall (cukup lama tergantung kualitas vps anda) anda bisa bersantai duduk dan melihat, nanti akan muncul seperti ini:

[root@la ~]# yum install gcc-c++
Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: mirror.steadfast.net
 * extras: reflector.westga.edu
 * updates: ftpmirror.your.org
base                                                     | 3.7 kB     00:00
base/primary_db                                          | 4.4 MB     00:01
extras                                                   | 3.4 kB     00:00
extras/primary_db                                        |  19 kB     00:00
updates                                                  | 3.4 kB     00:00
updates/primary_db                                       | 2.6 MB     00:23
vz-base                                                  |  951 B     00:00
vz-updates                                               |  951 B     00:00
vz-updates/primary                                       | 1.7 kB     00:00
vz-updates                                                                  4/4
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package gcc-c++.x86_64 0:4.4.7-4.el6 will be installed
--> Processing Dependency: libstdc++-devel = 4.4.7-4.el6 for package: gcc-c++-4.
4.7-4.el6.x86_64
--> Processing Dependency: libstdc++ = 4.4.7-4.el6 for package: gcc-c++-4.4.7-4.
el6.x86_64
--> Processing Dependency: gcc = 4.4.7-4.el6 for package: gcc-c++-4.4.7-4.el6.x8
6_64
--> Processing Dependency: libmpfr.so.1()(64bit) for package: gcc-c++-4.4.7-4.el
6.x86_64
--> Running transaction check
---> Package gcc.x86_64 0:4.4.7-4.el6 will be installed
--> Processing Dependency: libgomp = 4.4.7-4.el6 for package: gcc-4.4.7-4.el6.x8
6_64
--> Processing Dependency: cpp = 4.4.7-4.el6 for package: gcc-4.4.7-4.el6.x86_64
--> Processing Dependency: libgcc >= 4.4.7-4.el6 for package: gcc-4.4.7-4.el6.x8
6_64
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc-4.4.7-4.el6
.x86_64
--> Processing Dependency: cloog-ppl >= 0.15 for package: gcc-4.4.7-4.el6.x86_64
---> Package libstdc++.i686 0:4.4.7-3.el6 will be updated
---> Package libstdc++.x86_64 0:4.4.7-3.el6 will be updated
---> Package libstdc++.i686 0:4.4.7-4.el6 will be an update
---> Package libstdc++.x86_64 0:4.4.7-4.el6 will be an update
---> Package libstdc++-devel.x86_64 0:4.4.7-4.el6 will be installed
---> Package mpfr.x86_64 0:2.4.1-6.el6 will be installed
--> Running transaction check
---> Package cloog-ppl.x86_64 0:0.15.7-1.2.el6 will be installed
--> Processing Dependency: libppl_c.so.2()(64bit) for package: cloog-ppl-0.15.7-
1.2.el6.x86_64
--> Processing Dependency: libppl.so.7()(64bit) for package: cloog-ppl-0.15.7-1.
2.el6.x86_64
---> Package cpp.x86_64 0:4.4.7-4.el6 will be installed
---> Package glibc-devel.x86_64 0:2.12-1.132.el6 will be installed
--> Processing Dependency: glibc-headers = 2.12-1.132.el6 for package: glibc-dev
el-2.12-1.132.el6.x86_64
---> Package libgcc.i686 0:4.4.7-3.el6 will be updated
---> Package libgcc.x86_64 0:4.4.7-3.el6 will be updated
---> Package libgcc.i686 0:4.4.7-4.el6 will be an update
---> Package libgcc.x86_64 0:4.4.7-4.el6 will be an update
---> Package libgomp.x86_64 0:4.4.7-3.el6 will be updated
---> Package libgomp.x86_64 0:4.4.7-4.el6 will be an update
--> Running transaction check
---> Package glibc.i686 0:2.12-1.107.el6_4.4 will be updated
--> Processing Dependency: glibc = 2.12-1.107.el6_4.4 for package: glibc-common-
2.12-1.107.el6_4.4.x86_64
---> Package glibc.x86_64 0:2.12-1.107.el6_4.4 will be updated
---> Package glibc.i686 0:2.12-1.132.el6 will be an update
---> Package glibc.x86_64 0:2.12-1.132.el6 will be an update
---> Package glibc-headers.x86_64 0:2.12-1.132.el6 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.
12-1.132.el6.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.132.
el6.x86_64
---> Package ppl.x86_64 0:0.10.2-11.el6 will be installed
--> Running transaction check
---> Package glibc-common.x86_64 0:2.12-1.107.el6_4.4 will be updated
---> Package glibc-common.x86_64 0:2.12-1.132.el6 will be an update
---> Package kernel-headers.x86_64 0:2.6.32-431.11.2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package              Arch        Version                    Repository    Size
================================================================================
Installing:
 gcc-c++              x86_64      4.4.7-4.el6                base         4.7 M
Installing for dependencies:
 cloog-ppl            x86_64      0.15.7-1.2.el6             base          93 k
 cpp                  x86_64      4.4.7-4.el6                base         3.7 M
 gcc                  x86_64      4.4.7-4.el6                base          10 M
 glibc-devel          x86_64      2.12-1.132.el6             base         978 k
 glibc-headers        x86_64      2.12-1.132.el6             base         608 k
 kernel-headers       x86_64      2.6.32-431.11.2.el6        updates      2.8 M
 libstdc++-devel      x86_64      4.4.7-4.el6                base         1.6 M
 mpfr                 x86_64      2.4.1-6.el6                base         157 k
 ppl                  x86_64      0.10.2-11.el6              base         1.3 M
Updating for dependencies:
 glibc                i686        2.12-1.132.el6             base         4.3 M
 glibc                x86_64      2.12-1.132.el6             base         3.8 M
 glibc-common         x86_64      2.12-1.132.el6             base          14 M
 libgcc               i686        4.4.7-4.el6                base         112 k
 libgcc               x86_64      4.4.7-4.el6                base         101 k
 libgomp              x86_64      4.4.7-4.el6                base         118 k
 libstdc++            i686        4.4.7-4.el6                base         300 k
 libstdc++            x86_64      4.4.7-4.el6                base         293 k

Transaction Summary
================================================================================
Install      10 Package(s)
Upgrade       8 Package(s)
Total download size: 49 M
Is this ok [y/N]: y < jawab "y"
Downloading Packages:
(1/18): cloog-ppl-0.15.7-1.2.el6.x86_64.rpm              |  93 kB     00:00
(2/18): cpp-4.4.7-4.el6.x86_64.rpm                       | 3.7 MB     00:01
(3/18): gcc-4.4.7-4.el6.x86_64.rpm                       |  10 MB     00:02
(4/18): gcc-c++-4.4.7-4.el6.x86_64.rpm                   | 4.7 MB     00:01
(5/18): glibc-2.12-1.132.el6.i686.rpm                    | 4.3 MB     00:01
(6/18): glibc-2.12-1.132.el6.x86_64.rpm                  | 3.8 MB     00:01
(7/18): glibc-common-2.12-1.132.el6.x86_64.rpm           |  14 MB     00:03
(8/18): glibc-devel-2.12-1.132.el6.x86_64.rpm            | 978 kB     00:00
(9/18): glibc-headers-2.12-1.132.el6.x86_64.rpm          | 608 kB     00:00
(10/18): kernel-headers-2.6.32-431.11.2.el6.x86_64.rpm
(11/18): libgcc-4.4.7-4.el6.i686.rpm
(12/18): libgcc-4.4.7-4.el6.x86_64.rpm
(13/18): libgomp-4.4.7-4.el6.x86_64.rpm
(14/18): libstdc++-4.4.7-4.el6.i686.rpm
(15/18): libstdc++-4.4.7-4.el6.x86_64.rpm
(16/18): libstdc++-devel-4.4.7-4.el6.x86_64.rpm
(17/18): mpfr-2.4.1-6.el6.x86_64.rpm
(18/18): ppl-0.10.2-11.el6.x86_64.rpm                    | 1.3 MB     00:00
--------------------------------------------------------------------------------
Total                                           370 kB/s |  49 MB     02:16
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating   : libgcc-4.4.7-4.el6.x86_64                                   1/26
  Updating   : glibc-common-2.12-1.132.el6.x86_64                          2/26
  Updating   : glibc-2.12-1.132.el6.x86_64                                 3/26
  Updating   : libstdc++-4.4.7-4.el6.x86_64                                4/26
  Installing : mpfr-2.4.1-6.el6.x86_64                                     5/26
  Installing : cpp-4.4.7-4.el6.x86_64                                      6/26
  Installing : libstdc++-devel-4.4.7-4.el6.x86_64                          7/26
  Installing : ppl-0.10.2-11.el6.x86_64                                    8/26
  Installing : cloog-ppl-0.15.7-1.2.el6.x86_64                             9/26
  Updating   : libgomp-4.4.7-4.el6.x86_64                                 10/26
  Installing : kernel-headers-2.6.32-431.11.2.el6.x86_64                  11/26
  Installing : glibc-headers-2.12-1.132.el6.x86_64                        12/26
  Installing : glibc-devel-2.12-1.132.el6.x86_64                          13/26
  Installing : gcc-4.4.7-4.el6.x86_64                                     14/26
  Updating   : glibc-2.12-1.132.el6.i686                                  15/26
  Updating   : libgcc-4.4.7-4.el6.i686                                    16/26
  Installing : gcc-c++-4.4.7-4.el6.x86_64                                 17/26
  Updating   : libstdc++-4.4.7-4.el6.i686                                 18/26
  Cleanup    : libstdc++-4.4.7-3.el6                                      19/26
  Cleanup    : glibc-2.12-1.107.el6_4.4                                   20/26
  Cleanup    : libstdc++-4.4.7-3.el6                                      21/26
  Cleanup    : libgomp-4.4.7-3.el6.x86_64                                 22/26
  Cleanup    : libgcc-4.4.7-3.el6                                         23/26
  Cleanup    : glibc-common-2.12-1.107.el6_4.4.x86_64                     24/26
  Cleanup    : glibc-2.12-1.107.el6_4.4                                   25/26
  Cleanup    : libgcc-4.4.7-3.el6                                         26/26
  Verifying  : glibc-2.12-1.132.el6.x86_64                                 1/26
  Verifying  : glibc-devel-2.12-1.132.el6.x86_64                           2/26
  Verifying  : libgcc-4.4.7-4.el6.i686                                     3/26
  Verifying  : glibc-headers-2.12-1.132.el6.x86_64                         4/26
  Verifying  : libstdc++-4.4.7-4.el6.x86_64                                5/26
  Verifying  : kernel-headers-2.6.32-431.11.2.el6.x86_64                   6/26
  Verifying  : libstdc++-devel-4.4.7-4.el6.x86_64                          7/26
  Verifying  : cpp-4.4.7-4.el6.x86_64                                      8/26
  Verifying  : mpfr-2.4.1-6.el6.x86_64                                     9/26
  Verifying  : glibc-2.12-1.132.el6.i686                                  10/26
  Verifying  : glibc-common-2.12-1.132.el6.x86_64                         11/26
  Verifying  : gcc-c++-4.4.7-4.el6.x86_64                                 12/26
  Verifying  : cloog-ppl-0.15.7-1.2.el6.x86_64                            13/26
  Verifying  : libstdc++-4.4.7-4.el6.i686                                 14/26
  Verifying  : libgomp-4.4.7-4.el6.x86_64                                 15/26
  Verifying  : gcc-4.4.7-4.el6.x86_64                                     16/26
  Verifying  : ppl-0.10.2-11.el6.x86_64                                   17/26
  Verifying  : libgcc-4.4.7-4.el6.x86_64                                  18/26
  Verifying  : libgcc-4.4.7-3.el6.i686                                    19/26
  Verifying  : libstdc++-4.4.7-3.el6.x86_64                               20/26
  Verifying  : glibc-common-2.12-1.107.el6_4.4.x86_64                     21/26
  Verifying  : libstdc++-4.4.7-3.el6.i686                                 22/26
  Verifying  : libgcc-4.4.7-3.el6.x86_64                                  23/26
  Verifying  : glibc-2.12-1.107.el6_4.4.x86_64                            24/26
  Verifying  : glibc-2.12-1.107.el6_4.4.i686                              25/26
  Verifying  : libgomp-4.4.7-3.el6.x86_64                                 26/26

Installed:
  gcc-c++.x86_64 0:4.4.7-4.el6

Dependency Installed:
  cloog-ppl.x86_64 0:0.15.7-1.2.el6
  cpp.x86_64 0:4.4.7-4.el6
  gcc.x86_64 0:4.4.7-4.el6
  glibc-devel.x86_64 0:2.12-1.132.el6
  glibc-headers.x86_64 0:2.12-1.132.el6
  kernel-headers.x86_64 0:2.6.32-431.11.2.el6
  libstdc++-devel.x86_64 0:4.4.7-4.el6
  mpfr.x86_64 0:2.4.1-6.el6
  ppl.x86_64 0:0.10.2-11.el6

Dependency Updated:
  glibc.i686 0:2.12-1.132.el6               glibc.x86_64 0:2.12-1.132.el6
  glibc-common.x86_64 0:2.12-1.132.el6      libgcc.i686 0:4.4.7-4.el6
  libgcc.x86_64 0:4.4.7-4.el6               libgomp.x86_64 0:4.4.7-4.el6
  libstdc++.i686 0:4.4.7-4.el6              libstdc++.x86_64 0:4.4.7-4.el6

Complete!
Oke selesai :)
Semoga bermanfaat temans ;)

Tulisan yang banyak dilihat bulan ini