'nanomsg/nn.h' file not found on MAC - macos

I want to install nn with LuaRocks on macOS. But when running
sudo luarocks install nn //I use sudo because otherwise I don't have permission to install
I am getting the error
lnn.c:4:9: fatal error: 'nanomsg/nn.h' file not found
include
^ 1 error generated.
How can I resolve this issue?

Brew comes to the rescue.
Run:
brew install nanomsg
This worked for me.

Related

Error: Unknown command: cask || despite the use of multiple instance trials

I am not able to do anything anymore. I keep getting the error Error: Unknown command: cask even though I have previously used a lot of different installations from this link: Homebrew cask option not recognized?
NONE OF THEM HELPED!
For example I get this output:
After the instance I want to apply this command: brew cask install cscreen to then go to cscreen -l. However, I keep getting the above error...
Please help.
I want to use this because without it I am not able to work on a closed MacBook because when I close the monitor it goes back to the dreaded setting of 75Hz.
Regards!
I was having a similar issue running brew cask install [...]. I am running macOS Catalina v10.15.7. I used brew install --cask [...] and it worked for me. In your case:
brew install --cask cscreen
For anyone like me landing here where effreety's answer does not work, try whatever command you are trying to run without cask.
cask is no longer a brew command.
Run your brew command without "cask".
Example:
Instead of brew cask install graphql-playground try brew install graphql-playground

Error installing PyGObject, 'glib-object.h' file not found

I am trying to install pygobject for python 2.7 in pycharm for the purpose of using gstreamer. However I am having problems installing it. While in the virtual environment, if I use
pip install pygobject
Then the build fails and gives me this error
gi/gimodule.c:25:10: fatal error: 'glib-object.h' file not found
#include <glib-object.h>
^~~~~~~~~~~~~~~
1 error generated.
error: command 'cc' failed with exit status 1
full error log here
I know for a fact that glib exists on my system from searching for it with
find /usr -name glib-object.h
but for some reason the install can't find it. Do I have to link it in somehow/how do I go about doing this?
Also I know I can more successfully use this library with python3 but that caused some weird system errors that can apparently be resolved by using 2.7 so I am just exploring that at the moment.
With virtual environments it's recommended installing PyGObject with pipenv instead of pip.
Install pipenv with either MacPorts, HomeBrew or pipsi:
MacPorts
port install pipenv
HomeBrew
brew install pipenv
pipsi
curl https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py | python3 - --src=git+https://github.com/mitsuhiko/pipsi.git\#egg=pipsi
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
pipsi install pew
pipsi install pipenv
Once you've got pipenv installed then you should be able to add the package to your virtual environment:
pipenv install pygobject
↳ PyGObject : Creating A Development Environment

downloading hydra with brew error (You must `brew link makedepend` before hydra can be installed)

I am trying to download Hydra in Terminal with Homebrew on my imac but it gives me this error:
You must `brew link makedepend` before hydra can be installed
And when I run:
brew link makedepend
It says:
Error: Could not symlink .
/usr/local/opt is not writable.
And if i use sudo it says:
Running Homebrew as root is extremely dangerous and no longer supported.
As Homebrew does not drop privileges on installation you would be giving all
build scripts full access to your system.
Can someone help me thank you!
Run brew update first, and then brew doctor. It will likely ask you to use chmod on /usr/local/. Follow its instructions.

Unable to install package using luarocks on osx

I installed lua on my OSX 10.10 machine using brew install lua. The version that got installed was 5.2.4. LuaRocks was installed along with the lua package. But when i run luarocks install <package_name> i get Error: ##HOMEBREW_PREFIX## does not exist and your user does not have write permissions in. i tried using sudo luarocks install <package_name> as well, but it gives the same error. How to fix this ?
Please Help.
Thanks
This was a bug in the way we relocate text files to ensure wider bottle portability for non-/usr/local users.
It was resolved a couple of weeks back, July 31st I believe. Presuming your Homebrew is in a standard location, if you do:
rm /usr/local/etc/luarocks52/config-5.2.lua && brew update && brew reinstall lua
The problem should be resolved now. Apologies!
I had the same problem when using the luarocks when installed with homebrew, try installing luarocks again like this:
$ wget http://luarocks.org/releases/luarocks-2.2.1.tar.gz
$ tar zxpf luarocks-2.2.1.tar.gz
$ cd luarocks-2.2.1
$ ./configure; sudo make bootstrap
I took this code snippet from here: https://luarocks.org/
I managed to install all the modules that I required without problems after doing this.

Failing while running `brew install

I am trying to re-install Nokogiri dependencies with homebrew following the steps described here. I had nokogiri working fine before, but had to remove macports to make some space on my mac.
Running into errors at the first step:
$ brew install libxml2 libxslt
Warning: Your Xcode (3.2.2) is outdated
Please install Xcode 3.2.6.
==> Downloading ftp://xmlsoft.org/libxml2/libxml2-2.8.0.tar.gz
Warning: Failed to create the file
Warning: /Library/Caches/Homebrew/libxml2-2.8.0.tar.gz
0.0%
curl: (23) Failed writing body (0 != 1448)
Error: Download failed: ftp://xmlsoft.org/libxml2/libxml2-2.8.0.tar.gz
Any idea how to fix this?
Is the warning about Xcode version significant?
The relevant message above seemed to be Warning: Failed to create the file.
Tried to create the /Library/Caches/Homebrew/libxml2-2.8.0.tar.gz file manually, and got a Permission denied error.
Changed the ownership of the folder to my username:group with
sudo chown <username>:<group> /Library/Caches/Homebrew/
With that change, the brew install step worked successfully!
Note: The answers to brew install mongodb error: Cowardly refusing to `sudo brew install' Mac OSX Lion helped in figuring out the problem.

Resources