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
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[php7](ubuntu)

Martin Hope
Ananda
Asked: 2020-10-12 14:03:04 +0800 CST

php-curl 未安装在 php 7.4 中

  • 0

我正在尝试在终端中安装 php-curl 但此命令显示

    linux@Lenovo:~$ sudo apt-get install php-curl 

    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:  
    php-curl : Depends: php7.4-curl but it is not going to be installed 
    E: Unable to correct problems, you have held broken packages.
php php7
  • 3 个回答
  • 16208 Views
Martin Hope
thoni56
Asked: 2020-10-01 05:58:39 +0800 CST

为什么我不能在 Ubuntu 20.04 上安装 php7.4-intl?

  • 3

我需要 Ubuntu 20.04 上 PHP 的 INTL 模块。当我做

$ sudo apt install php7.4-intl

我明白了

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.4-intl : Depends: php7.4-common (= 7.4.3-4ubuntu2.2) but 7.4.8-1+ubuntu19.10.1+deb.sury.org+3 is to be installed
E: Unable to correct problems, you have held broken packages.

我们都知道,损坏的包裹消息是一条红鲱鱼。(是的,我检查了...)

当我在 20.04 时,我对包装中建议的ubuntu19.10.1部分持怀疑态度。apt

PHP 说:

PHP 7.4.8 (cli) (built: Jul 13 2020 16:46:06) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.8, Copyright (c), by Zend Technologies

这让我更加困惑。我已经尝试了我可以找到的谷歌搜索来纠正 apt 配置和缓存中的任何不一致。( dpkg --configure -a, apt clean/autoclean, ...)

dependencies apt php7
  • 1 个回答
  • 10093 Views
Martin Hope
S16
Asked: 2020-01-17 15:56:07 +0800 CST

安装了 LAMP 的 Ubuntu 18.04 并希望从 php7.2 升级到 php7.2-fpm

  • 0

我有一个裸机 Ubuntu 18.04 盒子,我在其上安装了 LAMP,用于在虚拟主机中安装 NextCloud 和 Minecraft dynmap。一切正常,但是我的 NextCloud 速度慢得可笑,而且我所做的所有阅读都表明我应该使用 php-fpm 而不是 vanilla php。

我已经搜索并搜索了如何将 php 7.2升级到 fpm 版本,但我空手而归。我似乎找不到任何关于我的 php.ini 是否可以粘贴的信息,如何告诉 apache 使用新版本而不是旧版本,我是否必须单独告诉每个虚拟主机使用它某个地方的apache配置...

任何帮助表示赞赏。

php apache2 18.04 php7
  • 1 个回答
  • 399 Views
Martin Hope
DonP
Asked: 2019-12-17 18:34:11 +0800 CST

运行 Ubuntu 19.10 但 phpinfo() 显示 v19.04

  • 0

在尝试让 ImageMagick 与 HEIC 一起工作时,我注意到虽然我安装了 Ubuntu 19.10,但 phpinfo() 显示版本 19.04。这使得很难知道要编辑哪个 php.ini,尤其是当有一个 PHP 7.2 文件夹和一个带有 phpinfo() 的 7.3 文件夹报告 php.ini 在 7.2 中时。

更令人困惑的是,在命令行运行php -v会显示预期的版本,而不是 phpinfo 中显示的早期版本。如何使所有这些同步并删除旧的未使用版本?

php -v
PHP 7.3.12-1+ubuntu19.10.1+deb.sury.org+1 (cli) (built: Nov 28 2019 07:38:11) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.12, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.12-1+ubuntu19.10.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies
php apache2 php7
  • 1 个回答
  • 599 Views
Martin Hope
Aria P74
Asked: 2019-10-30 10:14:26 +0800 CST

phpmyadmin 没有安装候选

  • 1

我已将存储库更新并添加到我的源列表中,但它仍然无法正常工作:

cyan@cyanonvo:~$ sudo apt install phpmyadmin
[sudo] password for cyan: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package phpmyadmin is not available, but is referred to by another package. 
This may mean that the package is missing, it has been obsoleted, or   
is only available from another source.

Package 'phpmyadmin' has no installation candidate
cyan@cyanonvo:~$
lamp phpmyadmin php7 19.10
  • 3 个回答
  • 9218 Views
Martin Hope
NealM
Asked: 2019-10-27 10:45:30 +0800 CST

PHP 7.3 更新没有采取

  • 1

操作系统:Ubuntu 16.04.6 LTS

我更新到 php 7.3。一切似乎都很顺利。但是,当我输入 php -v 我得到

“PHP 7.2.24-1+ubuntu16.04.1+deb.sury.org+1(cli)(内置:2019 年 10 月 24 日 18:28:51)(NTS)”

pipeinfo 中显示了相同的版本。我已经重新启动了服务器。为 Apache 启用了 php 7.3 模块。Apache 确实声明它已启用。我已经重新启动了apache。

当我在 php7.3 上进行定位时,我会看到各种文件夹和文件。为什么版本 7.3 没有运行?

server php 16.04 php7
  • 1 个回答
  • 1334 Views
Martin Hope
Brandy
Asked: 2019-10-25 10:15:00 +0800 CST

使 PHP7.2 在 Ubuntu 19.10 下工作

  • 3

我安装了 Ubuntu 19.10 并将其用于 Web 开发,主要用于 PHP 框架。

我们有一些运行 php7.2 和 php7.3 的项目。我安装了 7.3 但是 7.2 不存在?

我添加了ppa:ondrej/php让我获得 php7.3 的 PPA,但是安装 php7.2 给了我错误

$ sudo apt update

Hit:1 http://linux.teamviewer.com/deb stable InRelease
Hit:2 https://dl.yarnpkg.com/debian stable InRelease                                                                                                                                                                      
Hit:3 http://ca.archive.ubuntu.com/ubuntu eoan InRelease                                                                                                                                                                  
Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                                                      
Hit:5 http://dl.google.com/linux/chrome/deb stable Release                                                                                                                        
Hit:6 http://security.ubuntu.com/ubuntu eoan-security InRelease                                    
Hit:7 http://ca.archive.ubuntu.com/ubuntu eoan-updates InRelease    
Hit:8 http://ppa.launchpad.net/cappelikan/ppa/ubuntu eoan InRelease          
Hit:9 http://ca.archive.ubuntu.com/ubuntu eoan-backports InRelease                                      
Get:11 http://ppa.launchpad.net/ondrej/php/ubuntu eoan InRelease [20.8 kB]                              
Hit:12 http://ppa.launchpad.net/teejee2008/ppa/ubuntu eoan InRelease
Fetched 20.8 kB in 3s (8,105 B/s)
Reading package lists... Done
Building dependency tree       
Reading state information... Done
All packages are up to date.
$ sudo apt install -y php7.2 php7.2-cli

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'php7.2-sodium' for regex 'php7.2'
Note, selecting 'php7.2-thrift' for regex 'php7.2'
E: Unable to locate package php7.2-cli
E: Couldn't find any package by glob 'php7.2-cli'
E: Couldn't find any package by regex 'php7.2-cli'

有没有人能够在 Ubuntu 19.10 上安装 7.2,还是我不走运?

apt php7 19.10
  • 2 个回答
  • 2077 Views
Martin Hope
roeloffx
Asked: 2019-08-08 00:20:24 +0800 CST

\n 和 \r\n 在浏览器中打印时不会转义

  • -1

我不确定这是 Ubuntu、Apache 还是 PHP 问题。

以下基本脚本不会在我的 Firefox 浏览器中呈现新行。

  1. echo "this is not \n creating a new line";
  2. echo "this is not \r\n creating a new line";
  3. echo "this is not creating a new line";

我目前正在学习 PHP,甚至不知道从哪里开始解决这个问题。我从谷歌搜索知道的是上述 3 应该可以工作。

这有效

  1. echo "this does <br> create a new line";

我的设置:

Ubuntu 18.04.2
Apache/ 2.4.29 (ubuntu)
PHP 7.3.7-2+ubuntu18.04.1
Fireforx Developer (Quantum) 68.0.1 (64bit)

谢谢@cmak.fr 和@Mathieu 的回答。现在更有意义了。在阅读了您的回复https://www.webmasterworld.com/php/3127164.htm后,我也找到了此链接。

进一步窥探我发现<pre>标签与\n. 这是为什么?

<html>
   <body>
     <h1>Some h1</h1>
     <p>Some text</p>
     <pre>
      <?php
        echo "this is not \n creating a new line";?>
     </pre>
   </body>
</html>
apache2.4 php7
  • 2 个回答
  • 7757 Views
Martin Hope
Adnan
Asked: 2019-07-23 02:27:49 +0800 CST

如何通过 OpenLiteSpeed Web 服务器在 Ubuntu 上安装 Imagick?

  • 0

我想为 lsphp73 启用 Imagick,我有一个用于 Wordpress 液滴的 digitalocean OpenLiteSpeed。

通过运行这些命令,我​​认为它不会安装我正确的 PHP 版本:

sudo apt install php-imagick php-gd 
apt webserver php7
  • 2 个回答
  • 2018 Views
Martin Hope
Denis.Z
Asked: 2019-07-20 12:27:11 +0800 CST

使用 fpm 和 mysqli 全新安装 PHP

  • 0

研究多个文档我对 PHP 7.* 安装过程感到困惑。
我是否必须使用 fpm 和 mysqli 选项从源代码编译它,或者我可以为此使用像 aptitude 这样的包管理器?

software-installation php7
  • 1 个回答
  • 417 Views

Sidebar

Stats

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

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

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

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve