Summary of solutions to various problems encountered during the installation of HTTPSQS by Fedora

Source: Internet
Author: User
Recently, I was studying Zhang banquet's lightweight open-source simple Message Queue Service HTTPSQS Based on the HTTPGET/POST protocol. The following error was encountered during the installation phase: When tokyocabinet was installed. /configure will see the following error: configure: error: bzlib. hisrequired. this is because bzlib. h can not find the error, in Fedora is the bzip2-devel is not installed, use yum to install yum

Recently, Zhang Yan's lightweight open-source simple Message Queue Service (HTTPSQS) based on http get/POST protocol has encountered the following errors during installation:

The following error occurs when tokyocabinet is installed./configure:

Configure: error: bzlib. h is required.

This is because bzlib. h can not find the error, in the Fedora is not installed in the bzip2-devel, the installation with yum is good

Yum install bzip-devel solved the problem.

------------------------------------------------------------

At the make stage of httpsqs, there are many Link errors. Briefly describe the basics:

The-I parameter of gcc instructs the compiler not only to find the relevant header file in the specified position;

The-L parameter of gcc indicates adding the library search path to the compiler. You can modify the configuration file/etc/ld. so. conf to add the dynamic library search path to the compiler.

The following error occurs:

Gcc-o httpsqs. c prename. c-L/usr/local/libevent-2.0.10-stable/lib/-levent-L/usr/local/tokyocabinet-1.4.47/lib/-ltokyocabinet-I/usr/local/libevent-2.0.10-stable/include/-I /usr/local/tokyocabinet-1.4.47/include/-lz-lbz2-lrt-lpthread-lm-lc-O2-g -- static
/Usr/bin/ld: cannot find-lz
/Usr/bin/ld: cannot find-lbz2
/Usr/bin/ld: cannot find-lrt
/Usr/bin/ld: cannot find-lpthread
/Usr/bin/ld: cannot find-lm
/Usr/bin/ld: cannot find-lc
/Usr/bin/ld: cannot find-lc
Collect2: ld returns 1
Make: *** [httpsqs] Error 1

But libc. so is in the/usr/lib directory. I have added this directory to the/etc/ld. so. conf file. What is the problem?

Nothing is as reliable as a manual. After reading the gcc manual, I found that the -- static option is used to prohibit the use of shared libraries. I have not installed these static libraries. Currently, static libraries are rarely installed, one solution is to install the corresponding static library.

I didn't do this. Since a shared library already exists, why should I install a static library? So I deleted the -- static option, make, and make install.

Then I started httpsqs and found that it was still wrong.

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

Run the ldd command to view the shared library required by httpsqs. The result is as follows:

Ldd/usr/bin/httpsqs

Result:

Linux-gate.so.1 => (0x005ac000)
Libevent-2.0.so.5 => not found
Libtokyocabinet. so.9 =>/usr/lib/libtokyocabinet. so.9 (0x00905000)
Libz. so.1 =>/lib/libz. so.1 (0x008cf000)
Libbz2.so. 1 =>/lib/libbz2.so. 1 (0x03018000)
Librt. so.1 =>/lib/librt. so.1 (0x00898000)
Libpthread. so.0 =>/lib/libpthread. so.0 (0x00874000)
Libm. so.6 =>/lib/libm. so.6 (0x008a3000)
Libc. so.6 =>/lib/libc. so.6 (0x006e8000)
Libgcc_s.so.1 =>/lib/libgcc_s.so.1 (0x008e6000)
/Lib/ld-linux.so.2 (0x006c7000)

So I used whereis to find the libevent-2.0.so.5 and found

/Usr/local/libevent-2.0.10-stable/lib/libevent-2.0.so.5.

Yes.

Solution: make a soft connection:

Ln-s/usr/local/libevent-2.0.10-stable/library/libevent-2.0.so.5/usr/lib/libevent-2.0.so.5

In this case, you can use ldd to check whether everything works.

At this time, after several hours of exploration, httpsqs finally got up.

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.