Linux (centos 6.5 64 位 京东云)在 root 用户下安装 openssl 时候,提示权限不够。没思路怎么解决了。哪位给支个招

2018-12-03 16:39:16 +08:00
 Lowang

信息如下:

[root@root openssl-1.1.0j]# make install
make depend && make _build_libs
make[1]: Entering directory `/root/openssl-1.1.0j'
make[1]: Leaving directory `/root/openssl-1.1.0j'
make[1]: Entering directory `/root/openssl-1.1.0j'
make[1]: Nothing to be done for `_build_libs'.
make[1]: Leaving directory `/root/openssl-1.1.0j'
created directory `/usr/local/lib64'
*** Installing runtime files
install libcrypto.so.1.1 -> /usr/local/lib64/libcrypto.so.1.1
mv: cannot move `/usr/local/lib64/libcrypto.so.1.1.new' to `/usr/local/lib64/libcrypto.so.1.1': Permission denied
make: *** [install_runtime_libs] Error 1
[root@root openssl-1.1.0j]# 

目录权限:

[root@root openssl-1.1.0j]# ll -d /usr/local/lib64
drwxr-xr-x 2 root root 4096 Dec  3 16:32 /usr/local/lib64

文件权限:

[root@root openssl-1.1.0j]# ll -d /usr/local/lib64/libcrypto.so.1.1.new 
-rwxr-xr-x 1 root root 2835589 Dec  3 16:32 /usr/local/lib64/libcrypto.so.1.1.new

这个是什么原因啊

3161 次点击
所在节点    京东
4 条回复
julyclyde
2018-12-04 15:18:32 +08:00
你试试 strace install 那个文件
Lowang
2018-12-04 18:11:22 +08:00
@julyclyde
install ./include/openssl/x509_vfy.h -> /usr/local/include/openssl/x509_vfy.h
install ./include/openssl/x509v3.h -> /usr/local/include/openssl/x509v3.h
[{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 26597
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=26597, si_status=0, si_utime=2, si_stime=3} ---
rt_sigreturn() = 26597
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
vfork() = 27182
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 27182
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=27182, si_status=0, si_utime=0, si_stime=0} ---
rt_sigreturn() = 27182
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
vfork() = 27183
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
wait4(-1, install libcrypto.a -> /usr/local/lib64/libcrypto.a
install libssl.a -> /usr/local/lib64/libssl.a
[{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 27183
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=27183, si_status=0, si_utime=0, si_stime=0} ---
rt_sigreturn() = 27183
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
vfork() = 27196
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 27196
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=27196, si_status=0, si_utime=0, si_stime=0} ---
rt_sigreturn() = 27196
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
vfork() = 27197
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
wait4(-1, install libcrypto.so.1.1 -> /usr/local/lib64/libcrypto.so.1.1
cp: cannot create regular file `/usr/local/lib64/libcrypto.so.1.1.new': Permission denied
[{WIFEXITED(s) && WEXITSTATUS(s) == 1}], 0, NULL) = 27197
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=27197, si_status=1, si_utime=0, si_stime=0} ---
rt_sigreturn() = 27197
open("/usr/share/locale/locale.alias", O_RDONLY|O_CLOEXEC) = 11
fstat(11, {st_mode=S_IFREG|0644, st_size=2512, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7ff02a893000
read(11, "# Locale name alias data base.\n#"..., 4096) = 2512
read(11, "", 4096) = 0
close(11) = 0
munmap(0x7ff02a893000, 4096) = 0
open("/usr/share/locale/en_US.UTF-8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US.utf8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en_US/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.UTF-8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en.utf8/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/share/locale/en/LC_MESSAGES/make.mo", O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "make: ", 6make: ) = 6
write(2, "*** [install_dev] Error 1", 25*** [install_dev] Error 1) = 25
write(2, "\n", 1
) = 1
rt_sigprocmask(SIG_BLOCK, [HUP INT QUIT TERM XCPU XFSZ], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
chdir("/root/openssl-1.1.0f") = 0
close(1) = 0
munmap(0x7ff02a894000, 4096) = 0
exit_group(2) = ?
+++ exited with 2 +++
julyclyde
2018-12-07 11:03:14 +08:00
cannot create regular file

你那个硬盘是不是只读的?
Lowang
2018-12-09 08:09:22 +08:00
不是啊,这个是系统盘,可以手动创建文件的,我重做了下系统,现在可以了

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/513873

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX