pg_upgrade unrecognized configuration parameter "unix_socket_directory"
I hacked the problem by running (as root):
mv /usr/bin/pg_ctl{,-orig}
echo '#!/bin/bash' &gt; /usr/bin/pg_ctl
echo '&quot;$0&quot;-orig &quot;${@/unix_socket_directory/unix_socket_directories}&quot;' &gt;&gt; \
     /usr/bin/pg_ctl
chmod +x /usr/bin/pg_ctl

Run pg_upgrade as intended, then undo the hack:
    mv -f /usr/bin/pg_ctl{-orig,}

The problem is that pg_upgrade executes the program pg_ctrl with arguments that specify files in the old &quot;unix_socket_directory&quot; rather than the new &quot;unix_socket_directories&quot; (note the second is plural). This hack renames the original /usr/bin/pg_ctl to /usr/bin/pg_ctl-orig, and then creates a shell script in its place that simply calls the original pg_ctl program, passing all arguments with any strings &quot;unix_socket_directory&quot; changed to &quot;unix_socket_directories&quot;.
In bash, one can change a portion of a string, say from bar to baz in a variable $foo, by using ${foo/bar/baz} (note this does not change the variable, but rather returns the variable's modified contents). Arrays can also be used with ${x/y/z} to retrieve an array with all of its contents replaced, all at once. The variable $@ is an array that contains all arguments passed to the program/script/function, so the new pg_ctl script executes the old one with all arguments changed from the old directory name to the new one.