Lighttpd: network.c:483: error: 'EC_KEY' undeclared (first use in this function) Error and Solution

www.lautt‮moc.iru‬
Lighttpd: network.c:483: error: 'EC_KEY' undeclared (first use in this function) Error and Solution

The "network.c:483: error: 'EC_KEY' undeclared (first use in this function)" error can occur when you are trying to compile the Lighttpd web server on a Linux system. This error is usually caused by a missing or outdated OpenSSL library.

To fix this error, you can try the following solutions:

  1. Make sure that you have the latest version of the OpenSSL library installed on your system. You can check the version of OpenSSL that you have installed by running the openssl version command. If you do not have the latest version of OpenSSL installed, you can install it by using your system's package manager (e.g., apt, yum, dnf, etc.).

  2. Make sure that the OpenSSL library is properly linked when compiling Lighttpd. You can do this by adding the --with-openssl flag to the ./configure command when compiling Lighttpd. For example:

./configure --with-openssl
  1. Make sure that the openssl/ec.h header file is being included in your code. This header file defines the EC_KEY type, which is used in the network.c file. If the header file is not being included, the compiler will not be able to find the definition for the EC_KEY type, causing the error to occur.

By following these steps, you should be able to resolve the "network.c:483: error: 'EC_KEY' undeclared (first use in this function)" error when compiling Lighttpd.

Created Time:2017-10-29 22:08:51  Author:lautturi