Tag Archives: linux

Solving gcc in linux64 – -static-libgcc-B/usr/lib/gcc/i386-redhat-linux6E/4.4.0


Recently i wanted to install php and apache on Oracle Enterprise linus which was upgraded to linux64.

When I tried the solution given in

http://www.lamphowto.com/

http://wiki.apache.org/tomcat/UsingPhp

http://dan.drydog.com/apache2php.html

I keep getting the following error when I

make
or
make install

the error is like

#> gcc
gcc.orig: unrecognized option '-static-libgcc-B/usr/lib/gcc/i386-redhat-linux6E/4.4.0'
gcc.orig: no input files

This clearly proves that there is a problem in the linux64
I tried all possible tricks on earth but could get away with it.
Finally i tried the following and it worked..

#> which gcc
#> /usr/bin/gcc
#> ls /usr/bin/gcc*
#> gcc gcc34 gcc41 gccmakedep gcc44 gcc.orig
#> mv /usr/bin/gcc /usr/bin/gcc_old
#> mv /usr/bin/gcc34 /usr/bin/gcc
#> gcc: no input files

forgot root password? – give this a try



ade:[ xxx_standalone ] $ sudo passwd

Password:

Changing password for user root.

New UNIX password:

Retype new UNIX password:

passwd: all authentication tokens updated successfully.

ade:[ xxx_standalone ] $ su

Password:

[root@xxx_machine]#

Commands used to install XE for LINUX


Download the file from here

go to the installation folder of the rpm file

login as a root

root# rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm

to remove the previous installation use

root# rpm -e oracle-xe-univ-10.2.0.1-1.0.i386

root# /etc/init.d/oracle-xe configure
------------------------------------------------------------------------------

[root@indl144224 Desktop]# rpm -ivh oracle-xe-univ-10.2.0.1-1.0.i386.rpm

Preparing...                ########################################### [100%]

1:oracle-xe-univ         ########################################### [100%]

Executing Post-install steps...

You must run '/etc/init.d/oracle-xe configure' as the root user to

configure the database.

[root@indl144224 Desktop]# /etc/init.d/oracle-xe configure

------------------------------------------------------------------------------

user is prompted to configure http port, listener port, and the password for SYs and SYSTEM user

[its better to change to avoid any error in the future]

Oracle Database 10g Express Edition Configuration

-------------------------------------------------

This will configure on-boot properties of Oracle Database 10g Express

Edition.  The following questions will determine whether the database should

be starting upon system boot, the ports it will use, and the passwords that

will be used for database accounts.  Press <Enter> to accept the defaults.

Ctrl-C will abort.

Specify the HTTP port that will be used for Oracle Application Express [8080]:8081

Specify a port that will be used for the database listener [1521]:1522

Specify a password to be used for database accounts.  Note that the same

password will be used for SYS and SYSTEM.  Oracle recommends the use of

different passwords for each database account.  This can be done after

initial configuration:

Confirm the password:

Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:n

Starting Oracle Net Listener...Done

Configuring Database...Done

Starting Oracle Database 10g Express Edition Instance...Done

Installation Completed Successfully.

To access the Database Home Page go to "http://127.0.0.1:8081/apex"

------------------------------------------------------------------------------

export $ORACLE_HOME and $ORACLE_SID

------------------------------------------------------------------------------

[root@indl144224 Desktop]# export ORACLE_HOME=/usr/lib/oracle/xe/

app/     oradata/

[root@indl144224 Desktop]# export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server

[root@indl144224 Desktop]# export ORACLE_SID=XE

[root@indl144224 Desktop]# cd /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/

------------------------------------------------------------------------------

Check the tns lsitener status

------------------------------------------------------------------------------

[root@indl144224 bin]# ./lsnrctl

LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 30-AUG-2010 17:53:57

Copyright (c) 1991, 2005, Oracle.  All rights reserved.

Welcome to LSNRCTL, type "help" for information.

LSNRCTL> status

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Production

Start Date                30-AUG-2010 17:40:21

Uptime                    0 days 0 hr. 13 min. 39 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Default Service           XE

Listener Parameter File   /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora

Listener Log File         /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log

Listening Endpoints Summary...

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=indl144224.idc.oracle.com)(PORT=1522)))

(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=8081))(Presentation=HTTP)(Session=RAW))

Services Summary...

Service "PLSExtProc" has 1 instance(s).

Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...

Service "XE" has 1 instance(s).

Instance "XE", status READY, has 1 handler(s) for this service...

Service "XEXDB" has 1 instance(s).

Instance "XE", status READY, has 1 handler(s) for this service...

Service "XE_XPT" has 1 instance(s).

Instance "XE", status READY, has 1 handler(s) for this service...

The command completed successfully

LSNRCTL> exit