1

注意到 NTFS-3G 的推荐安装是五年前的 2010.10.2,因为它可以方便地以 .pkg 的形式获得,我想尝试从官方网站编译最新的 2015.3.14 。请注意,我不想从 Brew 或 Macports 安装它,而是手动安装

所以我尝试了:

./configure && make && sudo make install

但它告诉我pkg-config没有安装,所以我从http://www.freedesktop.org/wiki/Software/pkg-config/安装它./configure --with-internal-glib; make; sudo make install,我得到了:

[...]
Making install in .
 ./install-sh -c -d '/usr/local/bin'
  /bin/sh ./libtool   --mode=install /usr/bin/install -c pkg-config '/usr/local/bin'
libtool: install: /usr/bin/install -c pkg-config /usr/local/bin/pkg-config
/Applications/Xcode.app/Contents/Developer/usr/bin/make  install-exec-hook
cd /usr/local/bin && ln pkg-config x86_64-apple-darwin15.0.0-pkg-config
ln: x86_64-apple-darwin15.0.0-pkg-config: File exists
make[3]: *** [install-exec-hook] Error 1
make[2]: *** [install-exec-am] Error 2
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1

我忽略了它,我再次尝试安装 NTFS-3G:

./configure && make && sudo make install

但是这次我得到了:

[...]
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /usr/local/lib/libntfs-3g.a(libntfs_3g_la-compat.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /usr/local/lib/libntfs-3g.a(libntfs_3g_la-debug.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: /usr/local/lib/libntfs-3g.a(libntfs_3g_la-realpath.o) has no symbols
/Applications/Xcode.app/Contents/Developer/usr/bin/make  install-exec-hook
if [ ! "/lib" -ef "/usr/local/lib" ]; then \
        /bin/mv -f "//usr/local/lib"/libntfs-3g.so* "//lib";  \
    fi
mv: rename //usr/local/lib/libntfs-3g.so* to //lib/libntfs-3g.so*: No such file or directory
make[3]: *** [install-exec-hook] Error 1
make[2]: *** [install-exec-am] Error 2
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1

然后我尝试了:

./configure --exec-prefix=/ && make && sudo make install

但我得到了:

[...]
install: //bin/ntfsfix: Operation not permitted
make[2]: *** [install-binPROGRAMS] Error 71
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1

然后我尝试了:

./configure --exec-prefix=/usr/local && make && sudo make install

但我得到了:

[...]
install: chmod 755 /sbin: Operation not permitted
ln -s -f /usr/local/sbin/mkntfs /sbin/mkfs.ntfs
ln: /sbin/mkfs.ntfs: Operation not permitted
make[3]: *** [install-exec-hook] Error 1
make[2]: *** [install-exec-am] Error 2
make[1]: *** [install-am] Error 2
make: *** [install-recursive] Error 1

我正在使用 OS X 10.11 El Capitan。

4

1 回答 1

7

看来这是源头的问题。Erik Larsson于 2015 年 6 月 23 日对其进行了修复。非常感谢。现在可以从边缘源 git://git.code.sf.net/p/ntfs-3g/ntfs-3g 编译

最好从http://brew.sh获取 brew然后安装:

brew install automake
brew install libtool
brew install libgcrypt
brew install pkg-config

然后你可以编译和安装 NTFS-3G(从它的文件夹):

./autogen.sh
./configure --prefix=/usr/local --mandir=/usr/local/share/man --exec_prefix=/usr/local
make
sudo make install

一个缺点:brew 和 ntfs-3g 都竞争文件夹 /usr/local/。

于 2015-06-23T21:58:45.597 回答