Error: Operation not permitted @ dir_s_mkdir - /var/empty/Library

$ brew install jpeg

Error: Operation not permitted @ dir_s_mkdir - /var/empty/Library

Warning: Bottle installation failed: building from source.

Error: An exception occurred within a child process:

Errno::EPERM: Operation not permitted @ dir_s_mkdir - /var/empty/Library

Not even root can modify /var/empty… What do I do to brew again? brew doctor says all is well.

Mojave for what it’s worth and I’ve installed many things before today.

What does brew config say?

I got the same run down… So after I clean installed…

rtus01m-lwgg7l:~ jeward$ brew config
HEAD: 2b83463091513826127c14acae81a7c354dfce69
Last commit: 3 weeks ago
Core tap ORIGIN:
Core tap HEAD: a9ceafc03d910441df82090bb1f92085e2a3aed9
Core tap last commit: 3 weeks ago
CPU: quad-core 64-bit skylake
Homebrew Ruby: 2.3.7 => /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
Clang: 10.0 build 1001
Git: 2.20.1 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.54.0 => /usr/bin/curl
macOS: 10.14.6-x86_64
Xcode: N/A
CLT headers:
XQuartz: 2.7.11 => /opt/X11