[Linux kernel] Compile the Linux kernel ③ (install ncurses | install flex | install bison | open the Linux kernel compilation configuration menu)

Before starting to compile the Linux kernel, you need to execute

make menuconfig

command, open the Linux kernel compilation and configuration menu, and perform compilation and configuration; after executing the above command, various errors are reported. After the final investigation, you need to install ncurses, flex, and bison. 3 33 libraries or software, reference

blog, install;





1. Install ncurses



implement

sudo apt-get install ncurses-dev

command, install ncurses;

Installation process :

root@ubuntu:~/kernel/linux-5.6.14# sudo apt-get install ncurses-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libncurses5-dev' instead of 'ncurses-dev'
The following additional packages will be installed:
  libtinfo-dev
Suggested packages:
  ncurses-doc
The following NEW packages will be installed:
  libncurses5-dev libtinfo-dev
0 upgraded, 2 newly installed, 0 to remove and 154 not upgraded.
Need to get 252 kB of archives.
After this operation, 1,461 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libtinfo-dev amd64 6.0+20160213-1ubuntu1 [77.4 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libncurses5-dev amd64 6.0+20160213-1ubuntu1 [175 kB]
Fetched 252 kB in 1s (133 kB/s)          
Selecting previously unselected package libtinfo-dev:amd64.
(Reading database ... 212109 files and directories currently installed.)
Preparing to unpack .../libtinfo-dev_6.0+20160213-1ubuntu1_amd64.deb ...
Unpacking libtinfo-dev:amd64 (6.0+20160213-1ubuntu1) ...
Selecting previously unselected package libncurses5-dev:amd64.
Preparing to unpack .../libncurses5-dev_6.0+20160213-1ubuntu1_amd64.deb ...
Unpacking libncurses5-dev:amd64 (6.0+20160213-1ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libtinfo-dev:amd64 (6.0+20160213-1ubuntu1) ...
Setting up libncurses5-dev:amd64 (6.0+20160213-1ubuntu1) ...
root@ubuntu:~/kernel/linux-5.6.14# 

insert image description here





2. Install flex



implement

sudo apt-get install flex

command, install flex;

The installation process is as follows:

root@ubuntu:~/kernel/linux-5.6.14# sudo apt-get install flex
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libfl-dev libsigsegv2 m4
Suggested packages:
  bison
The following NEW packages will be installed:
  flex libfl-dev libsigsegv2 m4
0 upgraded, 4 newly installed, 0 to remove and 154 not upgraded.
Need to get 511 kB of archives.
After this operation, 1,306 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libsigsegv2 amd64 2.10-4 [14.1 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 m4 amd64 1.4.17-5 [195 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libfl-dev amd64 2.6.0-11 [12.5 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 flex amd64 2.6.0-11 [290 kB]
Fetched 511 kB in 2s (186 kB/s)
Selecting previously unselected package libsigsegv2:amd64.
(Reading database ... 212158 files and directories currently installed.)
Preparing to unpack .../libsigsegv2_2.10-4_amd64.deb ...
Unpacking libsigsegv2:amd64 (2.10-4) ...
Selecting previously unselected package m4.
Preparing to unpack .../archives/m4_1.4.17-5_amd64.deb ...
Unpacking m4 (1.4.17-5) ...
Selecting previously unselected package libfl-dev:amd64.
Preparing to unpack .../libfl-dev_2.6.0-11_amd64.deb ...
Unpacking libfl-dev:amd64 (2.6.0-11) ...
Selecting previously unselected package flex.
Preparing to unpack .../flex_2.6.0-11_amd64.deb ...
Unpacking flex (2.6.0-11) ...
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu11.3) ...
Processing triggers for doc-base (0.10.7) ...
Processing 1 added doc-base file...
Setting up libsigsegv2:amd64 (2.10-4) ...
Setting up m4 (1.4.17-5) ...
Setting up libfl-dev:amd64 (2.6.0-11) ...
Setting up flex (2.6.0-11) ...
Processing triggers for libc-bin (2.23-0ubuntu11.3) ...
root@ubuntu:~/kernel/linux-5.6.14# 
root@ubuntu:~/kernel/linux-5.6.14# 

insert image description here





3. Install bison



implement

sudo apt-get install bison

command, install bison;

The installation process is as follows:

root@ubuntu:~/kernel/linux-5.6.14# sudo apt-get install bison -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libbison-dev
Suggested packages:
  bison-doc
The following NEW packages will be installed:
  bison libbison-dev
0 upgraded, 2 newly installed, 0 to remove and 154 not upgraded.
Need to get 597 kB of archives.
After this operation, 1,795 kB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 libbison-dev amd64 2:3.0.4.dfsg-1 [338 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 bison amd64 2:3.0.4.dfsg-1 [259 kB]
Fetched 597 kB in 2s (252 kB/s)
Selecting previously unselected package libbison-dev:amd64.
(Reading database ... 212318 files and directories currently installed.)
Preparing to unpack .../libbison-dev_2%3a3.0.4.dfsg-1_amd64.deb ...
Unpacking libbison-dev:amd64 (2:3.0.4.dfsg-1) ...
Selecting previously unselected package bison.
Preparing to unpack .../bison_2%3a3.0.4.dfsg-1_amd64.deb ...
Unpacking bison (2:3.0.4.dfsg-1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libbison-dev:amd64 (2:3.0.4.dfsg-1) ...
Setting up bison (2:3.0.4.dfsg-1) ...
update-alternatives: using /usr/bin/bison.yacc to provide /usr/bin/yacc (yacc) in auto mode
root@ubuntu:~/kernel/linux-5.6.14# 

insert image description here





Fourth, open the Linux kernel compilation configuration menu



execute again

make menuconfig

command, successfully pop up the menu to configure the graphical interface;

insert image description here

Guess you like

Origin blog.csdn.net/han1202012/article/details/123656662