How to install libuuid on Mac OS X? - macos

I'm trying to compile gearman-0.28 on Mac, but encountered the following error:
configure: error: Unable to find libuuid
I don't know how to install libuuid on Mac, my Mac is 10.7.2 version.
Any one can help me? Thanks in advance.

With Homebrew:
brew install ossp-uuid

For those who are trying to install the uuid extension from PECL, the ossp-uuid and the util-linux's uuid package shipped with Mac OSX will not work as they are out dated. You will need an updated version of uuid from util-linux. It is available on Homebrew.
brew install util-linux
But util-linux is a keg-only package and will not be symlinked to /usr/local. Hence you will have to specify the following path when prompted for uuid installation directory
/usr/local/opt/util-linux
For unattended installations, you can use
printf "/usr/local/opt/util-linux" | pecl install uuid

Install mac port like
sudo port install ossp-uuid
$configure --with-lib

As time goes by, it seems worthwhile to mention that libuuid has become part of macOS in the meantime.

If you want an up to date alternative to the brew or mac ports solutions, the following from here works great. You can also add the code to your .zshrc or .bash_profile
$ alias uuid="python -c 'import sys,uuid; sys.stdout.write(uuid.uuid4().hex)' | pbcopy && pbpaste && echo"
$ uuid
34469137412242129cd908e384717794

Related

uninstalled macports, and cannot use homebrew softwares anymore

I'm trying to remove duplicate opencv versions on my mac. It seems that I have installed using both homebrew and mac port, so I decided to uninstall mac port completely, following this guide
But when I uninstalled mac-port and softwares installed with port, I couldn't use softwares installed by brew anymore
$ brew install pkg-config
$ pkg-config
-bash: /opt/local/bin/pkg-config: No such file or directory
I guess it's because the system still believes that pkg-config is in mac-port location. But how to fix it? I haven't find solutions with google.
Thanks in advance!
problem solved by editing PATH setting in ~/.bash_profile (or bashrc).

Why can't I setup an SSHFS share? “OSXFUSE file system is not available” error

I'm trying to setup an SSHFS share from my local machine to a remote machine, but it is not working. I'm getting the error OSXFUSE file system is not available (see below). How to fix this??
FYI, my local machine is a MacBook Pro laptop running OSX 10.9.3. The remote machine is actually a VirtualBox on the same hardware running CentOS.
% brew install sshfs # <---- SSHFS is installed
Warning: sshfs-2.5.0 already installed
% brew install osxfuse # <---- OSX Fuse is installed
Warning: osxfuse-2.6.4 already installed
% ssh remote_user#XXX.XXX.XXX.XXX # <---- See, SSH works!!
Last login: Wed Jun 18 18:36:11 2014 from XXX.XXX.XXX.XXX
[remote_user#XXX.XXX.XXX.XXX ~]% exit
% sudo mkdir /mnt
% sudo mkdir /mnt/Share
% sudo sshfs -o IdentityFile=~/.ssh/id_rsa.pub remote_user#XXX.XXX.XXX.XXX:/ /mnt/Share
the OSXFUSE file system is not available (-1)
the OSXFUSE file system is not available (1)
I tried solution described here. But it didn't work for me:
% sudo kextunload -b com.github.osxfuse.filesystems.osxfusefs
(kernel) Kext com.github.osxfuse.filesystems.osxfusefs not found for unload request.
Failed to unload com.github.osxfuse.filesystems.osxfusefs - (libkern/kext) not found.
If you run brew info osxfuse and follow the instructions to the letter, I believe it would work.
From what You described, you just tried unloading the (possible) previous kernel extension, but did not complete the last important step to actually install the new extension.
This is what brew info osxfuse tells me:
If upgrading from a previous version of osxfuse, the previous kernel extension
will need to be unloaded before installing the new version. First, check that
no FUSE-based file systems are running:
mount -t osxfusefs
Unmount all FUSE file systems and then unload the kernel extension:
sudo kextunload -b com.github.osxfuse.filesystems.osxfusefs
The new osxfuse file system bundle needs to be installed by the root user:
sudo /bin/cp -RfX /usr/local/opt/osxfuse/Library/Filesystems/osxfusefs.fs /Library/Filesystems
sudo chmod +s /Library/Filesystems/osxfusefs.fs/Support/load_osxfusefs
There appears to be a problem loading the KEXT installed by the regular osxfuse Homebrew package. You can use brew cask to install the official FUSE for OS X build from their own DMG:
brew rm osxfuse
brew install caskroom/cask/brew-cask
brew cask install osxfuse
SSHFS itself is also available as a Cask package, though on my system mixing osxfuse from Cask with plain sshfs binary bottle works just fine.
The downside to this approach is that brew upgrade or brew outdated will no longer be able to update FUSE for OS X as brew cask is not version-aware for now.
I have observed that OSXFUSE is a bit tricky, though I don't know exactly why, and brew tries to avoid changing the system, so using it to manage kernel extensions is not a good idea. I suggest using the packaged installers for OSXFUSE and SSHFS from http://osxfuse.github.io/ instead of using brew.
Open System Preferences, choose FUSE, then update to the latest version. Thats what worked for me.
The problem when installing SSHFS with brew is that osxfusefs is not signed: the Console outputs com.apple.kextd: ERROR: invalid signature for com.github.osxfuse.filesystems.osxfusefs, will not load. See also https://github.com/osxfuse/osxfuse/issues/122.
The binary for OSXFUSE from http://osxfuse.github.io/ (as suggested by the answer of Old Pro) does not have this problem, and therefore installing this one instead resolved it for me.

how to install libX11 on OSx 10.9?

I am trying to install ROOT (cern.root.ch). When I run ./configure , I get a message that libX11 is missing and must be installed.
I did some research and found that I need to install
) XQuartz (I already have the latest version.)
) Command line tools in Xcode.
I tried installing Command Line Tools from apple's developer website. The installation goes through smoothly but how do I know whether it has been installed? I still get libX11 missing error with root's configure command.
I also tried xcode-select --install and it once went through smoothly and then later again gives error saying this package is no longer maintained - or something of that sort.
I understand I may have multiple installations... But I am still facing the problem of not having libX11 and not being able to install ROOT.
Thanks,
Hershal.
This link and the one referenced in it suggests you use homebrew (brew) to install it
$ ruby <(curl -fsS https://raw.github.com/mxcl/homebrew/go)
$ brew doctor
Remember to add the Homebrew directory to your PATH by adding the directory (found with brew --prefix) to your .bashrc, .zshrc or whatever shell file you’re using (.bashrc is the OS X default). We’ll also add the XQuartz binaries to the PATH in case anything needs them in the future.
export PATH=/usr/local/bin:/opt/X11/bin:$PATH
Start a new Terminal session to pick up the changes.
Now that Homebrew is installed, we can use it to install the required dependencies. Each may take some time as Homebrew generally compiles from source.
$ brew install gfortran # Fortran compiler
$ brew install python # Python interpreter
$ brew install pcre # Regular Expressions library
$ brew install fftw # Fast Fourier Transforms
$ brew install cmake # Cross-platform make
install root
$ brew tap homebrew/science
$ brew install --with-cocoa root
You don't say whether you have installed XCode as well as the commandline tools but I think you will need it

How to install MIT Scheme on Mac?

I want to install MIT Scheme on my Mac, I have downloaded the MacOS X binary(x86-64).
However, I could not make it work using Mac Terminal.
I have tried to follow these articles:
Installing MIT/GNU Scheme on Mac OS X Leopard
Installing MIT Scheme on Mac OS X
but it seems out of date and does not work.
So, I'm looking for a simple method which allows me to write Scheme code using Mac Terminal.
I have struggled for hours to try to install it.
UPDATED FOR EL CAPITAN:
The best way that I've found was from here:
Download either the 32-bit or 64-bit dmg file for Scheme.
Double click the .dmg file, and you'll get this window, in which you should drag the "MIT/GNU Scheme" file into the Applications folder.
For the 32-bit version, run this command:
sudo ln -s /Applications/MIT\:GNU\ Scheme.app/Contents/Resources /usr/local/lib/mit-scheme-i386
Then enter your administrator password, and run this command:
sudo ln -s /usr/local/lib/mit-scheme-i386/mit-scheme /usr/local/bin/scheme
For the 64-bit version, first run this command:
sudo ln -s /Applications/MIT\:GNU\ Scheme.app/Contents/Resources /usr/local/lib/mit-scheme-x86-64
Then enter your administrator password and run this command:
sudo ln -s /usr/local/lib/mit-scheme-x86-64/mit-scheme /usr/local/bin/scheme
And that's it! Now you should be able to use MIT Scheme in your terminal by typing "scheme" into the command line:
Homebrew makes it easy for you. On Terminal, type:
ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go) ; brew install mit-scheme
Done!
Edit
The install script has been moved:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" ; brew install mit-scheme
For Yosemite 10.10.3:
After installing X11.app and homebrew,
$ brew tap homebrew/x11
$ brew install mit-scheme
I found it easier when a maintained package manager such as homebrew covers all the dependency and build stuff.
Edit: simply
$ brew install mit-scheme
would do. X11 is now optional instead of dependence. There is still an --with-x11 option which requires whole Xcode.
You can install scheme using homebrew using the following command
brew install mit-scheme
If you have the latest version of Mac system, El Capitan 10.11.2, You might need to do something different than above.
The first command will be same.
For the 64-bit version, first run this command:
sudo ln -s /Applications/MIT\:GNU\ Scheme.app/Contents/Resources /usr/local/lib/mit-scheme-x86-64
Then enter your administrator password and run this command:
sudo ln -s /usr/local/lib/mit-scheme-x86-64/mit-scheme /usr/local/bin/scheme
Note: The difference is you need to put local between /usr/ and /bin/
Type scheme in the terminal to see if it works. If you get the following screenshot, that means you succeed it.
Success Result
You definitely need to put local there.
The reason is this, Apple improved OS security in OSX 10.10 (rootless), and changes to the general system-wide binaries (such as /usr/bin) is not permitted.
If you are having trouble with the accepted answer from #virgil-ming, try this:
$ brew install Caskroom/cask/xquartz
$ brew install mit-scheme
Same idea, of course, but this got me up and running when brew tap homebrew/x11 responded with multiple conflicts.
As always, remember to brew update then try again when you are having problems, a la Homebrew's troubleshooting guide.
If you are using docker, and I recommend you do:
docker run -it inikolaev/alpine-scheme
will drop you right into a scheme REPL.
UPDATE FOR MAC OS HIGH SIERRA:
Worked for me just by executing (if you are using Homebrew):
brew install mit-scheme
If you are using MacPorts, the command is similar to what others have posted for homebrew -
sudo port install mit-scheme
That set me up pretty well on OS X 10.8.5
I came across a problem that the 10.x versions of the MIT/GNU Scheme do not support Mac OS X 10.11 El Capitan. In fact, it requires Mac OS X 10.13 or higher.
The topmost version supporting older Mac OS X versions is MIT/GNU Scheme 9.2.

Installing meld on OS X

After I got MacPorts installed and did a 'sudo port -v selfupdate', I try to install meld.
The installation just starts to Fetching all kinds of stuff
gnome-comoon
perl5.8
perl5
pkgconfig
.....
this goes on and on.
Is that normal?
You may want to install it via HomeBrew (already mentioned before):
brew install homebrew/gui/meld
Though you may face stability issues (as I did). So I'd rather recommend to use "Meld for OSX":
Go to https://yousseb.github.io/meld/
Download DMG file you prefer (e.g. "Download latest DMG" https://github.com/yousseb/meld/releases/download/osx-6/meldmerge.dmg)
Install it to your Applications folder
We are basically done, but it is not accessible via command line.
Solution:
Write a small wrapper to run from Terminal:
echo -e '#!/bin/sh
params="$#"
open -W -a Meld --args $params' | sudo tee /usr/local/bin/meld
sudo chmod +x /usr/local/bin/meld
Try (you must use absolute paths though):
meld /home/a.txt /home/b.txt
Or just run Meld from menu.
meld is now available in homebrew. The formula can be found here.
See this answer by cmedeiros on SuperUser for more information on installing and getting it to work. This is much easier than using MacPorts.
Current command with updated formula to install meld with homebrew is:
brew install caskroom/cask/meld
Yes, it is normal to pull in dependencies but it shouldn't take too long. For comparison, installing Meld with Homebrew took about 15 minutes for me.
For reference, my installation of Meld on OS X Mavericks:
Install Xcode from the app store
Install XQuartz from package (Meld will complain if you don't have it)
command line: 'brew install meld'
If you are prompted to install the Xcode command line tools at some point, do so.
Hope this helps.
Unfortunately, the is very normal with MacPorts, and is the reason that people many have switched to homebrew http://github.com/mxcl/homebrew
However, I found this post because homebrew doesn't include Meld. Sigh.
Consider downloading macOS meld version dmg https://github.com/yousseb/meld/releases/
Brew now works brew install --cask meld.
See https://formulae.brew.sh/cask/meld#default
UPDATE Jul-23-2020
Just do :
brew install homebrew/gui/meld
using the updated brew link: brew install caskroom/cask/meld
even after this its not working when I install backup and restore tool by google. I guess its messing up with the python version.

Resources