Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

How to solve the failure of libevent installation

Shulou Source: shulou.com Published: 2022-06-03 07:13:03 10月04日 Update

How to solve the failure of libevent installation? This problem may be often seen in our daily study or work. Through this question, I hope you can gain more. Let's take a look at the solution with the editor today.

Error installing libevent: event.c error: 'CLOCK_MONOTONIC' undeclared

Checking build system type... Configure: error: cannot guess build type; you must specify one

-- build=arm-linux

Make encountered an error while compiling the libevent-1.2 source code:

Event.c:157:20: error: 'CLOCK_MONOTONIC' undeclared (first use in this function)

If (clock_gettime (CLOCK_MONOTONIC, & ts) =-1)

^

The reason for the error is that CLOCK_MONOTONIC is not defined in the event.c file.

Solution: searched on the Internet, the header file is missing, CLOCK_MONOTONIC is defined in the time.h header file. So you can modify the source code directly:

Reference the header file in event.c: # include:

What is described above is the reason for the failure of libevent installation and the details of the solution, and the specific use needs to be used by everyone in order to understand it. If you want to know more about it, welcome to follow the industry information channel!

Tags: Documents content methods reasons more source code problems above that is situations solutions industries solutions information channels channels learning experimentation work compilation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Docker Redmi MySQL MariaDB