This usually happens when initially logging in as non-root, then switching with "su" to root, which keeps the environment of the initially logged in user.
Either use "su -" to switch to root in order to initialize root's own environment or run the Update installer with sudo, for instance:
$ sudo ./R2018a_Update4_glnxa64.sh
The cause of the issue is a combination of how the installer checks who the current user is and how Linux switches users, specifically their environment variables.
The installer compares the owner of the MATLAB installation (by default /usr/local/MATLAB/R20XXx) and the value of the $USER environment variable. Linux sets the $USER variable when calling "login", but using "su" does not update this variable, on the other hand "su -" does. Running with "sudo" has a similar effect.
For example, if you initially login with "user1", $USER is set to user1. Switching to root with "su" will keep user1's environment variables, even though the current user is now root. Switching with "su -" will update $USER to root.
Refer to the man page for su (man su) for more information about this behavior.