Open nrnrnr opened 9 years ago
@dagit also curious if you have any insight on how we might tweak the scripts here?
I think just this script: https://github.com/haskell/haskell-platform/blob/master/hptool/os-extras/posix/installer/install-haskell-platform.sh.mu
and this script: https://github.com/haskell/haskell-platform/blob/master/hptool/os-extras/posix/bin/activate-hs
need to be modified.
And in fact it may just be the former script A) removing the root check and B) unpacking to a lower level directory (if even that?)
Today I tried exactly that (prefixing all paths in install_haskell_platform.sh and adjusting the prefix in activate-hs), and this allowed me to install the Haskell platform without root access. But whenever I tried to execute any of the commands (stack, ghc, ...) it complained that it could not find something in /usr/local. So there must be something else that needs to be done.
I ended up following these instructions https://github.com/yantonov/install-ghc/blob/master/ubuntu/install-ghc-ubuntu.md which allowed me to install stack without root access, so I got Haskell "through the backdoor". Not nice, though, and I agree that I'd rather prefer the Haskell platform installer to ask me for a path prefix, and then it should place everything into that folder.
Thanks for the report!
I think all the stuff as described here https://github.com/haskell/haskell-platform/issues/234#issuecomment-191046183 also need to happen, just to maintain continuity across the related tickets...
I don't like to grant root permission when not necessary. The Haskell platform needs only to be able to write into
/usr/local
, and if the scripts don't find themselves with root permission or with permission to write/
, they should try to continue silently with the permissions they need.