V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Lowang
V2EX  ›  京东

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

  •  
  •   Lowang · 2018-12-03 16:39:16 +08:00 · 3161 次点击
    这是一个创建于 2184 天前的主题,其中的信息可能已经有所发展或是发生改变。

    信息如下:

    [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
    

    这个是什么原因啊

    4 条回复    2018-12-09 08:09:22 +08:00
    julyclyde
        1
    julyclyde  
       2018-12-04 15:18:32 +08:00
    你试试 strace install 那个文件
    Lowang
        2
    Lowang  
    OP
       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
        3
    julyclyde  
       2018-12-07 11:03:14 +08:00
    cannot create regular file

    你那个硬盘是不是只读的?
    Lowang
        4
    Lowang  
    OP
       2018-12-09 08:09:22 +08:00 via Android
    不是啊,这个是系统盘,可以手动创建文件的,我重做了下系统,现在可以了
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5651 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 09:04 · PVG 17:04 · LAX 01:04 · JFK 04:04
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.