diff --git a/R-3.6.1-0.build.sh b/R-3.6.1-0.build.sh
index 2a0806d..d64923a 100755
--- a/R-3.6.1-0.build.sh
+++ b/R-3.6.1-0.build.sh
@@ -254,6 +254,14 @@ cat <<- RCODEXXX | Rscript -
   }
 RCODEXXX
 
+# rstudios rsession does a lot of magic to detect the true R binary, thus bypassing
+# our friendly 'hints' from the wrapper.
+# tell lib/R/library/sf/libs/sf.so about lib -- yes it's the beloved sf package again!
+# the original rpath is only set to /pkg/R-3.6.1-0/lib/R/lib, add /pkg/R-3.6.1-0/lib.
+
+patchelf --set-rpath $PREFIX/lib/R/lib:$PREFIX/lib \
+         $PREFIX/lib/R/library/sf/libs/sf.so
+
 exit
 
 # NOTES: