Ubuntu上服务运行报错,No usable version of libssl was found

运行服务时报错

sudo systemctl start ComServer.service
sudo systemctl status ComServer.service

× ComServer.service - MESAPI services
     Loaded: loaded (/etc/systemd/system/ComServer.service; enabled; vendor preset: enabled)
     Active: failed (Result: core-dump) since Wed 2024-03-20 03:38:56 UTC; 2s ago
    Process: 27131 ExecStart=/home/orangepi/MESPI/ComServer.sh (code=exited, status=0/SUCCESS)
   Main PID: 27132 (code=dumped, signal=ABRT)
        CPU: 831ms

Mar 20 03:38:54 orangepizero3 systemd[1]: Starting MESAPI services...
Mar 20 03:38:54 orangepizero3 systemd[1]: Started MESAPI services.
Mar 20 03:38:55 orangepizero3 ComServer.sh[27132]: No usable version of libssl was found
Mar 20 03:38:56 orangepizero3 systemd[1]: ComServer.service: Main process exited, code=dumped, status=6/ABRT
Mar 20 03:38:56 orangepizero3 systemd[1]: ComServer.service: Failed with result 'core-dump'.

这是依赖.net5的服务,需要安装 libssl1.1
经查阅资料了解到,在 Ubuntu 18.04 以后的版本中,libssl1.1 已经从仓库中被移除了,因此在 Ubuntu 20.04 和 Ubuntu 22.04 系统下,我们只能手动安装这个依赖包。
首先确认系统是机遇arm架构还是amd架构

  1. arm架构
    http://ports.ubuntu.com/ubuntu-ports/pool/main/o/openssl/
    在官网下载所需版本,选择 libssl1.1_1.1.1-1ubuntu2.1~18.04.23_arm64.deb 点击下载

    或者可以选择用wget安装
wget http://ports.ubuntu.com/ubuntu-ports/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.23_arm64.deb

依赖包下载完成后,进入其所在的目录,使用软件安装工具 dpkg 来安装

sudo dpkg -i libssl1.1_1.1.1-1ubuntu2.1~18.04.23_arm64.deb

安装完成后再运行服务,一切正常!

  1. amd架构
    http://security.ubuntu.com/ubuntu/pool/main/o/openssl/
    在官网下载所需版本,选择 libssl1.1_1.1.1-1ubuntu2.1~18.04.23_amd64.deb 点击下载

    或者可以选择用wget安装
wget http://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.23_amd64.deb

依赖包下载完成后,进入其所在的目录,使用软件安装工具 dpkg 来安装

sudo dpkg -i libssl1.1_1.1.1-1ubuntu2.1~18.04.23_amd64.deb

安装完成后再运行服务,一切正常!

posted @ 2024-03-20 14:36  火炬冬天  阅读(110)  评论(0编辑  收藏  举报