V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
lanceb1uy
V2EX  ›  问与答

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

  •  
  •   lanceb1uy · 2019-11-20 13:59:17 +08:00 · 1636 次点击
    这是一个创建于 1611 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

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

    8 条回复    2019-11-20 14:58:56 +08:00
    Momostudent
        1
    Momostudent  
       2019-11-20 14:07:53 +08:00
    截图看不到 ,为什么不是 sudo apt-get install nginx
    或者编译安装
    lanceb1uy
        2
    lanceb1uy  
    OP
       2019-11-20 14:11:59 +08:00
    @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
        3
    ysc3839  
       2019-11-20 14:25:47 +08:00
    有执行 apt update 吗?
    ysc3839
        4
    ysc3839  
       2019-11-20 14:26:37 +08:00
    @ysc3839 抱歉,没仔细看,已经 update 了。
    ysc3839
        5
    ysc3839  
       2019-11-20 14:28:41 +08:00
    用的是什么发行版?有可能这个发行版不带 nginx ?
    momocraft
        6
    momocraft  
       2019-11-20 14:29:24 +08:00
    这是什么发行版 raspbian?
    PHPer233
        7
    PHPer233  
       2019-11-20 14:49:40 +08:00 via iPhone
    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
    lanceb1uy
        8
    lanceb1uy  
    OP
       2019-11-20 14:58:56 +08:00 via Android
    @PHPer233 谢谢
    @ysc3839 @momocraft 就是官方的镜像 raspberry os
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   985 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 20:20 · PVG 04:20 · LAX 13:20 · JFK 16:20
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.