You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I haven't tweaked ~/.cabal/config at all, and whenever I use cabal to install an executable, it gives the following message at the end:
Warning: could not create a symlink in /home/me/.cabal/bin for hlint because the file exists there already but is not managed by cabal. You can create a symlink for this executable manually if you wish. The executable file has been installed at /home/me/.cabal/bin/hlint
If I remove the installed executable and then immediately rebuild, it gives the same error (to demonstrate that there really was no file there before cabal tried to do its thing):
$ ls ~/.cabal/bin/hlint /home/me/.cabal/bin/hlint $ rm ~/.cabal/bin/hlint $ cabal install --reinstall hlint Resolving dependencies... In order, the following will be installed: hlint-2.1.6 (reinstall) Warning: Note that reinstalls are always dangerous. Continuing anyway... Configuring hlint-2.1.6... Building hlint-2.1.6... Installed hlint-2.1.6 Warning: could not create a symlink in /home/me/.cabal/bin for hlint because the file exists there already but is not managed by cabal. You can create a symlink for this executable manually if you wish. The executable file has been installed at /home/me/.cabal/bin/hlint
When I remove ~/.cabal/config and then run, eg, cabal update, a new config is created with the following line:
symlink-bindir: ~/.cabal/bin
If I comment that line out, installing executables works without warning.
(Note that if X depends on an executable and the executable results in this warning, then installation of X will fail. Re-running "cabal install X" will work, however.)
The text was updated successfully, but these errors were encountered:
Context: since new-install, like all new-* commands, installs packages in the immutable nix-style store, we symlink the resulting binaries to ~/cabal/bin (kinda like nix does). To control the symlink location, I used the symlink-bindir flag and set it to ~/.cabal/bin by default, thinking it had no effect on v1-install. Well, it does. And it is now set to the same directory as v1-install's bindir, resulting in that conflict.
I'm taking the liberty of closing this ticket due to its age and inactivity. Please open a new one if/when you are able to reproduce with an up to date cabal (assuming you are still using the v1- cabal API). Thank you for the report!
I haven't tweaked ~/.cabal/config at all, and whenever I use cabal to install an executable, it gives the following message at the end:
Warning: could not create a symlink in /home/me/.cabal/bin for hlint because the file exists there already but is not managed by cabal. You can create a symlink for this executable manually if you wish. The executable file has been installed at /home/me/.cabal/bin/hlint
If I remove the installed executable and then immediately rebuild, it gives the same error (to demonstrate that there really was no file there before cabal tried to do its thing):
$ ls ~/.cabal/bin/hlint
/home/me/.cabal/bin/hlint
$ rm ~/.cabal/bin/hlint
$ cabal install --reinstall hlint
Resolving dependencies...
In order, the following will be installed:
hlint-2.1.6 (reinstall)
Warning: Note that reinstalls are always dangerous. Continuing anyway...
Configuring hlint-2.1.6...
Building hlint-2.1.6...
Installed hlint-2.1.6
Warning: could not create a symlink in /home/me/.cabal/bin for hlint because
the file exists there already but is not managed by cabal. You can create a
symlink for this executable manually if you wish. The executable file has been
installed at /home/me/.cabal/bin/hlint
When I remove ~/.cabal/config and then run, eg, cabal update, a new config is created with the following line:
symlink-bindir: ~/.cabal/bin
If I comment that line out, installing executables works without warning.
(Note that if X depends on an executable and the executable results in this warning, then installation of X will fail. Re-running "cabal install X" will work, however.)
The text was updated successfully, but these errors were encountered: