RedHatEnterpriseLinux5Server installation Memcached problem records

Source: Internet
Author: User
Refer to the installation documentation: Installation

Reference installation documentation: http://www.linuxidc.com/Linux/2009-01/17980.htm

1. for installation of all tools, select a user with administrator permissions.

2. tool Version:

Name

Version

Memcached

1.4.13

Http://memcached.org/

Libevent

2.0.16-stable

Https://github.com/downloads/libevent/libevent/libevent-2.0.16-stable.tar.gz

 

3. Problems and Solutions

I. When installing memcache, the system prompts you to install libevent.

Run the following command to download 2.0.16-stable:

Tar zxvf libevent-2.0.16-stable.tar.gz

Cd./libevent-2.0.16-stable

./Configure

Make install clean

According to the execution results, the libevent is installed in:/usr/local/lib.

[Description] You can also find the path address through ls-aR | grep libevent. The result is as follows:

 

 

Ii. An error occurred while executing make of memcached:

Error: 'iov _ MAX 'undeclared (first use in this function)

If you have forgotten the address, >_< Khan

[Cause] memcache. c's detection error on the Red Hatenterprise 5 server caused the macro IOV_MAX to be undefined.

[Solution] manually modify the file memcache. c and define IOV_MAX.

[Implementation step] Open the memcache. c file with vi and comment out lines 57 and 59. The Modification result is as follows:


Tip: After enabling vi, use set nu to open the line number label.

 

 

Iii. When starting memcached, the system prompts that the libevent library location cannot be found.

Memcached: error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory

[Cause] LD_DEBUG = libs/usr/local/bin/memcached-v can be used to check the search path of the library file. memcached requires that the libevnet path be/usr/lib/libevent.2.0.so. 5,

The actual installation path of libevent is/usr/local/bin/libevent.2.0.so. 5.

[Solution] find a solution for memcached to find the libevent installation path.

[Operation method] According to the online statement, the simplest method is soft connection.

1. Establish a soft connection

# Ln-s/usr/local/lib/libevent.2.0.so. 5/usr/lib/libevent.2.0.so. 5

Disadvantage: only valid for the current user

2. Create and register the memcached. conf file.

[Note] This method has not been tested.

Step 1: cd/etc/ld. so. conf. d.

Step 2: vi memcached. conf the memcached. conf does not exist and is created by myself.

Step 3: add a line/usr/local/lib in memcached. conf to indicate the path of the libevent-1.4.so.2.

Step 4: ldconfig indicates registering the configuration file with the System

 

OK. After the above problem is solved, memcached can be started.

Enjoy it!

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.