当前位置: 首页 > 工具软件 > LaravelS > 使用案例 >

php's phar extension,Laravels 与phpunit Install or enable PHP's dom extension

酆晔
2023-12-01

Laravels 与phpunit Install or enable PHP's dom extension

Loading composer repositories with package information

Updating dependencies

Your requirements could not be resolved to an installable set of packages.

Problem 1

- phpunit/phpunit[dev-master, 4.8.36, 5.0.0, ..., 5.7.27, 6.0.0, ..., 6.5.14, 7.0.0, ..., 7.5.20, 8.0.0, ..., 8.5.x-dev, 9.0.0, ..., 9.5.x-dev] require ext-dom * -> it is missing from your system. Install or enable PHP's dom extension.

- phpunit/phpunit 10.0.x-dev is an alias of phpunit/phpunit dev-master and thus requires it to be installed too.

- Root composer.json requires phpunit/phpunit >=4.8.36 -> satisfiable by phpunit/phpunit[4.8.36, 5.0.0, ..., 5.7.27, 6.0.0, ..., 6.5.14, 7.0.0, ..., 7.5.20, 8.0.0, ..., 8.5.x-dev, 9.0.0, ..., 9.5.x-dev, 10.0.x-dev (alias of dev-master)].

To enable extensions, verify that they are enabled in your .ini files:

- /etc/php/7.4/cli/php.ini

- /etc/php/7.4/cli/conf.d/10-mysqlnd.ini

- /etc/php/7.4/cli/conf.d/10-opcache.ini

- /etc/php/7.4/cli/conf.d/10-pdo.ini

- /etc/php/7.4/cli/conf.d/20-bcmath.ini

- /etc/php/7.4/cli/conf.d/20-bz2.ini

- /etc/php/7.4/cli/conf.d/20-calendar.ini

- /etc/php/7.4/cli/conf.d/20-ctype.ini

- /etc/php/7.4/cli/conf.d/20-curl.ini

- /etc/php/7.4/cli/conf.d/20-exif.ini

- /etc/php/7.4/cli/conf.d/20-ffi.ini

- /etc/php/7.4/cli/conf.d/20-fileinfo.ini

- /etc/php/7.4/cli/conf.d/20-ftp.ini

- /etc/php/7.4/cli/conf.d/20-gd.ini

- /etc/php/7.4/cli/conf.d/20-gettext.ini

- /etc/php/7.4/cli/conf.d/20-iconv.ini

- /etc/php/7.4/cli/conf.d/20-intl.ini

- /etc/php/7.4/cli/conf.d/20-json.ini

- /etc/php/7.4/cli/conf.d/20-mbstring.ini

- /etc/php/7.4/cli/conf.d/20-mysqli.ini

- /etc/php/7.4/cli/conf.d/20-pdo_mysql.ini

- /etc/php/7.4/cli/conf.d/20-phar.ini

- /etc/php/7.4/cli/conf.d/20-posix.ini

- /etc/php/7.4/cli/conf.d/20-readline.ini

- /etc/php/7.4/cli/conf.d/20-shmop.ini

- /etc/php/7.4/cli/conf.d/20-sockets.ini

- /etc/php/7.4/cli/conf.d/20-sysvmsg.ini

- /etc/php/7.4/cli/conf.d/20-sysvsem.ini

- /etc/php/7.4/cli/conf.d/20-sysvshm.ini

- /etc/php/7.4/cli/conf.d/20-tokenizer.ini

You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

首先安装 phpunit

wget https://phar.phpunit.de/phpunit-7.2.phar

chmod +x phpunit-7.2.phar

sudo mv phpunit-7.2.phar /usr/local/bin/phpunit

phpunit --version

其次

sudo apt-get install php7.*-xml

我的php版本是 7.4 所以命令如下

sudo apt-get install php7.4-xml

root@ubuntu-groovy:/vagrant_data/firsttest/laravel-s# sudo apt-get install php7.4-xml

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following packages were automatically installed and are no longer required:

jsonlint php-composer-ca-bundle php-composer-semver php-composer-spdx-licenses php-composer-xdebug-handler php-json-schema php-psr-container php-psr-log php-symfony-console

php-symfony-filesystem php-symfony-finder php-symfony-polyfill-php80 php-symfony-process php-symfony-service-contracts unzip

Use 'sudo apt autoremove' to remove them.

The following NEW packages will be installed:

php7.4-xml

0 upgraded, 1 newly installed, 0 to remove and 44 not upgraded.

Need to get 97.7 kB of archives.

After this operation, 452 kB of additional disk space will be used.

Get:1 http://ppa.launchpad.net/ondrej/php/ubuntu groovy/main amd64 php7.4-xml amd64 7.4.15-7+ubuntu20.10.1+deb.sury.org+1 [97.7 kB]

Fetched 97.7 kB in 1s (70.1 kB/s)

Selecting previously unselected package php7.4-xml.

(Reading database ... 106597 files and directories currently installed.)

Preparing to unpack .../php7.4-xml_7.4.15-7+ubuntu20.10.1+deb.sury.org+1_amd64.deb ...

Unpacking php7.4-xml (7.4.15-7+ubuntu20.10.1+deb.sury.org+1) ...

Setting up php7.4-xml (7.4.15-7+ubuntu20.10.1+deb.sury.org+1) ...

Creating config file /etc/php/7.4/mods-available/dom.ini with new version

Creating config file /etc/php/7.4/mods-available/simplexml.ini with new version

Creating config file /etc/php/7.4/mods-available/xml.ini with new version

Creating config file /etc/php/7.4/mods-available/xmlreader.ini with new version

Creating config file /etc/php/7.4/mods-available/xmlwriter.ini with new version

Creating config file /etc/php/7.4/mods-available/xsl.ini with new version

Processing triggers for libapache2-mod-php7.4 (7.4.15-7+ubuntu20.10.1+deb.sury.org+1) ...

Processing triggers for php7.4-fpm (7.4.15-7+ubuntu20.10.1+deb.sury.org+1) ...

NOTICE: Not enabling PHP 7.4 FPM by default.

NOTICE: To enable PHP 7.4 FPM in Apache2 do:

NOTICE: a2enmod proxy_fcgi setenvif

NOTICE: a2enconf php7.4-fpm

NOTICE: You are seeing this message because you have apache2 package installed.

Processing triggers for php7.4-cli (7.4.15-7+ubuntu20.10.1+deb.sury.org+1) ...

然后执行 composer update 完事

 类似资料: