Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.59k stars 12.34k forks source link

Homebrew mosquitto formula does not install binary at correct place (macOS 10.13.4) #28506

Closed MoeweX closed 6 years ago

MoeweX commented 6 years ago

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

~ 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 or file an issue; just ignore this. Thanks!

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
  /usr/local/include/node/android-ifaddrs.h
  /usr/local/include/node/libplatform/libplatform-export.h
  /usr/local/include/node/libplatform/libplatform.h
  /usr/local/include/node/libplatform/v8-tracing.h
  /usr/local/include/node/node.h
  /usr/local/include/node/node_api.h
  /usr/local/include/node/node_api_types.h
  /usr/local/include/node/node_buffer.h
  /usr/local/include/node/node_object_wrap.h
  /usr/local/include/node/node_version.h
  /usr/local/include/node/openssl/aes.h
  /usr/local/include/node/openssl/archs/BSD-x86/opensslconf.h
  /usr/local/include/node/openssl/archs/BSD-x86_64/opensslconf.h
  /usr/local/include/node/openssl/archs/VC-WIN32/opensslconf.h
  /usr/local/include/node/openssl/archs/VC-WIN64A/opensslconf.h
  /usr/local/include/node/openssl/archs/aix-gcc/opensslconf.h
  /usr/local/include/node/openssl/archs/aix64-gcc/opensslconf.h
  /usr/local/include/node/openssl/archs/darwin-i386-cc/opensslconf.h
  /usr/local/include/node/openssl/archs/darwin64-x86_64-cc/opensslconf.h
  /usr/local/include/node/openssl/archs/linux-aarch64/opensslconf.h
  /usr/local/include/node/openssl/archs/linux-armv4/opensslconf.h
  /usr/local/include/node/openssl/archs/linux-elf/opensslconf.h
  /usr/local/include/node/openssl/archs/linux-ppc/opensslconf.h
  /usr/local/include/node/openssl/archs/linux-ppc64/opensslconf.h
  /usr/local/include/node/openssl/archs/linux-x32/opensslconf.h
  /usr/local/include/node/openssl/archs/linux-x86_64/opensslconf.h
  /usr/local/include/node/openssl/archs/linux32-s390x/opensslconf.h
  /usr/local/include/node/openssl/archs/linux64-s390x/opensslconf.h
  /usr/local/include/node/openssl/archs/solaris-x86-gcc/opensslconf.h
  /usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/opensslconf.h
  /usr/local/include/node/openssl/asn1.h
  /usr/local/include/node/openssl/asn1_mac.h
  /usr/local/include/node/openssl/asn1t.h
  /usr/local/include/node/openssl/bio.h
  /usr/local/include/node/openssl/blowfish.h
  /usr/local/include/node/openssl/bn.h
  /usr/local/include/node/openssl/buffer.h
  /usr/local/include/node/openssl/camellia.h
  /usr/local/include/node/openssl/cast.h
  /usr/local/include/node/openssl/cmac.h
  /usr/local/include/node/openssl/cms.h
  /usr/local/include/node/openssl/comp.h
  /usr/local/include/node/openssl/conf.h
  /usr/local/include/node/openssl/conf_api.h
  /usr/local/include/node/openssl/crypto.h
  /usr/local/include/node/openssl/des.h
  /usr/local/include/node/openssl/des_old.h
  /usr/local/include/node/openssl/dh.h
  /usr/local/include/node/openssl/dsa.h
  /usr/local/include/node/openssl/dso.h
  /usr/local/include/node/openssl/dtls1.h
  /usr/local/include/node/openssl/e_os2.h
  /usr/local/include/node/openssl/ebcdic.h
  /usr/local/include/node/openssl/ec.h
  /usr/local/include/node/openssl/ecdh.h
  /usr/local/include/node/openssl/ecdsa.h
  /usr/local/include/node/openssl/engine.h
  /usr/local/include/node/openssl/err.h
  /usr/local/include/node/openssl/evp.h
  /usr/local/include/node/openssl/hmac.h
  /usr/local/include/node/openssl/idea.h
  /usr/local/include/node/openssl/krb5_asn.h
  /usr/local/include/node/openssl/kssl.h
  /usr/local/include/node/openssl/lhash.h
  /usr/local/include/node/openssl/md4.h
  /usr/local/include/node/openssl/md5.h
  /usr/local/include/node/openssl/mdc2.h
  /usr/local/include/node/openssl/modes.h
  /usr/local/include/node/openssl/obj_mac.h
  /usr/local/include/node/openssl/objects.h
  /usr/local/include/node/openssl/ocsp.h
  /usr/local/include/node/openssl/opensslconf.h
  /usr/local/include/node/openssl/opensslv.h
  /usr/local/include/node/openssl/ossl_typ.h
  /usr/local/include/node/openssl/pem.h
  /usr/local/include/node/openssl/pem2.h
  /usr/local/include/node/openssl/pkcs12.h
  /usr/local/include/node/openssl/pkcs7.h
  /usr/local/include/node/openssl/pqueue.h
  /usr/local/include/node/openssl/rand.h
  /usr/local/include/node/openssl/rc2.h
  /usr/local/include/node/openssl/rc4.h
  /usr/local/include/node/openssl/ripemd.h
  /usr/local/include/node/openssl/rsa.h
  /usr/local/include/node/openssl/safestack.h
  /usr/local/include/node/openssl/seed.h
  /usr/local/include/node/openssl/sha.h
  /usr/local/include/node/openssl/srp.h
  /usr/local/include/node/openssl/srtp.h
  /usr/local/include/node/openssl/ssl.h
  /usr/local/include/node/openssl/ssl2.h
  /usr/local/include/node/openssl/ssl23.h
  /usr/local/include/node/openssl/ssl3.h
  /usr/local/include/node/openssl/stack.h
  /usr/local/include/node/openssl/symhacks.h
  /usr/local/include/node/openssl/tls1.h
  /usr/local/include/node/openssl/ts.h
  /usr/local/include/node/openssl/txt_db.h
  /usr/local/include/node/openssl/ui.h
  /usr/local/include/node/openssl/ui_compat.h
  /usr/local/include/node/openssl/whrlpool.h
  /usr/local/include/node/openssl/x509.h
  /usr/local/include/node/openssl/x509_vfy.h
  /usr/local/include/node/openssl/x509v3.h
  /usr/local/include/node/pthread-barrier.h
  /usr/local/include/node/stdint-msvc2008.h
  /usr/local/include/node/tree.h
  /usr/local/include/node/uv-aix.h
  /usr/local/include/node/uv-bsd.h
  /usr/local/include/node/uv-darwin.h
  /usr/local/include/node/uv-errno.h
  /usr/local/include/node/uv-linux.h
  /usr/local/include/node/uv-os390.h
  /usr/local/include/node/uv-posix.h
  /usr/local/include/node/uv-sunos.h
  /usr/local/include/node/uv-threadpool.h
  /usr/local/include/node/uv-unix.h
  /usr/local/include/node/uv-version.h
  /usr/local/include/node/uv-win.h
  /usr/local/include/node/uv.h
  /usr/local/include/node/v8-debug.h
  /usr/local/include/node/v8-inspector-protocol.h
  /usr/local/include/node/v8-inspector.h
  /usr/local/include/node/v8-platform.h
  /usr/local/include/node/v8-profiler.h
  /usr/local/include/node/v8-testing.h
  /usr/local/include/node/v8-util.h
  /usr/local/include/node/v8-value-serializer-version.h
  /usr/local/include/node/v8-version-string.h
  /usr/local/include/node/v8-version.h
  /usr/local/include/node/v8.h
  /usr/local/include/node/v8config.h
  /usr/local/include/node/zconf.h
  /usr/local/include/node/zlib.h

Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so
  echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile

To help us debug your issue please explain:

To have launchd start mosquitto now and restart at login: brew services start mosquitto Or, if you don't want/need a background service you can just run: mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf ==> Summary 🍺 /usr/local/Cellar/mosquitto/1.4.14_2: 33 files, 629.8KB



- What you expected to happen
I would expect to be able to use mosquitto. However, the binary `mosquitto` is not installed correctly. I discussed the issue already at [discourse](https://discourse.brew.sh/t/homebrew-mosquitto-formula-does-not-install-binary/2291), @apjanke found out that the bin is installed at `$HOMEBREW_PREFIX/sbin`. Gets also clear from the `brew doctor` output above.

- Step-by-step reproduction instructions (by running `brew install` commands)
Just run `brew install mosquitto` on macOS 10.13.4.
apjanke commented 6 years ago

Aha: looks like this might be a simple shell configuration problem:

Warning: Homebrew's sbin was not found in your PATH but you have installed
formulae that put executables in /usr/local/sbin.
Consider setting the PATH for example like so
  echo 'export PATH="/usr/local/sbin:$PATH"' >> ~/.bash_profile

Try doing that.

MoeweX commented 6 years ago

This works fine, but I thought homebrew is not supposed to install formula binaries at sbin?

apjanke commented 6 years ago

It is, actually. The issue I was referring to on discourse — what happened to me when I tried to install mosquitto — is that brew should ensure that the sbin directory exists first, probably creating it if necessary, and not error out due to a missing directory there. I had assumed that this was the problem for you too, but looking at this longer doctor output, it seems like your installation worked correctly, and you just need your $PATH configured.

MoeweX commented 6 years ago

Alright, then thanks!

apjanke commented 6 years ago

Note to self and other maintainers: it looks like my /usr/local/sbin directory disappeared during my upgrade to 10.12 or 10.13; it wasn't overlooked by the brew installer. Maybe should add a check for its existence into doctor; which currently intentionally ignores missing sbin dirs.

ilovezfs commented 6 years ago

I believe there is a dot file you can add to an empty dir to tell the macOS installer to back off. Perhaps we should add that to the install script for brew.

DomT4 commented 6 years ago

.com.apple.installer.keep may be the one you're looking for.

ilovezfs commented 6 years ago

Yeah that. Probably any file woks so that dir is non-empty but just a guess.

doutdex commented 6 years ago

I have the same issue macOS 10.13.4 (17E202)

brew install mosquito

==> Downloading https://homebrew.bintray.com/bottles/mosquitto-1.4.14_2.high_sierra.bottle.tar.gz Already downloaded: /Users/doutdex/Library/Caches/Homebrew/mosquitto-1.4.14_2.high_sierra.bottle.tar.gz ==> Pouring mosquitto-1.4.14_2.high_sierra.bottle.tar.gz Error: The brew link step did not complete successfully The formula built, but is not symlinked into /usr/local Could not symlink sbin/mosquitto /usr/local/sbin is not writable.

Directory "/usr/local/sbin" doesn't exist!