Is there anyway to have the command brew show all the installed or optional dependencies for any given package? It would also be helpful to see which of the install packages are themselves the dependencies of others packages.
For all packages:
brew deps --tree --installed
For one package only (e.g.):
brew deps --tree --installed vim
Thanks to rob-kovacs for suggesting the --tree addition
See this helpful article for details: https://blog.jpalardy.com/posts/untangling-your-homebrew-dependencies/
Especially if you're interested in creating a graph of the dependency tree.
Here is a command that will list all formulas that aren't dependents of any other formulas (leaves), and for each of them lists all of its dependencies.
Sample output line:
awscli: gdbm readline sqlite tcl-tk xz
Command:
brew leaves | xargs brew deps --formula --for-each | sed "s/^.*:/$(tput setaf 4)&$(tput sgr0)/"
Alternate command without xargs:
brew deps --formula --for-each $(brew leaves) | sed "s/^.*:/$(tput setaf 4)&$(tput sgr0)/"
You can use info command like.
brew info ffmpeg
It will show you information and dependencies of formula. Also, it shows if this package installed by a tick after name of it.
I found the brew deps --tree switch is also very helpful to visualize dependencies just in the command line. From the official doc:
brew deps --tree [--1] [filters] [--annotate] (formulae|--installed):
Show dependencies as a tree. When given multiple formula arguments, output
individual trees for every formula.
Example1:
brew deps --tree fontconfig
Output1:
fontconfig
└── freetype
└── libpng
Example2:
brew deps --tree --1 fontconfig
Output2:
fontconfig
└── freetype
and there are more switches explained by:
brew help deps
Command:
brew deps --include-build --tree $(brew leaves)
Convenient alias:
alias brewdeps="brew leaves | xargs brew deps --include-build --tree"
This way you will get dependencies printed hierarchically and each package will be printed only once.
Related
I've tried to install nix-linter with 3 way. None works
nix package manager
nix-env -iA nixpkgs.nix-linter
Package is marked as broken, refusing to evaluate.
It propose me several option to add broken package ( export NIXPKGS_ALLOW_BROKEN=1 ). But I don't understand exactly what will be the repercutions. I prefer not to follow this option
with cachix
I follow this tutorial
and add this line
echo "trusted-users = root myusername" | sudo tee -a /etc/nix/nix.conf && sudo pkill nix-daemon
normally after cachix use nix-linter there is a cache that nix-build use
But it doesn't work. I get an error saying that there is no default.nix in my repository
https://github.com/Synthetica9/nix-linter
cachix use nix-linter
git clone https://github.com/Synthetica9/nix-linter
cd nix-linter
$(nix-build -A nix-linter)/bin/nix-linter --help
error: attribute 'nix-linter' in selection path 'nix-linter' not found
-bash: /bin/nix-linter: No such file or directory
somebody from cacheix said that this package is no longer maintain and I should try statix.
statix works
I am trying to install pymol in CentOS 7 system. I installed the dependency glm-devel-0.9.6.3-1.el7.noarch by yum:
sudo yum install glm-devel.
During compiling I got an error related to glm as following:
layer1/SceneView.cpp:34:61: error: no matching function for call to ‘equal(const vec3&, const vec3&, float)’
Could anyone tell why this error appears?
I will appreciate any help!
Best regards.
install pymol in CentOS 7
Build example with updated glm-devel
# yum install mmtf-cpp-devel.x86_64 glew-devel.x86_64 libpng-devel freetype-devel msgpack-devel libxml2-devel python36-qt5-devel.x86_64 freeglut-devel mesa-libGL-devel.x86_64 python3-devel
# yum install ./glm-devel-0.9.9.6-6.el7.noarch.rpm
## works with the default python3 (3.6.8) and g++ -4.8.5
Link, glm-devel-0.9.9.6-6.el7 https://drive.google.com/file/d/1BXygEWqpvlbZg867dsXuW47T67Z0V0Q8/view?usp=sharing
https://github.com/schrodinger/pymol-open-source →
https://github.com/schrodinger/pymol-open-source/blob/master/INSTALL
git clone https://github.com/schrodinger/pymol-open-source.git
cd pymol-open-source/
python3 setup.py build
# python3 setup.py install
pymol ## the pymol GUI opens OK
There is also a binary version available, with python 3.7 included : https://pymol.org/2/ →
https://pymol.org/installers/PyMOL-2.5.2_293-Linux-x86_64-py37.tar.bz2 → tar xvf PyMOL-2.5.2_293-Linux-x86_64-py37.tar.bz2
cd pymol/ && ./pymol
Command: yum -y install docker-ce
Result:
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package docker-ce.x86_64 0:18.06.0.ce-3.el7 will be installed
--> Processing Dependency: container-selinux >= 2.9 for package: docker-ce-18.06.0.ce-3.el7.x86_64
--> Finished Dependency Resolution
Error: Package: docker-ce-18.06.0.ce-3.el7.x86_64 (docker-ce-stable)
Requires: container-selinux >= 2.9
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
Resolved with installing container-selinux-2.9 dependency with following command:
sudo yum install ftp://bo.mirror.garr.it/1/slc/centos/7.1.1503/extras/x86_64/Packages/container-selinux-2.9-4.el7.noarch.rpm
Use below link to install container-selinux from a trust able source
sudo yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/container-selinux-2.55-1.el7.noarch.rpm
Steps to install Docker-CE on RHEL 7.5
https://github.com/dineshsood/dockers/wiki
This docker-ce version worked for me:
sudo yum -y install docker-ce-cli.x86_64 1:19.03.5-3.el7
Best of luck!
You can enable the Extras repository in the path:
/etc/yum.repos.d/CentOS-Base.repo
You need to enable CentOS "extras" repository.
Here's how I did it:
Open /etc/yum.repos.d/CentOS-Base.repo
Duplicate contents of the file, so it becomes twice as long
Replace /os/ in the URL with /extras/
Change the section title in square brackets
E.g.:
[CentOS-Base]
name=CentOS 7 Base Mirror
baseurl=http://mirror.centos.org/centos/7/os/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
[CentOS-Extras]
name=CentOS 7 Extras
baseurl=http://mirror.centos.org/centos/7/extras/x86_64/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Then try installing docker again
I had to add --nogpgcheck to the selected answer de to an error
Public key for container-selinux-2.9-4.el7.noarch.rpm is not installed
I have taken rpm packages from
https://copr-be.cloud.fedoraproject.org/results/alonid/llvm-3.9.0/epel-7-x86_64/00505197-clang-3.9.0/ for Clang 3.9.
I am installing the rpm packages by the command
rpm -ivh clang-3.9.0-3.9.0-3.1.el7.centos.alonid.src.rpm
But when I do
rpm -ivh clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64.rpm
I get the following error :
error: Failed dependencies:
clang-3.9.0-libs(x86-64) = 3.9.0-3.1.el7.centos.alonid is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libLLVM-3.9.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclang.so.3.9()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangAST.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangBasic.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangCodeGen.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangDriver.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangFormat.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangFrontend.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangFrontendTool.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangIndex.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangRewrite.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangRewriteFrontend.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangStaticAnalyzerFrontend.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangTooling.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
libclangToolingCore.so()(64bit) is needed by clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64
Where should I install all these dependencies from?
By enabling the SCL repository you can install Clang 5.0.1 on CentOS 7 using the llvm-toolset-7 package.
$ sudo yum install centos-release-scl
$ sudo yum install llvm-toolset-7
Enable llvm-toolset-7:
$ scl enable llvm-toolset-7 bash
You can now check you clang version with:
$ clang --version
See this Red Hat blog post for more information.
For more information about SCL, see this page.
There was a much easier way to achieve this:
Add the Alonid's repo to /etc/yum.repos.d/epel.repo (assuming you have epel repo installed)
echo "[alonid-llvm-3.9.0]
name=Copr repo for llvm-3.9.0 owned by alonid
baseurl=https://copr-be.cloud.fedoraproject.org/results/alonid/llvm-
3.9.0/epel-7-$basearch/
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://copr-be.cloud.fedoraproject.org/results/alonid/llvm-
3.9.0/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1" >> /etc/yum.repos.d/epel.repo
Then just sudo yum install clang-3.9.0
I am the author of the RPM repository you mention.
Follow from the main Copr page of the repository:
https://copr.fedorainfracloud.org/coprs/alonid/llvm-3.9.0/
If you have any question, you can contact me from there. Thanks!
Just open your link and look around, also go one level higher and find all necessary .rpm's. The following sequence worked for me:
yum install compiler-rt-3.9.0-3.9.0-3.el7.centos.alonid.x86_64.rpm
yum install clang-3.9.0-libs-3.9.0-3.1.el7.centos.alonid.x86_64.rpm
yum install clang-3.9.0-3.9.0-3.1.el7.centos.alonid.x86_64.rpm
yum install llvm-3.9.0-libs-3.9.0-7.el7.centos.alonid.x86_64.rpm
yum install llvm-3.9.0-3.9.0-7.el7.centos.alonid.x86_64.rpm
yum install llvm-3.9.0-devel-3.9.0-7.el7.centos.alonid.x86_64.rpm
By just doing yum install without any flags Clang and LLVM will be installed to /opt/llvm-3.9.0:
$ ls -l /opt/llvm-3.9.0
total 12
drwxr-xr-x 2 root root 4096 Jun 3 23:48 bin
drwxr-xr-x 3 root root 4096 Jun 3 23:23 include
drwxr-xr-x 3 root root 4096 Jun 3 23:27 lib64
Also notice that there are other packages like -devel, -static, -debuginfo.
Useful tip: Without installing -devel packages you only get bin and lib64 folders where only the executables like bin/clang and libraries like lib64/libLLVM-3.9.0.so are located. If you also want to develop something with LLVM/Clang you will need corresponding -devel packages. Then you will also get include/ folder with headers.
By the way, thanks to the maintainers of this repo. Nice to have LLVM 3.9 out of the box.
A complete installation process is provided by Red Hat, please refer to Red Hat documents.
I'm trying to uninstall/re-install my development dependencies via homebrew and brew doctor is giving me the following errors:
Robs-MacBook-Pro:~ robcate$ brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry and just ignore them. Thanks!
Warning: /usr/local/Cellar isn't writable.
You should probably change the ownership and permissions of /usr/local/Cellar
back to your user account.
sudo chown -R $(whoami) /usr/local/Cellar
Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected header files:
/usr/local/include/node/ares.h
/usr/local/include/node/ares_version.h
/usr/local/include/node/nameser.h
/usr/local/include/node/node.h
/usr/local/include/node/node_buffer.h
/usr/local/include/node/node_internals.h
/usr/local/include/node/node_object_wrap.h
/usr/local/include/node/node_version.h
/usr/local/include/node/openssl/opensslconf.h
/usr/local/include/node/uv-private/ngx-queue.h
/usr/local/include/node/uv-private/stdint-msvc2008.h
/usr/local/include/node/uv-private/tree.h
/usr/local/include/node/uv-private/uv-bsd.h
/usr/local/include/node/uv-private/uv-darwin.h
/usr/local/include/node/uv-private/uv-linux.h
/usr/local/include/node/uv-private/uv-sunos.h
/usr/local/include/node/uv-private/uv-unix.h
/usr/local/include/node/uv-private/uv-win.h
/usr/local/include/node/uv.h
/usr/local/include/node/v8-debug.h
/usr/local/include/node/v8-preparser.h
/usr/local/include/node/v8-profiler.h
/usr/local/include/node/v8-testing.h
/usr/local/include/node/v8.h
/usr/local/include/node/v8stdint.h
/usr/local/include/node/zconf.h
/usr/local/include/node/zlib.h
Robs-MacBook-Pro:~ robcate$ sudo chown -R $(robcate) /usr/local/Cellar
-bash: robcate: command not found
usage: chown [-fhv] [-R [-H | -L | -P]] owner[:group] file ...
chown [-fhv] [-R [-H | -L | -P]] :group file ...
Can anyone point me in the right direction to fix these?