douchang8758 2019-05-11 10:43
浏览 2759
已采纳

无法使用apt-get安装PHP包,给出“E:无法找到包”

I'm actually setting up my vagrant vm (trusty-64, Ubuntu distribution v14.04) and encountered an issue during the installation of all ppa:ondrej/php packages.

I tried the default way to install php...

$ sudo apt-get install software-properties-common
$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt-get update
$ sudo apt-get install php7.3

But it still has this issue:

E: Unable to locate package php7.3
E: Couldn't find any package by regex 'php7.3'

It seems he's ignoring the added repository (it's not listed in apt-get update) but the command seems fine:

gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK

Actually, i have no clue whats wrong. Maybe someone has an idea and can explain it? Thanks a lot.

UPDATE:

Distributor ID: Ubuntu
Description:    Ubuntu 14.04.6 LTS
Release:        14.04
Codename:       trusty

used ubuntu/trusty64 vagrant box

It's the most common vagrant box with few well predefined settings.

source.list

/etc/apt/sources.list.d/ondrej-php-trusty.list
/etc/apt/sources.list.d/ondrej-php-trusty.list.save

It's in the source list, but it is still ignored. E.g. apt-cache search php7 gives always no result instead of an list.

I also destroyed the box an setup a new one.. but still the same issue.

  • 写回答

2条回答 默认 最新

  • doufan6544 2019-05-17 06:41
    关注

    I looked at the repository and it seems like 14.04 is no longer supported. Even though trusty is listed in the dist packages, when I looked into the pools there is nothing for ubuntu 14.04.

    Take a look here:

    http://ppa.launchpad.net/ondrej/php/ubuntu/pool/main/p/php7.3/

    That probably explains why the repository is not being included when you run

    sudo apt-get update
    

    I guess that server update can't wait any longer ;)

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥15 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条