Generally speaking, you can only relocate a package (that is, install it into a different directory) that has been was built with relocation in mind.
$ cd /Volumes/DISK2GO/usr/local/bin/
$ ./wishtclsh8.6
dyld: Library not loaded:
/Library/Frameworks/TkTcl.framework/Versions/8.6/TkTcl
Referenced from: /Volumes/DISK2GO/usr/local/bin/./../../../Library/Frameworks/Tk.framework/Versions/8tclsh8.6/Resources/Wish.app/Contents/MacOS/Wish
Reason: image not found
./wish: line 2: 1291 Trace/BPT trap: 5 "$(dirname $0)/../../../Library/Frameworks/Tk.framework/Versions/8.6/Resources/Wish.app/Contents/MacOS/Wish" "$@"
$ ./tclselect
-bash: ./tclselect: /usr/local/bin/tclsh: bad interpreter: No such file or directory
The reason is that pathsscripts and compiled tools use and are linked to /Library/Frameworks
and /usr/local
are hardcoded in some scripts, etc. There is a chance that you can make it work grepping and substituting existing paths to your new installation path, but it will be a maintenance nightmare.:
$ cd /Volumes/DISK2GO/usr/local/bin/
$ otool -L tclsh8.6
tclsh8.6:
/Library/Frameworks/Tcl.framework/Versions/8.6/Tcl (compatibility version 8.6.0, current version 8.6.0)
(...)
$ grep Library tclselect
# /Library/Frameworks
# installation. I.e. a Tcl installed in '/Library/Frameworks' and
return /Library/Frameworks/Tcl.framework/Versions
OS X own frameworks areframework is installed in
/System/Library/Frameworks/Tk.framework/
and, some binaries in/usr/bin
.ActiveState's Tcl installs in
/Library/Frameworks/Tcl.framework
,/Library/Frameworks/Tk.framework
,/Library/Tcl
and/usr/local/bin
(for a full listing, double click thepkg
file and select File>ShowFiles).