Compile and install Busybox in CentOS

Source: Internet
Author: User
Tags crypt
[Root @ cloud ~] # Yum-yinstallwgetmakegccperlglibc-staticncurses-devellibgcrypt-devel [root @ cloud ~] # Wgethttp ://

[Root @ cloud ~] # Yum-y install wget make gcc perl glibc-static ncurses-devel libgcrypt-devel

[Root @ cloud ~] # Wget http://busybox.net/downloads/busybox-1.21.0.tar.bz2

[Root @ cloud ~] # Tar-jxvf busybox-1.21.0.tar.bz2

[Root @ cloud ~] # Cd busybox-1.21.0

[Root @ cloud busybox-1.21.0] # make

[Root @ cloud busybox-1.21.0] # make install

Fault 1:

[Root @ cloud busybox-1.21.0] # make

..................

============

/Usr/bin/ld: cannot find-lcrypt

Collect2: ld returns 1

Make: *** [busybox_unstripped] Error 1

[Root @ cloud busybox-1.21.0] # make

LINK busybox_unstripped

Trying libraries: crypt m

Library crypt is not needed, excluding it

Library m is needed, can't exclude it (yet)

Final link with: m

DOC busybox. pod

DOC BusyBox.txt

DOC busybox.1

DOC BusyBox.html

[Root @ cloud busybox-1.21.0] #

Solution:

[Root @ cloud busybox-1.21.0] # yum-y install libgcrypt-devel

[Root @ cloud busybox-1.21.0] # make

 

Other:

Yum list all | grep crypt

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

Fault 2:

[Root @ cloud busybox-1.21.0] # make

........................

Miscutils/ubi_tools.c: 67: 26: Error: mtd/ubi-user.h: no file or directory

Miscutils/ubi_tools.c: In function 'Ubi _ tools_main ':

Miscutils/ubi_tools.c: 137: Error: 'Ubi _ DEV_NUM_AUTO 'is not declared (used for the first time in this function)

Miscutils/ubi_tools.c: 137: error :( even if it appears multiple times in a function, each undeclared identifier

Miscutils/ubi_tools.c: 137: Error: only one report is reported in the function .)

Miscutils/ubi_tools.c: 138: Error: 'Ubi _ VOL_NUM_AUTO 'is not declared (used for the first time in this function)

Miscutils/ubi_tools.c: 157: Error: 'req' storage size unknown

Miscutils/ubi_tools.c: 165: Error: 'Ubi _ iocatt' not declared (used for the first time in this function)

Miscutils/ubi_tools.c: 157: Warning: unused variable 'req'

Miscutils/ubi_tools.c: 171: Error: 'Ubi _ iocdet' not declared (used for the first time in this function)

Miscutils/ubi_tools.c: 174: Error: 'req' storage size unknown

Miscutils/ubi_tools.c: 181: Error: 'Ubi _ MAX_VOLUME_NAME 'is not declared (used for the first time in this function)

Miscutils/ubi_tools.c: 188: Error: 'Ubi _ STATIC_VOLUME 'is not declared (used for the first time in this function)

Miscutils/ubi_tools.c: 190: Error: 'Ubi _ DYNAMIC_VOLUME 'is not declared (used for the first time in this function)

Miscutils/ubi_tools.c: 199: Error: 'Ubi _ IOCMKVOL 'is not declared (used for the first time in this function)

Miscutils/ubi_tools.c: 174: Warning: unused variable 'req'

Miscutils/ubi_tools.c: 205: Error: 'Ubi _ IOCRMVOL 'is not declared (used for the first time in this function)

Miscutils/ubi_tools.c: 208: Error: 'req' storage size unknown

Miscutils/ubi_tools.c: 218: Error: 'Ubi _ IOCRSVOL 'is not declared (used for the first time in this function)

Miscutils/ubi_tools.c: 208: Warning: unused variable 'req'

Miscutils/ubi_tools.c: 226: Error: 'Ubi _ iocvolup' is not declared (used for the first time in this function)

Make [1]: *** [miscutils/ubi_tools.o] Error 1

Make: *** [miscutils] error 2

 

Solution:

[Root @ cloud busybox-1.21.0] # make menuconfig

Remove the option containing ubi under the "Miscellaneous Utilities --->" option below:

UBI (Unsorted Block Images) is a new type of Flash file system.

| [] Ubiattach |

| [] Ubidetach |

| [] Ubimkvol |

| [] Ubirmvol |

| [] Ubirsvol |

| [] Ubiupdatevol

Save and exit, and make again.

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.