Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to link ntfs-3g with homebrew?

Forgive me if this is elsewhere, but I can't find it.

I am trying to install NTFS-3G on OS X 10.11 (El Capitan).

I am following the process at this link

But the step to install NTFS-3G reports:

$ brew install homebrew/fuse/ntfs-3g
Warning: homebrew/fuse/ntfs-3g-2015.3.14 already installed, it's just not linked

So...

  1. How do I just link the installed item?

  2. Once that's done, how do I complete the install process? Is there anything that the 'brew install...' process would do after linking?

EDIT: Following bfontaine... I get:

$ brew link homebrew/fuse/ntfs-3g                                
Linking /usr/local/Cellar/ntfs-3g/2015.3.14... 
Error: Could not symlink share/doc/ntfs-3g/README
Target /usr/local/share/doc/ntfs-3g/README
already exists. You may want to remove it:
  rm '/usr/local/share/doc/ntfs-3g/README'

To force the link and overwrite all conflicting files:
  brew link --overwrite ntfs-3g

To list all files that would be deleted:
  brew link --overwrite --dry-run ntfs-3g
$ brew link --overwrite homebrew/fuse/ntfs-3g
Linking /usr/local/Cellar/ntfs-3g/2015.3.14... 
Error: Could not symlink share/doc/ntfs-3g/README
/usr/local/share/doc/ntfs-3g is not writable.

Am I going down a hole? If I brew uninstall, will it clean everything up, or do I have to manually clean it up?

This is getting messy...

EDIT2: The output of brew link --overwrite --dry-run is:

$ brew link --overwrite --dry-run homebrew/fuse/ntfs-3g
Would remove:
/usr/local/include/ntfs-3g/acls.h
/usr/local/include/ntfs-3g/attrib.h
/usr/local/include/ntfs-3g/attrlist.h
/usr/local/include/ntfs-3g/bitmap.h
/usr/local/include/ntfs-3g/bootsect.h
/usr/local/include/ntfs-3g/cache.h
/usr/local/include/ntfs-3g/collate.h
/usr/local/include/ntfs-3g/compat.h
/usr/local/include/ntfs-3g/compress.h
/usr/local/include/ntfs-3g/debug.h
/usr/local/include/ntfs-3g/device.h
/usr/local/include/ntfs-3g/device_io.h
/usr/local/include/ntfs-3g/dir.h
/usr/local/include/ntfs-3g/ea.h
/usr/local/include/ntfs-3g/efs.h
/usr/local/include/ntfs-3g/endians.h
/usr/local/include/ntfs-3g/index.h
/usr/local/include/ntfs-3g/inode.h
/usr/local/include/ntfs-3g/ioctl.h
/usr/local/include/ntfs-3g/layout.h
/usr/local/include/ntfs-3g/lcnalloc.h
/usr/local/include/ntfs-3g/logfile.h
/usr/local/include/ntfs-3g/logging.h
/usr/local/include/ntfs-3g/mft.h
/usr/local/include/ntfs-3g/misc.h
/usr/local/include/ntfs-3g/mst.h
/usr/local/include/ntfs-3g/ntfstime.h
/usr/local/include/ntfs-3g/object_id.h
/usr/local/include/ntfs-3g/param.h
/usr/local/include/ntfs-3g/realpath.h
/usr/local/include/ntfs-3g/reparse.h
/usr/local/include/ntfs-3g/runlist.h
/usr/local/include/ntfs-3g/security.h
/usr/local/include/ntfs-3g/support.h
/usr/local/include/ntfs-3g/types.h
/usr/local/include/ntfs-3g/unistr.h
/usr/local/include/ntfs-3g/volume.h
/usr/local/include/ntfs-3g/xattrs.h
/usr/local/share/man/man8/mkfs.ntfs.8 -> /usr/local/share/man/man8/mkntfs.8
/usr/local/share/man/man8/mkntfs.8
/usr/local/share/man/man8/mount.lowntfs-3g.8 -> /usr/local/share/man/man8/ntfs-3g.8
/usr/local/share/man/man8/mount.ntfs-3g.8 -> /usr/local/share/man/man8/ntfs-3g.8
/usr/local/share/man/man8/ntfs-3g.8
/usr/local/share/man/man8/ntfs-3g.probe.8
/usr/local/share/man/man8/ntfs-3g.secaudit.8
/usr/local/share/man/man8/ntfs-3g.usermap.8
/usr/local/share/man/man8/ntfscat.8
/usr/local/share/man/man8/ntfsclone.8
/usr/local/share/man/man8/ntfscluster.8
/usr/local/share/man/man8/ntfscmp.8
/usr/local/share/man/man8/ntfscp.8
/usr/local/share/man/man8/ntfsfix.8
/usr/local/share/man/man8/ntfsinfo.8
/usr/local/share/man/man8/ntfslabel.8
/usr/local/share/man/man8/ntfsls.8
/usr/local/share/man/man8/ntfsprogs.8
/usr/local/share/man/man8/ntfsresize.8
/usr/local/share/man/man8/ntfsundelete.8
/usr/local/lib/libntfs-3g.86.dylib
/usr/local/lib/libntfs-3g.a
/usr/local/lib/libntfs-3g.dylib -> /usr/local/lib/libntfs-3g.86.dylib
/usr/local/lib/pkgconfig/libntfs-3g.pc
$ 

but even after 'brew uninstall...' the directory /usr/local/include/ntfs-3g still exists

like image 950
Robert Achmann Avatar asked Oct 22 '15 21:10

Robert Achmann


1 Answers

Use brew link homebrew/fuse/ntfs-3g.


To go further here are the common commands relevant here:

brew install <formula>   # install (and link) the formula
brew unlink <formula>    # unlink the formula
brew link <formula>      # link the formula
brew uninstall <formula> # uninstall (and unlink) the formula

To understand this you need to know that when Homebrew installs a formula foo version 1.2.3, it installs everything under /usr/local/Cellar/foo/1.2.3/ then symlinks all binaries in /usr/local/bin; all manpages under /usr/local/share/man; etc. This means that /usr/local/bin/something is not a binary but a symlink to the relevant binary (e.g. /usr/local/Cellar/foo/1.2.3/bin/something).
Sometimes binaries conflict with each other. For example both mysql and mariadb provide a mysql binary. Homebrew won’t be able to link both at the same time so it allows you to install one; unlink it; then install the other. That way you can have both on your system without conflict.

like image 175
bfontaine Avatar answered Oct 17 '22 20:10

bfontaine