Oracle-xe on Ubuntu 18.04 - Installation and impdp Setup:


10 GB partition ext3 mounted at /u01
5 GB swap
Oracle-xe oracle-xe-11.2.0-1.0.x86_64.rpm - installed with alien and then dpkg
Followed instructions from https://community.oracle.com/thread/2229554


Problem:

After installation I do /etc/init.d/oracle-xe configure all default values. All went well.

And what comes next? 

I have to import db.dmp.

But there isn't any db mounted. 

So I tried createdb.sh from /u01/app/oracle/product/11.2.0/xe/config/scripts

It goes well.

Next I execute sqls that creates scheme. 

Next I would like to import dump file.
But the impdp \"/ as sysdba\" schemas=DBV remap_schema=DBV:application directory=DATA_PUMP_DIR dumpfile=db.dmp logfile=db-import-$(date +%d-%b-%H_%M).log EXCLUDE=ROLE_GRANT
 reports the following:

UDI-01034: operation generated ORACLE error 1034
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
Linux-x86_64 Error: 2: No such file or directory
UDI-00003: all allowable logon attempts failed



When I execute createdb.sh and then startdb.sh impdp reports:

Import: Release 11.2.0.2.0 - Production on So Lut 23 17:55:32 2019

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Express Edition Release 11.2.0.2.0 - 64bit Production
ORA-39006: internal error
ORA-39213: Metadata processing is not available


I can connect to DB via sqldeveloper. The dump file is verified to be working.

My question is, what steps should I take after installation with dkpg to create empty oracle-xe db ready to use and import dumps?

Below I provide outputs for some commands suggested in comments:

$ ps -ef | grep smon
oracle   16930  2196  0 17:04 ?        00:00:00 xe_smon_XE
oracle   18847 14970  0 17:56 pts/0    00:00:00 grep --color=auto smon


$ env | grep ORA
ORACLE_SID=XE
ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe


SQL&gt; exec dbms_metadata_util.load_stylesheets;
BEGIN dbms_metadata_util.load_stylesheets; END;

*
ERROR at line 1:
ORA-31609: error loading file "kualter.xsl" from file system directory
"/u01/app/oracle/product/11.2.0/xe/rdbms/xml/xsl"
ORA-06512: at "SYS.DBMS_METADATA_UTIL", line 2397
ORA-06512: at line 1


SQL&gt; Select comp_id, comp_name, version from dba_registry ;

COMP_ID
--------------------------------------------------------------------------------
COMP_NAME
--------------------------------------------------------------------------------
VERSION
--------------------------------------------------------------------------------
XDB
Oracle XML Database
11.2.0.2.0

CONTEXT
Oracle Text
11.2.0.2.0

COMP_ID
--------------------------------------------------------------------------------
COMP_NAME
--------------------------------------------------------------------------------
VERSION
--------------------------------------------------------------------------------

CATALOG
Oracle Database Catalog Views
11.2.0.2.0

CATPROC
Oracle Database Packages and Types

COMP_ID
--------------------------------------------------------------------------------
COMP_NAME
--------------------------------------------------------------------------------
VERSION
--------------------------------------------------------------------------------
11.2.0.2.0
Ubuntu is not a supported distribution for running Oracle databases. Just use a supported distribution.


Operating System Requirements


The database should be configured and created with /etc/init.d/oracle-xe configure. If you do not have a working databases after that, that is an environmental issue: use a supported environment.
I had to check and run createdb.sh.  It created an incomplete database that gave the same error. Instead of it use the above method for creating the database. If it does not work: use a supported environment.


At this point you can start over and try to get the official steps working by folowing random blog posts and forum comments like above. Maybe it will work if you do not use createdb.sh. Or you can save a lot of time by using a supported environment.