0

I have installed the rpm of 18c express edition. But while configuring the database Iam getting the below error

root@venky:/opt/oracle/cfgtoollogs/dbca# /etc/init.d/oracle-xe-18c configure
/etc/init.d/oracle-xe-18c: line 488: /bin/awk: No such file or directory
/bin/df: unrecognized option '--direct'
Try '/bin/df --help' for more information.
Specify a password to be used for database accounts. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
 Note that the same password will be used for SYS, SYSTEM and PDBADMIN accounts:

Confirm the password:

Configuring Oracle Listener.

/opt/oracle/product/18c/dbhomeXE/bin/netca: 1: /opt/oracle/product/18c/dbhomeXE/bin/platform_common: /opt/oracle/product/18c/dbhomeXE/bin/netca: 1: /opt/oracle/product/18c/dbhomeXE/bin/platform_common: /bin/awk: not found/bin/awk: not found

Error: Could not find or load main class oracle.net.ca.NetCA
Listener configuration failed. Check log '/opt/oracle/cfgtoollogs/netca/netca_configure_out.log' for more details.
root@venky:/opt/oracle/cfgtoollogs/dbca# 
Terrance
  • 41,612
  • 7
  • 124
  • 183
venky513
  • 163
  • 1
  • 2
  • 5

1 Answers1

0

This is what I tried to indicate in my comment on your other question, when I mentioned package dependencies, libraries, etc.

In CentOS and RHEL at the least, the awk program exists at /bin/awk. In Ubuntu default, it's in /usr/bin/awk Because the RPM uses hard-coded paths, the chances are this is not the only executable you will have problems with.

To this end, you can either do this the 'hackish' way, or the 'safer' way.


The Hackish Way - This will be a headache

As you continue through running, when you encounter a missing program with a hardcoded path, in a separate command line attempt to run the program without the path. If the program exists, then run which PROGRAM (such as which awk). This will give you a file path location.

The reason this is hackish is it alters where things're 'installed' slightly. Create a symlink with sudo to the proper location that the RPM is seeking. In this case of awk, it wants /bin/awk.

sudo ln -s $(which awk) /bin/awk

This is the example for awk. These will alter radically depending on what exact commands are missing.

Note that I do not suggest you do this method. Because it could affect how other programs on your system behave in a non-intended and painful way.


The safe way - use a VM in VirtualBox or a CentOS LXD image

Both of these methods require the installation of additional software.

In essence, this would put a CentOS image - which the RPMs will work with much more safely than Ubuntu - in either an LXD-based container or in a VM on your system. There are multiple other guides on how to do this safely on other sites (we don't support CentOS on Ask Ubuntu), however.

But, this is the safer method. You can then establish connectivity into this system separately in a way that won't harm your Ubuntu system or affect how it runs or boots.

Thomas Ward
  • 74,764
  • iam trying to install oracle 18c xe on 18.04 . I have been facing lot of issues. BUt i do need the db to be installed on my os rather than virtualbox . anywork arounds? the above thardway didnt solve the issue – venky513 Nov 25 '18 at 20:24
  • @venky513 Unfortunately, no, there's no special workarounds. Once you tried, did you close your terminal and reopen it? What happens when you attempt the first workaround? (Note the comment I made previously still stands today, RPMs are not built for Ubuntu compatibility) – Thomas Ward Nov 26 '18 at 00:10
  • I endorse a virtual machine approach. – mondotofu Apr 03 '22 at 21:52