Solve the vsftpd compilation error: cocould not read symbols: file in wrong format

Source: Internet
Author: User
Tags ftp site
When vsftpd is compiled, the error message "cocould not read symbols: file in wrong format" appears, and the related information is searched for because a vsftpd installation file does not take the location of the 64-bit platform library file into account.

 

 

If the system is a 64-bit platform, the solution is as follows:

 

Edit vsf_findlibs.sh in the source code installation directory and replace lib with lib64.

 

The quick Vim replacement command is:

 

: % S? LIB /? Lib64 /?

(Check whether it is completely replaced)

If the system is a 64-bit platform?

 

Uname-m

If x86_64 is output, it indicates a 64-bit platform.

 

To avoid the trouble of re-editing, I will re-edit some vsftpd Code so that it can be compiled smoothly on 32-bit and 64-bit platforms.

 

Modify as follows:

1. Modified builddesf. H, added Pam, and supported TCP_WRAPPERS.

2. Modified vsf_findlibs.sh so that it can be compiled smoothly on 32-bit or 64-bit platforms.

3. vsftpd. conf has been modified to adapt to the configuration file of the FTP site that generally prohibits anonymous access.

 

Or

 

The reason is that vsf_findlibs.sh In the vsftpd source code in x86_64 environment does not handle the call relationship of the library file. You can manually modify the code in vsf_findlibs.sh or modify the link of the relevant Lib in the following simple way.
Rm-F/lib/libpam. so.0 --- the link file is deleted here.
Ln-S/lib64/libpam. so.0.77/lib/libpam. so.0

1.2/lib/libcap. so.1: cocould not read symbols: file in wrong format
For the same reason, the modification method is the same as above:
Rm-F/lib/libcap. so.1
Ln-S/lib64/libcap. so.1.10/lib/libcap. so.1

After the above modification, no error will be reported after compilation. Of course, to avoid other programs calling lib errors, it is best to change the relevant link of LIB back.

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.