Can not install oracle apex on GNU/Linux (db 12c) I have to install oracle apex on oracle database 12.2.0.1.0, database is on GNU/Linux server.
I followed instructions from this pages:

https://oracle-base.com/articles/misc/oracle-application-express-apex-5-0-installation#installation]

https://docs.oracle.com/cd/E71588_01/HTMIG/downloading-and-installing-OracleAE.htm#HTMIG29384]

but when i came to this step:

@apexins.sql APEX APEX TEMP /i/


I got this error:


  PL/SQL procedure successfully completed.
  
  PL/SQL procedure successfully completed.
  
  PL/SQL procedure successfully completed.
  
  Performing installation in multitenant container database in the
  background. The installation progress is spooled into apexins_cdb*.log
  files.
  
  Please wait...
  
  catcon: ALL catcon-related output will be written to
  [/u01/app/oracle/product/12.2.0/dbhome_1/apex/apexins_cdb_catcon_64683.lst]
  catcon: See
  [/u01/app/oracle/product/12.2.0/dbhome_1/apex/apexins_cdb*.log] files
  for output generated by scripts catcon: See
  [/u01/app/oracle/product/12.2.0/dbhome_1/apex/apexins_cdb_*.lst] files
  for spool files, if any validate_con_names: ORCLPDB is not open
  catconInit: Unexpected error returned by validate_con_names Unexpected
  error encountered in catconInit; exiting
  
  Installation completed. Log files for each container can be found in:
  
  apexins_cdb*.log
  
  You can quickly scan for ORA errors or compilation errors by using a
  utility like grep:
  
  grep ORA- *.log grep PLS- *.log


So i find solution for that error on this link:

https://learn-oracle-database.blogspot.com/2016/04/validateconnames-pdbseed-is-not-open.html

I have done, everything like is described on the link, and database was in this state:

SQL&gt; select name,open_mode from v$pdbs;

NAME
--------------------------------------------------------------------------------
OPEN_MODE
----------
PDB$SEED
MIGRATE

ORCLPDB
MIGRATE


And I came to final step, and executed this order:

$ORACLE_HOME/perl/bin/perl catcon.pl -d $ORACLE_HOME/rdbms/admin /tmp/utl32k_output utl32k.sql


Then I got this error message:


  /u01/app/oracle/product/12.2.0/dbhome_1/rdbms/admin/tmp/utl32k_output_catcon_
  61307.lst as CATCONOUT catconInit: Unexpected error returned by set_log_file_base_path print() on closed filehandle $CATCONOUT at
  catcon.pm line 6702. Unexpected error encountered in catconInit;
  exiting


I tried to find solution but i could not, so if someone could help what I have to do, to solve this problem.
Check the status of pluggable database.

SQL&gt; select name,open_mode from v$pdbs;

NAME          OPEN_MODE
------------------------------ ----------
PDB$SEED         MOUNTED
PDBORCL          MIGRATE
PDBORCL2         MIGRATE
PDBORCL1         MIGRATE

SQL&gt; startup;

ORA-01081: cannot start already-running ORACLE - shut it down first

SQL&gt; shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.


Check the status of pluggable database.

SQL&gt; STARTUP;
ORACLE instance started.

Total System Global Area  788529152 bytes
Fixed Size      2929352 bytes
Variable Size    541068600 bytes
Database Buffers   239075328 bytes
Redo Buffers      5455872 bytes
Database mounted.
Database opened.
SQL&gt; select name,open_mode from v$pdbs;

NAME          OPEN_MODE
------------------------------ ----------
PDB$SEED         MOUNTED
PDBORCL          MOUNTED
PDBORCL2         MOUNTED
PDBORCL1         MOUNTED


We need to start PDB$SEED pluggable database in UPGRADE state for that 

SQL&gt; SHUTDOWN IMMEDIATE;


Database closed.
Database dismounted.
ORACLE instance shut down.

SQL&gt; STARTUP UPGRADE;

ORACLE instance started.

Total System Global Area  788529152 bytes
Fixed Size      2929352 bytes
Variable Size    541068600 bytes
Database Buffers   239075328 bytes
Redo Buffers      5455872 bytes
Database mounted.
Database opened.

SQL&gt; ALTER PLUGGABLE DATABASE ALL OPEN UPGRADE;
Pluggable database altered.

SQL&gt; select name,open_mode from v$pdbs;

NAME          OPEN_MODE
------------------------------ ----------
PDB$SEED         MIGRATE
PDBORCL          MIGRATE
PDBORCL2         MIGRATE
PDBORCL1         MIGRATE

SQL&gt; exit


try again 
it will solve the issue