cannot install without root permission. Cannot symlink to "/usr/local/bin"
Opened this issue · 4 comments
Hi
while trying to install in a HPC cluster using a regular user account without root permissions I got this error:
Building VariantVisualization → `~/.julia/packages/VariantVisualization/1yoNl/deps/build.log`
┌ Error: Error building `VariantVisualization`:
│ ERROR: LoadError: IOError: symlink: permission denied (EACCES)
│ Stacktrace:
│ [1] uv_error at ./libuv.jl:90 [inlined]
│ [2] symlink(::String, ::String) at ./file.jl:800
│ [3] symlink_user_bin(::String) at ~/.julia/packages/VariantVisualization/1yoNl/deps/build.jl:18
│ [4] top-level scope at ~/.julia/packages/VariantVisualization/1yoNl/deps/build.jl:24
│ [5] include at ./boot.jl:328 [inlined]
│ [6] include_relative(::Module, ::String) at ./loading.jl:1094
│ [7] include(::Module, ::String) at ./Base.jl:31
│ [8] include(::String) at ./client.jl:431
│ [9] top-level scope at none:5
│ in expression starting at ~/.julia/packages/VariantVisualization/1yoNl/deps/build.jl:24
└ @ Pkg.Operations /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/Pkg/src/backwards_compatible_isolation.jl:647
it seems that the problem is here, where the installer tries to create a symlink in /usr/local/bin
which is owned by root: https://github.com/compbiocore/VariantVisualization.jl/blob/master/deps/build.jl#L16-L18
as workaround I have edited the file ~/.julia/packages/VariantVisualization/1yoNl/deps/build.jl
and commented out those lines and then the installation seems to complete correctly. Now to start the application I have to execute the binary in ~/.julia/packages/VariantVisualization/1yoNl/viva
It would be great if the path to create the symlink could be defined during the installation instead of hardcoding it to /usr/local/bin/
Hi @pescobar ,
I'm glad you were able to work about this root permission issue. I like your suggestion to allow user-defined path for creating the symlink. This would also address issue #82 .
@fernandogelin , what you do you think? Can we allow the user to select a custom path for the symlink during package building? Maybe we can include an exception handler for
IOError: symlink: permission denied (EACCES)
which asks for a custom path for creating the symlink.
Hi @pescobar
I have exactly the same problem but I am quite new to coding. Would you mind detailing which lines you commented out exactly and what commands you ran thereafter to get the installation done? I'd hugely appreciate some help.
Kind regards
Cora
@coraolpe the workaround is described in my first comment. You need to edit the file ~/.julia/packages/VariantVisualization/1yoNl/deps/build.jl
and comment out lines 16 to 18 (https://github.com/compbiocore/VariantVisualization.jl/blob/master/deps/build.jl#L16-L18)