Problem installing Oracle 19c to symlinked directory from RPM I've created destination directory and linked it to default install path:
$mkdir /u01/oracle
$ln -s /u01/oracle /opt

Then I've changed the owner:
$sudo chown -R oracle:oinstall /opt/oracle

But when I tried to install RPM I got an error:
$sudo rpm -i ./oracle-database-ee-19c-1.0-1.x86_64.rpm
warning: ./oracle-database-ee-19c-1.0-1.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY

[SEVERE] The install cannot proceed because ORACLE_BASE directory (/opt/oracle)
is not owned by &quot;oracle&quot; user. You must change the ownership of ORACLE_BASE
directory to &quot;oracle&quot; user and retry the installation.

error: %prein(oracle-database-ee-19c-1.0-1.x86_64) scriptlet failed, exit status 1
error: oracle-database-ee-19c-1.0-1.x86_64: install failed

How to properly fix this problem?
you cant do that unless oracle user has a permission on the original directory here is an example explain to you what is exactly happening (in the example I am going to create normal text file)
[aabuhasna@aabuhasna ~]$ sudo mkdir /test
[aabuhasna@aabuhasna ~]$ sudo ln -s /test/ ./test
[aabuhasna@aabuhasna ~]$ cd ./test/
[aabuhasna@aabuhasna test]$ touch 1
touch: cannot touch '1': Permission denied
[aabuhasna@aabuhasna test]$ ls -alrt
total 8
dr-xr-xr-x. 19 root root 4096 Oct 21 18:15 ..
drwxr-xr-x.  2 root root 4096 Oct 21 18:15 .
[aabuhasna@aabuhasna test]$ 
[aabuhasna@aabuhasna test]$ sudo chmod 0777 /test
[aabuhasna@aabuhasna test]$ touch 1.txt
[aabuhasna@aabuhasna test]$ ls -altr
total 8
dr-xr-xr-x. 19 root      root      4096 Oct 21 18:15 ..u 
-rw-rw-r--.  1 aabuhasna aabuhasna    0 Oct 21 18:18 1.txt
drwxrwxrwx.  2 root      root      4096 Oct 21 18:18 .
[aabuhasna@aabuhasna test]$ 

but in your case you need to use sudo chown -R oracle:oinstall /u01/oracle this is a prerequisite from Oracle, there is no workaround for that
Note: softlink will not provide full access and\or ownership on the original directory