When mod_bw is installed on centos, the following error occurs: undefinedsymbol: apr_atomic_cas.

Source: Internet
Author: User
On 64-bit centos, I want to use bw_mod to limit apache bandwidth. after the installation is complete and apache is restarted, undefined appears.

I am on 64-bit centos and want to useBw_modLimit apache bandwidth. after the installation is complete, the undefined symbol: apr_atomic_cas error is displayed after apache is restarted, for example:

The solution is as follows:
1. open the mod_bw.c file vim mod_bw.c
2. find the following code:
# If (APR_MAJOR_VERSION <1)
# Define apr_atomic_inc32 apr_atomic_inc
# Define apr_atomic_dec32 apr_atomic_dec
# Define apr_atomic_add32 apr_atomic_add
# Define apr_atomic_cas32 apr_atomic_cas
# Define apr_atomic_set32 apr_atomic_set
# Endif
Annotate it, that is:
/*
# If (APR_MAJOR_VERSION <1)
# Define apr_atomic_inc32 apr_atomic_inc
# Define apr_atomic_dec32 apr_atomic_dec
# Define apr_atomic_add32 apr_atomic_add
# Define apr_atomic_cas32 apr_atomic_cas
# Define apr_atomic_set32 apr_atomic_set
# Endif
*/
3. recompile.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.