个人技术分享

$ sudo yum install fakeroot
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
No package fakeroot available.
$ sudo vi /etc/yum.repos.d/centos7.repo
[updates-CentOS-7.6]
name=PUB New REPO Server updates
baseurl=https://dl.fedoraproject.org/pub/epel/7/x86_64/
enabled=1
gpgcheck=0
$ sudo yum install fakeroot
Resolving Dependencies
--> Running transaction check
---> Package fakeroot.x86_64 0:1.26-4.el7 will be installed
--> Processing Dependency: fakeroot-libs = 1.26-4.el7 for package: fakeroot-1.26-4.el7.x86_64
--> Running transaction check
---> Package fakeroot-libs.x86_64 0:1.26-4.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================
 Package                            Arch                        Version                           Repository                                   Size
====================================================================================================================================================
Installing:
 fakeroot                           x86_64                      1.26-4.el7                        ECI-updates-CentOS-7.6                       92 k
Installing for dependencies:
 fakeroot-libs                      x86_64                      1.26-4.el7                        ECI-updates-CentOS-7.6                       37 k

Transaction Summary
====================================================================================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 129 k
Installed size: 253 k
Is this ok [y/d/N]: y
Downloading packages:
(1/2): fakeroot-libs-1.26-4.el7.x86_64.rpm                                                                                   |  37 kB  00:00:01     
(2/2): fakeroot-1.26-4.el7.x86_64.rpm                                                                                        |  92 kB  00:00:02     
----------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                62 kB/s | 129 kB  00:00:02     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : fakeroot-libs-1.26-4.el7.x86_64                                                                                                  1/2 
  Installing : fakeroot-1.26-4.el7.x86_64                                                                                                       2/2 
  Verifying  : fakeroot-libs-1.26-4.el7.x86_64                                                                                                  1/2 
  Verifying  : fakeroot-1.26-4.el7.x86_64                                                                                                       2/2 

Installed:
  fakeroot.x86_64 0:1.26-4.el7                                                                                                                      

Dependency Installed:
  fakeroot-libs.x86_64 0:1.26-4.el7                                                                                                                 

Complete!

Switch to use fakeroot-sysv

$ ls -l /usr/bin/fakeroot
lrwxrwxrwx 1 root root 26 May 16 17:15 /usr/bin/fakeroot -> /etc/alternatives/fakeroot
$ ls -l /etc/alternatives/fakeroot 
lrwxrwxrwx 1 root root 21 May 16 11:00 /etc/alternatives/fakeroot -> /usr/bin/fakeroot-tcp

$ sudo update-alternatives --set fakeroot /usr/bin/fakeroot-sysv
$ ls -l /etc/alternatives/fakeroot
lrwxrwxrwx 1 root root 22 May 16 17:15 /etc/alternatives/fakeroot -> /usr/bin/fakeroot-sysv