본문 바로가기

IT/MacOs, 맥북

macOS 에서 NTFS 형태의 외장 하드 사용하기

macOS 에서 NTFS 형태의 외장 하드 사용하기

맥북을 사용하던중에 하드디스크 용량 부족으로 용량이 큰 몇몇 파일을 외장하드로 이동하려고 하였습니다. 외장하드를 마운트하고 폴더를 생성하려고 하니 새폴더 메뉴 자체가 보이지도 않고 파일 붙여넣기도 안됩니다. 이유는 외장하드의 파티션이 NTFS로 되어서 쓰기가 허용되지 않고 있었던 것입니다.

해결 방법은 Tuxer NTFS 또는 Paragon NTFS라는 어플리케이션을 설치하면 된다고 합니다. 하지만 모두 유료 프로그램입니다. ntfs–3g라는 어플은 무료로 사용할 수 있네요.

다음은 ntfs–3g를 설치하는 과정입니다. 해당 과정은 씨에라 환경에서 루트리스가 해제된 상태로 실행하였습니다.

$ brew install homebrew/fuse/ntfs-3g
==> Tapping homebrew/fuse
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-fuse'...
remote: Counting objects: 34, done.
remote: Compressing objects: 100% (34/34), done.
remote: Total 34 (delta 0), reused 15 (delta 0), pack-reused 0
Unpacking objects: 100% (34/34), done.
Checking connectivity... done.
Tapped 28 formulae (86 files, 73.8K)
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
==> Installing ntfs-3g from homebrew/fuse
osxfuse: Building this formula from source isn't possible due to OS X
Yosemite and above's strict unsigned kext ban.

You can install with Homebrew Cask:
  brew install Caskroom/cask/osxfuse

You can download from:
  https://sourceforge.net/projects/osxfuse/files/
Error: An unsatisfied requirement failed this build.

에러 메시지 발생입니다. brew install Caskroom/cask/osxfuse을 실행하라는 메시지가 보입니다. 명령을 실행해봅니다.

$ brew install Caskroom/cask/osxfuse
==> Tapping caskroom/cask
Cloning into '/usr/local/Library/Taps/caskroom/homebrew-cask'...
remote: Counting objects: 3702, done.
remote: Compressing objects: 100% (3686/3686), done.
remote: Total 3702 (delta 36), reused 355 (delta 12), pack-reused 0
Receiving objects: 100% (3702/3702), 1.23 MiB | 0 bytes/s, done.
Resolving deltas: 100% (36/36), done.
Checking connectivity... done.
Tapped 0 formulae (3,710 files, 3.8M)
==> brew cask install Caskroom/cask/osxfuse
Error: Unknown command: cask
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.

다시 에러 메시지 발생입니다 Unknown command: cask 아마도 cack가 설치되지 않아서 그런걸까요. cask를 설치합니다.

$brew install cask
Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
==> Installing dependencies for cask: xz, pkg-config, emacs
==> Installing cask dependency: xz
==> Downloading https://fossies.org/linux/misc/xz-5.2.2.tar.gz
==> Downloading from https://fossies.org/linux/misc/legacy/xz-5.2.2.tar.gz
######################################################################## 100.0%
==> ./configure --disable-silent-rules --prefix=/usr/local/Cellar/xz/5.2.2
Last 15 lines from /Users/woody/Library/Logs/Homebrew/xz/01.configure:
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether ln -s works... yes
checking for style of include used by make... GNU
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... configure: error: in `/private/tmp/xz-20170311-66961-og7vdt/xz-5.2.2':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details

READ THIS: https://git.io/brew-troubleshooting
If reporting this issue please do so at (not Homebrew/brew):
  https://github.com/Homebrew/homebrew-core/issues

Warning: You are using OS X 10.12.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.

설치가 된듯합니다. cask를 실행해봅니다. 여전히 에러 메시지 발생입니다.

$brew cask
Error: Unknown command: cask  

이 문제를 해결하기 다음의 과정을 수행하였습니다. brew install Caskroom/cask/osxfuse를 실행후 에러가 없었다면 다음의 과정의 수행은 불필요합니다.

$ brew update
Error: /usr/local must be writable!

$ 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 is not writable.

You should probably change the ownership and permissions of /usr/local
back to your user account.
  sudo chown -R $(whoami) /usr/local

$ sudo chown -R $(whoami) /usr/local
$ brew update
$ brew cleanup  
$ brew cask cleanup  
$ brew install Caskroom/cask/osxfuse
....
Error: Your Xcode (7.3) is too outdated.
Please update to Xcode 8.2 (or delete it).
Xcode can be updated from the App Store.

Xcode를 업데이트합니다.
======== install Xcode 8.2.1 ======== 

리부트합니다.
======== reboot ========

osxfuse를 재설치 시도합니다.
$ brew install Caskroom/cask/osxfuse

ntfs–3g를 다시 설치합니다.

$ brew install homebrew/fuse/ntfs-3g
$ sudo mv /sbin/mount_ntfs /sbin/mount_ntfs.original
$ sudo ln -s /usr/local/Cellar/ntfs-3g/2016.2.22/sbin/mount_ntfs /sbin/mount_ntfs

리부팅후에 외장하드를 마운트하고 파일의 복사를 할 수 있었습니다.

위의 과정은 다음의 문서를 참조하였습니다.

  • https://gist.github.com/bjorgvino/f24e5c079b92f921b765
  • https://til.codes/brew-cask-error-unknown-command-cask/
  • https://github.com/Homebrew/legacy-homebrew/issues/49895