I'm trying to compile thttpd 2.27 on Mac OS X 10.11 from source, but when I issue:


It shows:

creating cache ./config.cache
checking host system type... configure: error: can not guess host type; you must specify one

I try to search online, someone said I should copy some files from /usr/share/libtool/config* but the path does not exist in Mac OS X 10.11.

How can I resolve this problem?

p.s. I have Xcode (with Command Line Tools), Homebrew, libtool, automake and other build tools installed, but I still can't configure & compile this.

1 Answer 1


You have at least two options:

  1. Install MacPorts. Install thttpd with this command:

    sudo port install thttpd

    I am not using MacPorts and this is untested.

  2. Download config.sub.diff and config.guess.diff and put them into thttpd source directory. Execute these commands to patch the config files:

    patch -R < config.sub.diff
    patch -R < config.guess.diff

    It will compile the source. You may now consider to install compiled binary.

[Original source of diff files is here.]

  • MacPorts tested & working well. Tested on MacPorts 2.3.4 to install thttpd 2.26
    – Raptor
    Apr 27, 2016 at 2:56
  • the only problem is, I cannot find the thttpd.conf in the system.
    – Raptor
    May 4, 2016 at 11:39
  • @Raptor did you install with MacPorts or by compiling? Maybe the config file is in /etc/thttpd.conf or /opt/local/etc/thttpd.conf? It depends on the MacPorts prefix. If you are executing the binary file manually, path of the config file can be passed with -C path/to/thttpd.conf. You can get a minimum config file from ftp.slackbuilds.org/13.37/network/thttpd/thttpd.conf May 5, 2016 at 13:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .