AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题 / 788095
Accepted
DARK_DIESEL
DARK_DIESEL
Asked: 2016-07-06 11:24:21 +0800 CST2016-07-06 11:24:21 +0800 CST 2016-07-06 11:24:21 +0800 CST

Debian 8 - 安装 php7.0 的设置首选项

  • 772

请帮助设置安装 php7.0 和相关软件包的首选项(其中一些不是稳定版本)。

我有操作系统 Debian 8。

我在以下位置设置包的源列表etc\apt\sources.list.d\:

security.list

deb http://security.debian.org/ stable/updates  main contrib non-free
deb http://security.debian.org/ testing/updates main contrib non-free

stable.list

deb     http://ftp.de.debian.org/debian/ stable main contrib non-free
deb-src http://ftp.de.debian.org/debian/ stable main contrib non-free

testing.list

deb     http://ftp.de.debian.org/debian/ testing main contrib non-free
deb-src http://ftp.de.debian.org/debian/ testing main contrib non-free

unstable.list

deb     http://ftp.de.debian.org/debian/ unstable main contrib non-free
deb-src http://ftp.de.debian.org/debian/ unstable main contrib non-free

我在以下位置为包设置了一些首选项文件etc\apt\preferences.d\:

security.pref

Package: *
Pin: release l=Debian-Security
Pin-Priority: 1000

stable.pref

Package: *
Pin: release a=stable
Pin-Priority: 900

testing.pref

Package: *
Pin: release a=testing
Pin-Priority: 750

unstable.pref

Package: *
Pin: release a=unstable
Pin-Priority: 50

我创建99default-release了etc\apt\apt.conf.d\包含内容的文件:

APT::Default-Release "stable";

最后,当我运行安装 php7.0 的命令时,出现下一个错误:

root@machie:/etc# apt-get install php7.0

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php7.0 : Depends: libapache2-mod-php7.0 but it is not going to be installed or
                   php7.0-fpm but it is not going to be installed or
                   php7.0-cgi but it is not going to be installed
W: No priority (or zero) specified for pin
E: Unable to correct problems, you have held broken packages.

PS 没有来源、首选项和 apt.conf 文件 php7.0 安装成功表单“ deb http://packages.dotdeb.org jessie all” repo。但我希望这是可能的设置偏好。

linux apt preferences php7 debian-jessie
  • 1 1 个回答
  • 386 Views

1 个回答

  • Voted
  1. Best Answer
    DARK_DIESEL
    2016-07-07T12:22:16+08:002016-07-07T12:22:16+08:00

    http://packages.dotdeb.org我只是从sources.list 中删除repo。现在我可以通过执行命令从 debian repo 安装测试版本:

    sudo apt-get install -f -y -t testing php7.0 php7.0-curl php7.0-cli php7.0-gd php7.0-xml php7.0-mbstring php-xdebug
    

    完全依赖(apache2等)

    对于更新测试包运行命令:

    apt-get install `apt-show-versions -u -b | grep testing`
    

    要将任何软件包降级到稳定版本,请etc\apt\preferences.d\使用以下内容创建文件:

    Package: <package_name_here> 
    Pin: release a=testing
    Priority: 1001
    

    并运行apt-get update

    • 0

相关问题

  • 多操作系统环境的首选电子邮件客户端

  • 你最喜欢的 Linux 发行版是什么?[关闭]

  • 更改 PHP 的默认配置设置?

  • 保护新的 Ubuntu 服务器 [关闭]

  • (软)Ubuntu 7.10 上的 RAID 6,我应该迁移到 8.10 吗?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve