You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu Server(OpenLiteSpeed)下多版本lsphp扩展包安装失败求助

Fixing "Unable to locate package" Errors for LSPHP on Ubuntu Server (OpenLiteSpeed)

Hey there, let's work through fixing those package-not-found errors you're hitting when trying to install LSPHP extensions. The core issue here is that Ubuntu's default apt repositories don't host these OpenLiteSpeed-specific PHP packages—they're maintained directly by OpenLiteSpeed, so we need to add their official repo first.

Step 1: Add OpenLiteSpeed's Official Repository

First, we'll import the repo's GPG key to ensure the packages we download are trusted, then add the repository to your system's apt sources:

# Import the OpenLiteSpeed GPG key
wget -O - https://rpms.litespeedtech.com/debian/lst_repo.gpg | sudo apt-key add -

# Add the repository to your apt sources list
echo "deb https://rpms.litespeedtech.com/debian/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/lst_debian_repo.list

Step 2: Refresh Your Apt Cache

Now update your apt package index to recognize the new repository:

sudo apt update

Step 3: Re-Run Your Installation Commands

With the official repo added, you should now be able to install those LSPHP packages without errors. Go ahead and re-run the apt-get install commands you tried earlier.

Quick Note on Package Names

If you still run into a hiccup with a specific package, double-check the naming—OpenLiteSpeed sometimes uses minor variations from standard PHP package conventions. For most cases though, the names you used should work perfectly once the repo is added.

Step 4: Verify the Installation

After installation, confirm that the LSPHP versions are set up correctly with:

# Check LSPHP 7.0 version
lsphp70 -v

# Verify other versions similarly
lsphp71 -v
lsphp72 -v
lsphp73 -v
lsphp74 -v
lsphp80 -v

That should clear up all the "unable to locate package" and "no installation candidate" errors you were facing. Let me know if you hit any unexpected snags along the way!

内容的提问来源于stack exchange,提问作者Suresh Ramani

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.30 17:12:51