0

I'm trying to install Tor on my Mac but it shows the following error:

/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
  CCLD     src/or/tor
Undefined symbols for architecture x86_64:
  "_SSL_set_session_secret_cb", referenced from:
      _tor_tls_new in libor-crypto.a(tortls.o)
      _tor_tls_session_secret_cb in libor-crypto.a(tortls.o)
  "_EVP_aes_128_ctr", referenced from:
      _aes_new_cipher in libor-crypto.a(aes.o)
  "_CRYPTO_THREADID_set_numeric", referenced from:
      _tor_set_openssl_thread_id in libor-crypto.a(crypto.o)
  "_CRYPTO_THREADID_set_callback", referenced from:
      _crypto_early_init in libor-crypto.a(crypto.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [src/or/tor] Error 1
make: *** [all] Error 2
Jobiwan
  • 3,685
  • 2
  • 19
  • 31

1 Answers1

2

This is a linker error, meaning you're (probably) missing a library that's required for Tor to build properly.

Undefined symbols for architecture x86_64: "_SSL_set_session_secret_cb", referenced from: _tor_tls_new in libor-crypto.a(tortls.o)

These mean that the Tor code is trying to use _SSL_set_session_secret_cb, _EVP_aes_128_ctr, _CRYPTO_THREADID_set_numeric, and _CRYPTO_THREADID_set_callback, but can't find them. This means they must reside in some code - probably a library - that either isn't on your machine, or is in the "wrong" place. (i.e. A place where the compiler doesn't know to look.)

A quick Google shows that they're part of OpenSSL, which suggests that libssl isn't present.

Assuming you're on Ubuntu (or another Debian-based system), you can following the instructions described here to either install the library, or check it's in the correct place.

To install on Mac, see this thread: https://stackoverflow.com/questions/9874728/openssl-install-issue-to-mac

Edit:

In fact, full details of the libraries that are required are included in a previous (Ubuntu-related) thread: How can I install Tor from the source code in the Git repository?

Richard Horrocks
  • 3,155
  • 1
  • 15
  • 24