<div dir="ltr">I am on a corporate network with ports installed normally in /opt/local, controlled by system admins.  Users do not have any write access into system directories.  I would like to use a local portfile repository in user space, as described in Macports guide 4.6.<br><br>How can I test ports in the local repository?  The "portindex" command works as expected in this directory.  However, "port install" fails with "Insufficient privileges to write to MacPorts install prefix".  I need a way to tell "port install" to use a local prefix, rather than the default system prefix, for only the port under test.<br><br>I figured that I could avoid tampering with the protected sources.conf, by manually pre-staging the desired distfiles in the local repository.  Here is my embryonic directory structure:<br><br>$HOME/portx/science/netcdf-fortran/Portfile<br>$HOME/portx/science/netcdf-fortran/files/patch-Makefile.in.diff<br>$HOME/portx/var/macports/distfiles/netcdf-fortran/netcdf-fortran-4.5.2.tar.gz<br><br>Thank you for any advice.</div>