PolarisTime
V2EX  ›  问与答

关于树莓派 3B+安装 nginx 的问题

  •  
  •   PolarisTime · Nov 20, 2019 · 2425 views
    This topic created in 2556 days ago, the information mentioned may be changed or developed.

    我现在已经设置了 ustc 和官方作为软件源了

    但是执行 apt install nginx 提示报错 报错截图

    已经执行过 update 了 google 了大半天也找不到原因 请问怎么解决?

    8 replies  •  2019-11-20 14:58:56 +08:00
    Momostudent
    Momostudent
    Nov 20, 2019
    1
    截图看不到 ,为什么不是 sudo apt-get install nginx
    或者编译安装
    PolarisTime
    PolarisTime
    OP
    Nov 20, 2019
    2
    @Momostudent #1 apt-get 和 apt 都执行过了 报错如下
    root@raspberrypi:~/lnmp1.6# apt-get install nginx
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    E: Unable to locate package nginx

    编译安装还没有试 我看了下网上的教程都是一键 apt install nginx
    ysc3839
    ysc3839
    Nov 20, 2019
    3
    有执行 apt update 吗?
    ysc3839
    ysc3839
    Nov 20, 2019
    4
    @ysc3839 抱歉,没仔细看,已经 update 了。
    ysc3839
    ysc3839
    Nov 20, 2019
    5
    用的是什么发行版?有可能这个发行版不带 nginx ?
    momocraft
    momocraft
    Nov 20, 2019
    6
    这是什么发行版 raspbian?
    PHPer233
    PHPer233
    Nov 20, 2019 via iPhone
    7
    nginx 不在官方软件仓库里,需要安装 nginx 自己的仓库,
    To set up the apt repository for stable nginx packages, run the following command:
    echo "deb http://nginx.org/packages/debian `lsb_release -cs` nginx" \
    | sudo tee /etc/apt/sources.list.d/nginx.list
    PolarisTime
    PolarisTime
    OP
    Nov 20, 2019 via Android
    8
    @PHPer233 谢谢
    @ysc3839 @momocraft 就是官方的镜像 raspberry os
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2573 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 11:51 · PVG 19:51 · LAX 03:51 · JFK 06:51
    ♥ Do have faith in what you're doing.