Check the library files that the program depends on when compiling ngnix.

Source: Internet
Author: User
Tags openssl library
Key Point: LDD can read the so files that every program can run depends on.

The OpenSSL library is required during compilation.

Check the local machine. OpenSSL has been installed.

 

View the compilation error file and find the library on which OpenSSL depends

More objs/Autoconf. Err

View the library files on which OpenSSL depends

LDD/usr/bin/OpenSSL

LDD-U/usr/bin/OpenSSL

Objdump-x OBJ organizes (divided into several blocks) the data of the target file in the form of some classification information.

Objdump-t obj: symbol table of the target file output

Objdump-H OBJ

[[Email protected] nginx-1.6.0] # objdump-x/usr/bin/OpenSSL

/Usr/bin/OpenSSL: File Format elf64-x86-64
/Usr/bin/OpenSSL
Architecture: i386: x86-64, flags 0x00000112:
Exec_p, has_syms, d_paged
Start address 0x0000000000416e20

Program header:
Phdr off 0x0000000000000040 vaddr 0x0000000000400040 paddr 0x0000000000400040 align 2 ** 3
Filesz 0x0000000000000230 memsz 0x0000000000000230 flags R-x
Interp off 0x0000000000000270 vaddr 0x0000000000400270 paddr 0x0000000000400270 align 2 ** 0
Filesz 0x0000000000000000001c memsz 0x000000000000001c flags r --
Load off 0x0000000000000000 vaddr 0x0000000000400000 paddr 0x0000000000400000 align 2 ** 21
Filesz 0x0000000000079114 memsz 0x0000000000079114 flags R-x
Load off 0x0000000000079618 vaddr 0x0000000000679618 paddr 0x0000000000679618 align 2 ** 21
Filesz 0x0000000000005690 memsz 0x0000000000006640 flags RW-
Load off 0x000000000007eca8 vaddr 0x0000000000000087eca8 paddr 0x0000000000000087eca8 align 2 *** 21
Filesz 0x00000000000000004de5 memsz 0x00000000000000004de5 flags RW-
Dynamic off 0x0000000000079bc8 vaddr 0x00000000000000679bc8 paddr 0x00000000000000679bc8 align 2 *** 3
Filesz 0x0000000000000210 memsz 0x0000000000000210 flags RW-
Note off 0x0000000000000000028c vaddr 0x00000000000000000040028c paddr 0x0000000000000040028c align 2 *** 2
Filesz 0x0000000000000044 memsz 0x0000000000000044 flags r --
Eh_frame off 0x00000000000000075be8 vaddr 0x000000000000000000475be8 paddr 0x00000000000000475be8 align 2 *** 2
Filesz 0x000000000000000006f4 memsz 0x000000000000000006f4 flags r --
Stack off 0x0000000000000000 vaddr 0x0000000000000000 paddr 0x0000000000000000 align 2 ** 3
Filesz 0x0000000000000000 memsz 0x0000000000000000 flags RW-
Relro off 0x0000000000079618 vaddr 0x0000000000679618 paddr 0x0000000000679618 align 2 ** 0
Filesz 0x000000000000000009e8 memsz 0x000000000000000009e8 flags r --

Dynamic section:
Needed libssl. so.10
Needed libgssapi_krb5.so.2
Needed libkrb5.so. 3
Needed libcom_err.so.2
Needed libk5crypto. so.3
Needed libcrypto. so.10
Needed libdl. so.2
Needed libz. so.1
Needed libc. so.6
Init 0x0000000000412c00
Fini 0x00000000004625d8
Gnu_hash 0x000000000000004002d0
Strtab 0x0000000000000087eca8
Symtab 0x00000000004003c0
Strsz 0x00000000000000004d75
Syment 0x0000000000000018
Debug 0x0000000000000000
Pltgot 0x0000000000679fe8
Pltrelsz 0x00000000000062e8
Pltrel 0x0000000000000007
Jmprel 0x000000000040c918
Rela 0x000000000040c2e8
Relasz 0x0000000000000630
Relaent 0x0000000000000018
Verneed 0x000000000040c228
Verneednum 0x0000000000000003
Versym 0x000000000040b96e
0x6ffffef9 0x00000000000000406c30
0x6ffffdf7 0x000000000000012c
0x6ffffef8 0x00000000000000406d60
0x6ffffdf6 0x0000000000000db0

Http://wapiknow.baidu.com/question/523406943.html

Linux dependency and software compilation and update

Linux software depends on each other, such as a network. If you need to update one of the software, RPM seems to be able to solve the dependency between the software; if you compile and update the software by yourself (many software do not have the RPM format) and use tar to update the software, how can we solve the dependency between them? How can I update the dependency between old software versions to new software versions? I found that after I compile and update the software, other software still depends on the old software. If I uninstall the old software, it will affect the dependency of other software. The system software network will have a big hole, A lot of software can't be used anymore. In serious cases, you can only reinstall the system.

Fuyaosuixin

Download the client, which is required within 10 minutes

Best recommendation answer

Brain supplements ......
Because you don't have software, you have to do everything yourself.
LDD can read the so files that every program can run depends on. Objdump seems to be able to read some dependent content. Then, use the corresponding software packages of the program to push back the content, and then re-compile the software packages. Generally, as long as the so file corresponding to LDD is correct, the general function interface is not a problem. Of course, it is not absolute. Therefore, the best solution to this problem is to recompile all systems.

To put it bluntly, upgrading the basic function library of the system using tar source code is a typical search activity.

The old software can coexist with the new software compiled by itself. You only need to specify a different installation directory during compilation, and the old software will not be affected at all.

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.