mkdir: cannot create directory `/usr/local/share/man/man1': File exists

本文提供了两种解决Man页面安装过程中遇到问题的方法:一种是通过重命名`/usr/local/share/man/man1`目录来规避冲突;另一种是在Makefile中将MANDIR或mandir设置为空字符串以避免不必要的安装路径。

Solutions:

1)  Rename `/usr/local/share/man/man1',  sudo mv  /usr/local/share/man/man1 /usr/local/share/man/man1.bak; sudo make install

2) Step into tools or docs directory, open Makefile, and set the MANDIR or mandir to empty string.

[root@yfw ~]# cd /opt/openfire/enterprise/spark/Spark [root@yfw Spark]# # 1. 创建提取目录 [root@yfw Spark]# cd /tmp [root@yfw tmp]# mkdir -p xvfb-extract && cd xvfb-extract [root@yfw xvfb-extract]# rm -rf * [root@yfw xvfb-extract]# [root@yfw xvfb-extract]# # 2. 解压 RPM 内容到当前目录 [root@yfw xvfb-extract]# rpm2cpio ../xorg-x11-server-Xvfb-1.20.11-2.el8.x86_64.rpm | cpio -idmv ./usr/bin/Xvfb ./usr/bin/xvfb-run ./usr/lib/.build-id ./usr/lib/.build-id/90 ./usr/lib/.build-id/90/ef040f79a6dc2a63bd97c6f8615551a9918520 ./usr/share/man/man1/Xvfb.1.gz 4104 blocks [root@yfw xvfb-extract]# [root@yfw xvfb-extract]# # 3. 查看是否成功提取出 Xvfb [root@yfw xvfb-extract]# ls -l usr/bin/Xvfb -rwxr-xr-x 1 root root 2091144 Jun 11 2021 usr/bin/Xvfb [root@yfw xvfb-extract]# # 输出应类似: [root@yfw xvfb-extract]# # -rwxr-xr-x 1 root root 298808 Jan 1 2021 usr/bin/Xvfb [root@yfw xvfb-extract]# [root@yfw xvfb-extract]# # 4. 复制到 openfire 用户 bin 目录 [root@yfw xvfb-extract]# su - openfire -c 'mkdir -p ~/bin' This account is currently not available. [root@yfw xvfb-extract]# cp usr/bin/Xvfb /home/openfire/bin/ cp: cannot create regular file '/home/openfire/bin/': Not a directory [root@yfw xvfb-extract]# chown openfire:openfire /home/openfire/bin/Xvfb chown: cannot access '/home/openfire/bin/Xvfb': No such file or directory [root@yfw xvfb-extract]# chmod +x /home/openfire/bin/Xvfb chmod: cannot access '/home/openfire/bin/Xvfb': No such file or directory [root@yfw xvfb-extract]# [root@yfw xvfb-extract]# # 5. 验证可执行性 [root@yfw xvfb-extract]# su - openfire -s /bin/bash -c 'which Xvfb; Xvfb -help | head -5' /usr/bin/which: no Xvfb in (/usr/local/ffmpeg/bin:/opt/spark/bin:=en_US.UTF-8:/usr/local/ffmpeg/bin) -bash: head: command not found -bash: Xvfb: command not found [root@yfw xvfb-extract]# grep openfire /etc/passwd openfire:x:990:985:Openfire Jabber Server:/opt/openfire:/sbin/nologin [root@yfw xvfb-extract]# # 删除之前错误创建的内容(可选) [root@yfw xvfb-extract]# rm -rf /home/openfire/bin [root@yfw xvfb-extract]# [root@yfw xvfb-extract]# # 在真正的 home 目录下创建 bin [root@yfw xvfb-extract]# mkdir -p /opt/openfire/bin [root@yfw xvfb-extract]# [root@yfw xvfb-extract]# # 复制 Xvfb 到正确位置 [root@yfw xvfb-extract]# cp /tmp/xvfb-extract/usr/bin/Xvfb /opt/openfire/bin/ [root@yfw xvfb-extract]# cp /tmp/xvfb-extract/usr/bin/xvfb-run /opt/openfire/bin/ # 可选 [root@yfw xvfb-extract]# chown -R openfire:openfire /opt/openfire/bin [root@yfw xvfb-extract]# chmod +x /opt/openfire/bin/Xvfb [root@yfw xvfb-extract]# [ -f /opt/openfire/bin/xvfb-run ] && chmod +x /opt/openfire/bin/xvfb-run [root@yfw xvfb-extract]# su -s /bin/bash openfire -c ' > export PATH=/opt/openfire/bin:$PATH > export DISPLAY=:99 > > # 检查是否能找到 Xvfb > which Xvfb > Xvfb -help | head -5 > ' ~/bin/Xvfb use: X [:<display>] [option] -a # default pointer acceleration (factor) -ac disable access control restrictions -audit int set audit trail level -auth file select authorization file -br create root window with black background +bs enable any backing store support -bs disable any backing store support -c turns off key-click c # key-click volume (0-100) -cc int default color visual class -nocursor disable the cursor -core generate core dump on fatal error -displayfd fd file descriptor to write display number to when ready to connect -dpi int screen resolution in dots per inch -dpms disables VESA DPMS monitor control -deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs -f # bell base (0-100) -fc string cursor font -fn string default font name -fp string default font path -help prints message with these options +iglx Allow creating indirect GLX contexts -iglx Prohibit creating indirect GLX contexts (default) -I ignore all remaining arguments -ld int limit data space to N Kb -lf int limit number of open files to N -ls int limit stack space to N Kb -nolock disable the locking mechanism -maxclients n set maximum number of clients (power of two) -nolisten string don't listen on protocol -listen string listen on protocol -noreset don't reset after last client exists -background [none] create root window with no background -reset reset after last client exists -p # screen-saver pattern duration (minutes) -pn accept failure to listen on all ports -nopn reject failure to listen on all ports -r turns off auto-repeat r turns on auto-repeat -render [default|mono|gray|color] set render color alloc policy -retro start with classic stipple and cursor -s # screen-saver timeout (minutes) -seat string seat to run on -t # default pointer threshold (pixels/t) -terminate terminate at server reset -to # connection time out -tst disable testing extensions ttyxx server started from init on /dev/ttyxx v video blanking for screen-saver -v screen-saver without video blanking -wm WhenMapped default backing-store -wr create root window with white background -maxbigreqsize set maximal bigrequest size +xinerama Enable XINERAMA extension -xinerama Disable XINERAMA extension -dumbSched Disable smart scheduling and threaded input, enable old behavior -schedInterval int Set scheduler interval in msec -sigstop Enable SIGSTOP based startup +extension name Enable extension -extension name Disable extension -query host-name contact named host for XDMCP -broadcast broadcast for XDMCP -multicast [addr [hops]] IPv6 multicast for XDMCP -indirect host-name contact named host for indirect XDMCP -port port-num UDP port number to send messages to -from local-address specify the local address to connect from -once Terminate server after one session -class display-class specify display class to send in manage -cookie xdm-auth-bits specify the magic cookie for XDMCP -displayID display-id manufacturer display ID for request [+-]accessx [ timeout [ timeout_mask [ feedback [ options_mask] ] ] ] enable/disable accessx key sequences -ardelay set XKB autorepeat delay -arinterval set XKB autorepeat interval -screen scrn WxHxD set screen's width, height, depth -pixdepths list-of-int support given pixmap depths +/-render turn on/off RENDER extension support(default on) -linebias n adjust thin line pixelization -blackpixel n pixel value for black -whitepixel n pixel value for white -fbdir directory put framebuffers in mmap'ed files in directory -shmem put framebuffers in shared memory [root@yfw xvfb-extract]#
最新发布
10-31
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值