rateltalk
V2EX  ›  问与答

Centos7 如何正确的安装依赖包?

  •  
  •   rateltalk · Aug 28, 2018 · 4203 views
    This topic created in 2843 days ago, the information mentioned may be changed or developed.

    比如我运行程序时发生了这么一段错误:

    ┏ Electron -------------------
    
      /home/wwwroot/topsi-project-manager/node_modules/electron/dist/electron: error while loading shared libraries: libXtst.so.6: cannot open shared object file: No such file or directory
      
    ┗ ----------------------------
    

    显然是缺少这个 libXtst.so.6 依赖库的,那么我的安装方法如下:

    # yum whatprovides libXtst.so.6
    

    找到提供这个依赖库的安装包,然后安装:

    已加载插件:fastestmirror
    Loading mirror speeds from cached hostfile
     * base: mirror.vpshosting.com.hk
     * extras: mirror.vpshosting.com.hk
     * updates: mirror.vpshosting.com.hk
    libXtst-1.2.3-1.el7.i686 : X.Org X11 libXtst runtime library
    源    :base
    匹配来源:
    提供    :libXtst.so.6
    
    
    
    libXtst-1.2.3-1.el7.i686 : X.Org X11 libXtst runtime library
    源    :@base
    匹配来源:
    提供    :libXtst.so.6
    

    安装 libXtst-1.2.3-1.el7.i68 这个库,也就说明安装了 libXtst.so.6。

    *** 但是,没有用。那么,大家平时都是怎么安装的呢?***

    2 replies    2018-08-28 22:09:34 +08:00
    wqsfree
        1
    wqsfree  
       Aug 28, 2018
    yum list available | grep libXtst
    julyclyde
        2
    julyclyde  
       Aug 28, 2018
    你这个做法看起来没啥问题
    我觉得你是不是可以先 ldd 一下 /home/wwwroot/topsi-project-manager/node_modules/electron/dist/electron
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3618 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 04:43 · PVG 12:43 · LAX 21:43 · JFK 00:43
    ♥ Do have faith in what you're doing.