Closed ShalokShalom closed 6 years ago
I solved it by uninstalling cmake from Linuxbrew for now. So I ask this in general, for other cases. Thanks a lot :)
It will depend on what is first in your path. During the installation there was some explanation:
Add Linuxbrew to your #{Tty.underline}#{shell_profile}#{Tty.reset} by running
echo 'export PATH="#{HOMEBREW_PREFIX}/bin:$PATH"' >>#{shell_profile}
echo 'export MANPATH="#{HOMEBREW_PREFIX}/share/man:$MANPATH"' >>#{shell_profile}
echo 'export INFOPATH="#{HOMEBREW_PREFIX}/share/info:$INFOPATH"' >>#{shell_profile}
So have a look at your ~/.bash_profile
or ~/.zprofile
or ~/.profile
file (or whatever profile file you used). You can comment out the path hijacking there.
Of course if you want to have one part of the tools from your distro, and another part from linuxbrew, then it gets more tricky and you will need to tweak this manually for each package.
Well, Linuxbrew installs all packages into another folder to avoid conflicts, you can do something similar for the names, optionally?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
This makes Linuxbrew broken to me, since I build with Linuxbrew packages, anyway if I want or not. Linuxbrew should/could stay out of the way, instead, does it force its packages into my builds, without asking and by default. Totally unacceptable in my opinion.
It is totally unclear to me what the exact problem is. Can you explain in simple words what is broken for you? For example, what did you mean by: you can do something similar for the names, optionally?
? What names are you talking about?
Linuxbrew does not install anything outside of it's local folder, and does not put anything in your path without asking you before doing so. If something ended up in your path or messed up your setup (without asking you before doing so), this should be considered as a bug and we should try to fix it. But I need more details for this.
When I build something, assumes my build system (pacman/makepkg) that I want to use the Linuxbrew packages as dependencies.
This leads often to confusing results. Linuxbrew installs its own cmake, as an example and this messes up my whole configuration.
When I try to build something with pacman on this device, assumes it that the Linuxbrew packages are the default choice to do so.
Is this something to poke the pacman guys and girls about?
Cheers
@ShalokShalom Your accusatory tone is rather impolite.
I'm not familiar with Pacman. Everything that Linuxbrew installs is installed within its prefix directory, by default ~/.linuxbrew
. If Linuxbrew executables are being run in preference to your system executables, it's because you've added Linuxbrew's bin
directory to your PATH
. Remove Linuxbrew's bin directory from your PATH
if you'd prefer to use your host's executables.
If Linuxbrew's pkg-config
is found in your PATH
ahead of your system's /usr/bin/pkg-config
, that could cause other build system's to find and use Linuxbrew's packages in preference to your host system's packages.
I use the default settings without any change to the path
Linuxbrew itself makes no changes to your PATH
. It's installation instructions give you suggestions on modifying your shell profile (e.g. ~/.bashrc
) to add Linuxbrew to your PATH
, which you would need to do yourself.
Yes, I copied that into my zshrc and consider it as the default configuration
If you'd prefer not to have Linuxbrew's executables in your PATH
, simply remove it from your PATH
.
This issue hits basically everyone who builds own packages with pacman and probably on other package management systems too, so I think this is important enough to consider changing this default template in order to increase compability.
This default configuration works for most people. How you configure your system and PATH
specifically is up to you. Perhaps you can configure pacman
to use a different PATH
.
Let me try to explain this differently, using the cmake example. You can, as a user, download cmake, build it, install it, and put it in your path.
Linuxbrew just does the same as the manual steps above. And putting stuff in the path is optional, we do not force you to do it.
If this breaks pacman and you are annoyed by that, you should report this to the pacman developers. I do not think we want to change anything regarding that topic.
As said, the default configuration breaks with pacman and this is not the case with any other alternative package management system, is it Habitat or Flatpak or Nix or..
Just Linuxbrew breaks on all these instances and that you are completely fine with it, tells us something about the overall quality standards here.
Thanks a lot
Removing Linuxbrew from your PATH
will return your system to the as it was before you installed Linuxbrew. You can then run individual executables installed using Linuxbrew by specifying their full path, or symlinking them into a directory that is in your PATH
, such as ~/bin
.
brew
command and reproduced the problem with multiple formulae? If it's a problem with a single, official formula please file this issue at Linuxbrew/homebrew-core: https://github.com/Linuxbrew/homebrew-core/issues/new. If it's a tap problem please file this issue at the tap.brew update
and can still reproduce the problem?brew doctor
, fixed all issues and can still reproduce the problem?brew config
andbrew doctor
and included their output with your issue?To help us debug your issue please explain:
brew
commands)Features
Hi there :)
Simple question: How is it recommended, to distinguish between the Linuxbrew command to call a specific binary and that one of my distribtutions package manager?
When I build, I do that with cmake. Whyever, it calls the cmake version of Linuxbrew, which is installed as a dependency. How to solve that?
My specific issue, for the completeness:
➜ neovim-qt git:(master) cmake CMake Error: Could not find CMAKE_ROOT !!! CMake has most likely not been installed correctly. Modules directory not found in /home/linuxbrew/.linuxbrew/Cellar/cmake/3.11.0/share/cmake-3.11