ฉันมีอิมเมจ Center 7 Docker น้อยที่สุดและฉันพยายามหาหน้าเว็บเพื่อช่วยในการดีบัก Dockerfile ของฉัน ออกจากกล่องมันมีไม่มาก:
# man ls
No manual entry for ls
ตามคำตอบ Serverfault นี้ฉันได้ติดตั้งman-pagesRPM และดูเหมือนว่าจะไม่เป็นไร:
# yum install -y man-pages
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: mirror.vtti.vt.edu
 * extras: centos.mbni.med.umich.edu
 * updates: centos.netnitco.net
Resolving Dependencies
--> Running transaction check
---> Package man-pages.noarch 0:3.53-5.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================
 Package                  Arch                  Version                     Repository           Size
======================================================================================================
Installing:
 man-pages                noarch                3.53-5.el7                  base                5.0 M
Transaction Summary
======================================================================================================
Install  1 Package
Total download size: 5.0 M
Installed size: 4.6 M
Downloading packages:
man-pages-3.53-5.el7.noarch.rpm                                                | 5.0 MB  00:00:01     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : man-pages-3.53-5.el7.noarch                                                        1/1 
  Verifying  : man-pages-3.53-5.el7.noarch                                                        1/1 
Installed:
  man-pages.noarch 0:3.53-5.el7                                                                       
Complete!
อย่างไรก็ตาม:
# man ls
No manual entry for ls
ฉันเคยrpmตรวจสอบว่าman-pagesควรมีlsหน้าคนและดูเหมือนว่า:
# rpm -ql man-pages | grep -w ls
/usr/share/man/man1p/ls.1p.gz
แต่มันดูเหมือนไม่ได้ติดตั้งจริง:
# man 1p ls
No manual entry for ls in section 1p
# ls -l /usr/share/man/man1p/
total 0
และดูเหมือนจะไม่เป็นที่อื่นใดในระบบไฟล์เช่นกัน
# find / -name ls.1\*
#
ฉันสามารถสร้างไฟล์ได้/usr/share/man/man1p/ดังนั้นจึงอาจไม่ใช่ความแปลกประหลาดของระบบไฟล์เสมือนของ Docker
ส่วนที่ดีที่สุดของสิ่งนี้คือสิ่งที่ฉันต้องการในนาทีนี้คือหน้าuseraddคำสั่งที่ไม่ได้อยู่ใน RPM นั้น shadow-utilsมันอยู่ใน
# yum whatprovides /usr/share/man/man8/useradd.8.gz
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: mirror.vtti.vt.edu
 * extras: mirror.tzulo.com
 * updates: centos.netnitco.net
2:shadow-utils-4.1.5.1-18.el7.x86_64 : Utilities for managing accounts and shadow password files
Repo        : base
Matched from:
Filename    : /usr/share/man/man8/useradd.8.gz
ซึ่งติดตั้งไว้แล้ว
# yum install shadow-utils
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
 * base: mirror.vtti.vt.edu
 * extras: centos.mbni.med.umich.edu
 * updates: centos.netnitco.net
Package 2:shadow-utils-4.1.5.1-18.el7.x86_64 already installed and latest version
Nothing to do
และในความเป็นจริงไบนารี (เช่น/usr/sbin/useradd) อยู่ที่นั่น แต่ไม่ใช่หน้าคน
# ls -l /usr/share/man/man8/useradd.8.gz
ls: cannot access /usr/share/man/man8/useradd.8.gz: No such file or directory
ดังนั้นคำถามของฉันคือ:
- เหตุใดฉันจึงไม่พบหน้าใด ๆ ที่ควรจะอยู่ในshadow-utilsRPM เมื่อฉันสามารถหาไบนารีได้
- ทำไมการติดตั้งman-pagesRPM ไม่สำเร็จ (ติดตั้งไฟล์ที่ควรจะเป็นใน RPM นั้น)
ปรับปรุง:ต่อคำตอบของแอรอน Marasco ของและความคิดเห็น msuchy ของyum reinstall shadow-utilsผมพยายาม เช่นเดียวกับyum install man-pagesนี้ดูเหมือนจะเสร็จสมบูรณ์ แต่ไม่จริงใส่ไฟล์ใด ๆ /usr/share/man/ใน
man-pagesแพคเกจนั้นไม่มีหน้าเว็บ วิธีแก้ไขคือติดตั้งแพ็คเกจเหล่านี้ใหม่เช่นyum reinstall yum rpmครอบคลุมทั้งสองชุด