This error:"ERROR: could not access file "$libdir/liblwgeom": No such file or directory"
Means that you have PostGIS installed and it can't find it in the upgrade path I believe. Did you get postGI configured correctly in the upgraded version?
r.b.