<div id="docs-body">
 <div class="section">
  <div class="titlepage">
   <div>
    <div>
     <h3 class="title">
      <a name="source-installation-prerequisites">
      </a>
      2.8.2 Source Installation Prerequisites
     </h3>
    </div>
   </div>
  </div>
  <p>
   Installation of MySQL from source requires several development
      tools. Some of these tools are needed no matter whether you use a
      standard source distribution or a development source tree. Other
      tool requirements depend on which installation method you use.
  </p>
  <p>
   To install MySQL from source, the following system requirements
      must be satisfied, regardless of installation method:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      <span class="command">
       <strong>
        CMake
       </strong>
      </span>
      , which is used as the build framework
          on all platforms.
      <span class="command">
       <strong>
        CMake
       </strong>
      </span>
      can be downloaded
          from
      <a class="ulink" href="http://www.cmake.org" target="_blank">
       http://www.cmake.org
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      A good
      <span class="command">
       <strong>
        make
       </strong>
      </span>
      program. Although some
          platforms come with their own
      <span class="command">
       <strong>
        make
       </strong>
      </span>
      implementations, it is highly recommended that you use GNU
      <span class="command">
       <strong>
        make
       </strong>
      </span>
      3.75 or later. It may already be
          available on your system as
      <span class="command">
       <strong>
        gmake
       </strong>
      </span>
      . GNU
      <span class="command">
       <strong>
        make
       </strong>
      </span>
      is available from
      <a class="ulink" href="http://www.gnu.org/software/make/" target="_blank">
       http://www.gnu.org/software/make/
      </a>
      .
     </p>
     <p>
      On Unix-like systems, including Linux, you can check your
          system's version of
      <span class="command">
       <strong>
        make
       </strong>
      </span>
      like this:
     </p>
     <div class="copytoclipboard-wrapper">
      <pre class="programlisting language-terminal"><div class="docs-select-all right" id="sa4733114"><div class="copy-help left">Press ⌘+C to copy</div> <div class="right"><button class="clipboard-btn" title="Copy to Clipboard"><span class="icon-clipboard"></span></button></div></div><code class="language-terminal"><span class="token prompt">$&gt; </span><span class="token command">make</span> <span class="token property">--version</span>
GNU Make 4<span class="token punctuation">.</span>2<span class="token punctuation">.</span>1</code></pre>
     </div>
    </li>
    <li class="listitem">
     <p>
      MySQL 8.4 source code permits use of C++17
          features. To enable the necessary level of C++17 support
          across all supported platforms, the following minimum compiler
          versions apply:
     </p>
     <div class="itemizedlist">
      <ul class="itemizedlist" style="list-style-type: circle; ">
       <li class="listitem">
        <p>
         Linux: GCC 10 or Clang 12
        </p>
       </li>
       <li class="listitem">
        <p>
         macOS: XCode 10
        </p>
       </li>
       <li class="listitem">
        <p>
         Solaris: (
         <span class="emphasis">
          <em>
           Prior to MySQL 8.4.4
          </em>
         </span>
         ) GCC
              10; (
         <span class="emphasis">
          <em>
           MySQL 8.4.4 and later
          </em>
         </span>
         ) GCC 11.4
        </p>
       </li>
       <li class="listitem">
        <p>
         Windows: Visual Studio 2019
        </p>
       </li>
      </ul>
     </div>
    </li>
    <li class="listitem">
     <p>
      The MySQL C API requires a C++ or C99 compiler to compile.
     </p>
    </li>
    <li class="listitem">
     <p>
      An SSL library is required for support of encrypted
          connections, entropy for random number generation, and other
          encryption-related operations. By default, the build uses the
          OpenSSL library installed on the host system. To specify the
          library explicitly, use the
      <a class="link" href="source-configuration-options.html#option_cmake_with_ssl">
       <code class="option">
        WITH_SSL
       </code>
      </a>
      option when you invoke
      <span class="command">
       <strong>
        CMake
       </strong>
      </span>
      . For additional information, see
      <a class="xref" href="source-ssl-library-configuration.html" title="2.8.6 Configuring SSL Library Support">
       Section 2.8.6, “Configuring SSL Library Support”
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      The
      <a class="ulink" href="http://www.boost.org/" target="_blank">
       Boost C++
          libraries
      </a>
      are required to build MySQL (but not to use
          it). In MySQL 8.3 and later, these libraries are always
          bundled with the MySQL source.
     </p>
    </li>
    <li class="listitem">
     <p>
      The
      <a class="ulink" href="https://www.gnu.org/software/ncurses/ncurses.html" target="_blank">
       ncurses
      </a>
      library.
     </p>
    </li>
    <li class="listitem">
     <p>
      Sufficient free memory. If you encounter build errors such as
      <span class="errortext">
       internal compiler error
      </span>
      when compiling
          large source files, it may be that you have too little memory.
          If compiling on a virtual machine, try increasing the memory
          allocation.
     </p>
    </li>
    <li class="listitem">
     <p>
      Perl is needed if you intend to run test scripts. Most
          Unix-like systems include Perl. For Windows, you can use
      <a class="ulink" href="https://www.activestate.com/products/perl/" target="_blank">
       ActiveState
          Perl
      </a>
      . or
      <a class="ulink" href="https://strawberryperl.com/" target="_blank">
       Strawberry
          Perl
      </a>
      .
     </p>
    </li>
   </ul>
  </div>
  <p>
   To install MySQL from a standard source distribution, one of the
      following tools is required to unpack the distribution file:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      For a
      <code class="filename">
       .tar.gz
      </code>
      compressed
      <span class="command">
       <strong>
        tar
       </strong>
      </span>
      file: GNU
      <code class="literal">
       gunzip
      </code>
      to
          uncompress the distribution and a reasonable
      <span class="command">
       <strong>
        tar
       </strong>
      </span>
      to unpack it. If your
      <span class="command">
       <strong>
        tar
       </strong>
      </span>
      program supports the
      <code class="literal">
       z
      </code>
      option, it can both uncompress and unpack
          the file.
     </p>
     <p>
      GNU
      <span class="command">
       <strong>
        tar
       </strong>
      </span>
      is known to work. The standard
      <span class="command">
       <strong>
        tar
       </strong>
      </span>
      provided with some operating systems is
          not able to unpack the long file names in the MySQL
          distribution. You should download and install GNU
      <span class="command">
       <strong>
        tar
       </strong>
      </span>
      , or if available, use a preinstalled
          version of GNU tar. Usually this is available as
      <span class="command">
       <strong>
        gnutar
       </strong>
      </span>
      ,
      <span class="command">
       <strong>
        gtar
       </strong>
      </span>
      , or as
      <span class="command">
       <strong>
        tar
       </strong>
      </span>
      within a GNU or Free Software
          directory, such as
      <code class="filename">
       /usr/sfw/bin
      </code>
      or
      <code class="filename">
       /usr/local/bin
      </code>
      . GNU
      <span class="command">
       <strong>
        tar
       </strong>
      </span>
      is available from
      <a class="ulink" href="https://www.gnu.org/software/tar/" target="_blank">
       https://www.gnu.org/software/tar/
      </a>
      .
     </p>
    </li>
    <li class="listitem">
     <p>
      For a
      <code class="filename">
       .zip
      </code>
      Zip archive:
      <span class="command">
       <strong>
        WinZip
       </strong>
      </span>
      or another tool that can read
      <code class="filename">
       .zip
      </code>
      files.
     </p>
    </li>
    <li class="listitem">
     <p>
      For an
      <code class="filename">
       .rpm
      </code>
      RPM package: The
      <span class="command">
       <strong>
        rpmbuild
       </strong>
      </span>
      program used to build the
          distribution unpacks it.
     </p>
    </li>
   </ul>
  </div>
  <p>
   To install MySQL from a development source tree, the following
      additional tools are required:
  </p>
  <div class="itemizedlist">
   <ul class="itemizedlist" style="list-style-type: disc; ">
    <li class="listitem">
     <p>
      The Git revision control system is required to obtain the
          development source code.
      <a class="ulink" href="https://help.github.com/" target="_blank">
       GitHub Help
      </a>
      provides instructions for downloading and installing Git on
          different platforms.
     </p>
    </li>
    <li class="listitem">
     <p>
      <span class="command">
       <strong>
        bison
       </strong>
      </span>
      2.1 or later, available from
      <a class="ulink" href="http://www.gnu.org/software/bison/" target="_blank">
       http://www.gnu.org/software/bison/
      </a>
      . (Version 1
          is no longer supported.) Use the latest version of
      <span class="command">
       <strong>
        bison
       </strong>
      </span>
      where possible; if you experience
          problems, upgrade to a later version, rather than revert to an
          earlier one.
     </p>
     <p>
      <span class="command">
       <strong>
        bison
       </strong>
      </span>
      is available from
      <a class="ulink" href="http://www.gnu.org/software/bison/" target="_blank">
       http://www.gnu.org/software/bison/
      </a>
      .
      <code class="literal">
       bison
      </code>
      for Windows can be downloaded from
      <a class="ulink" href="http://gnuwin32.sourceforge.net/packages/bison.htm" target="_blank">
       http://gnuwin32.sourceforge.net/packages/bison.htm
      </a>
      .
          Download the package labeled
      <span class="quote">
       “
       <span class="quote">
        Complete package,
          excluding sources
       </span>
       ”
      </span>
      . On Windows, the default location
          for
      <span class="command">
       <strong>
        bison
       </strong>
      </span>
      is the
      <code class="filename">
       C:\Program
          Files\GnuWin32
      </code>
      directory. Some utilities may fail
          to find
      <span class="command">
       <strong>
        bison
       </strong>
      </span>
      because of the space in the
          directory name. Also, Visual Studio may simply hang if there
          are spaces in the path. You can resolve these problems by
          installing into a directory that does not contain a space (for
          example
      <code class="filename">
       C:\GnuWin32
      </code>
      ).
     </p>
    </li>
    <li class="listitem">
     <p>
      On Solaris Express,
      <span class="command">
       <strong>
        m4
       </strong>
      </span>
      must be installed in
          addition to
      <span class="command">
       <strong>
        bison
       </strong>
      </span>
      .
      <span class="command">
       <strong>
        m4
       </strong>
      </span>
      is
          available from
      <a class="ulink" href="http://www.gnu.org/software/m4/" target="_blank">
       http://www.gnu.org/software/m4/
      </a>
      .
     </p>
    </li>
   </ul>
  </div>
  <div class="note" style="margin-left: 0.5in; margin-right: 0.5in;">
   <div class="admon-title">
    Note
   </div>
   <p>
    If you have to install any programs, modify your
    <code class="literal">
     PATH
    </code>
    environment variable to include any
        directories in which the programs are located. See
    <a class="xref" href="setting-environment-variables.html" title="6.2.9 Setting Environment Variables">
     Section 6.2.9, “Setting Environment Variables”
    </a>
    .
   </p>
  </div>
  <p>
   If you run into problems and need to file a bug report, please use
      the instructions in
   <a class="xref" href="bug-reports.html" title="1.6 How to Report Bugs or Problems">
    Section 1.6, “How to Report Bugs or Problems”
   </a>
   .
  </p>
 </div>
 <br/>
</div>
