解決Ubuntu運(yùn)行composer install報(bào)錯(cuò)

  • 問題:
    dragon-code/support 6.12.0 requires ext-bcmath * -> it is missing from your system. Install or enable PHP's bcmath extension.
 composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.

  Problem 1
    - dragon-code/support is locked to version 6.12.0 and an update of this package was not requested.
    - dragon-code/support 6.12.0 requires ext-bcmath * -> it is missing from your system. Install or enable PHP's bcmath extension.
  Problem 2
    - dragon-code/support 6.12.0 requires ext-bcmath * -> it is missing from your system. Install or enable PHP's bcmath extension.
    - laravel-lang/publisher 16.2.0 requires dragon-code/support ^6.11.3 -> satisfiable by dragon-code/support[6.12.0].
    - laravel-lang/publisher is locked to version 16.2.0 and an update of this package was not requested.

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

  • 解決
    直接安裝一下删顶,ext-bcmath即可。
    執(zhí)行命令:sudo apt-get install php-bcmath
ubuntu@VM-16-8-ubuntu:~$ sudo apt-get install php-bcmath
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  php8.1-bcmath
The following NEW packages will be installed:
  php-bcmath php8.1-bcmath
0 upgraded, 2 newly installed, 0 to remove and 205 not upgraded.
Need to get 18.3 kB of archives.
After this operation, 84.0 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.tencentyun.com/ubuntu jammy-updates/universe amd64 php8.1-bcmath amd64 8.1.2-1ubuntu2.14 [16.5 kB]
Get:2 http://mirrors.tencentyun.com/ubuntu jammy/universe amd64 php-bcmath all 2:8.1+92ubuntu1 [1,834 B]
Fetched 18.3 kB in 0s (274 kB/s)
Selecting previously unselected package php8.1-bcmath.
(Reading database ... 118181 files and directories currently installed.)
Preparing to unpack .../php8.1-bcmath_8.1.2-1ubuntu2.14_amd64.deb ...
Unpacking php8.1-bcmath (8.1.2-1ubuntu2.14) ...
Selecting previously unselected package php-bcmath.
Preparing to unpack .../php-bcmath_2%3a8.1+92ubuntu1_all.deb ...
Unpacking php-bcmath (2:8.1+92ubuntu1) ...
Setting up php8.1-bcmath (8.1.2-1ubuntu2.14) ...

Creating config file /etc/php/8.1/mods-available/bcmath.ini with new version
Setting up php-bcmath (2:8.1+92ubuntu1) ...
Processing triggers for php8.1-fpm (8.1.2-1ubuntu2.14) ...
Processing triggers for php8.1-cli (8.1.2-1ubuntu2.14) ...
Scanning processes...
Scanning linux images...

Running kernel seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
ubuntu@VM-16-8-ubuntu:~$ ls

  • 再次安裝佑笋,即可通過
ubuntu@VM-16-8-ubuntu:~/api/RwShopAi$ composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 18 installs, 0 updates, 0 removals
  - Downloading dragon-code/contracts (2.22.0)
  - Downloading symfony/polyfill-php81 (v1.28.0)
  - Downloading dragon-code/support (6.12.0)
  - Downloading laravel-lang/native-locale-names (2.1.0)
  - Downloading laravel-lang/native-currency-names (1.3.0)
  - Downloading laravel-lang/native-country-names (1.2.0)
  - Downloading archtechx/enums (v0.3.2)
  - Downloading laravel-lang/locale-list (1.1.0)
  - Downloading laravel-lang/locales (2.3.1)
  - Downloading dragon-code/pretty-array (v4.1.0)
  - Downloading composer/semver (3.4.0)
  - Downloading laravel-lang/publisher (16.2.0)
  - Downloading laravel-lang/lang (14.2.1)
  - Downloading laravel-lang/json-fallback (2.0.0)
  - Downloading laravel-lang/http-statuses (3.8.0)
  - Downloading laravel-lang/attributes (2.9.1)
  - Downloading laravel-lang/actions (1.4.1)
  - Downloading laravel-lang/common (6.1.0)
  - Installing dragon-code/contracts (2.22.0): Extracting archive
  - Installing symfony/polyfill-php81 (v1.28.0): Extracting archive
  - Installing dragon-code/support (6.12.0): Extracting archive
  - Installing laravel-lang/native-locale-names (2.1.0): Extracting archive
  - Installing laravel-lang/native-currency-names (1.3.0): Extracting archive
  - Installing laravel-lang/native-country-names (1.2.0): Extracting archive
  - Installing archtechx/enums (v0.3.2): Extracting archive
  - Installing laravel-lang/locale-list (1.1.0): Extracting archive
  - Installing laravel-lang/locales (2.3.1): Extracting archive
  - Installing dragon-code/pretty-array (v4.1.0): Extracting archive
  - Installing composer/semver (3.4.0): Extracting archive
  - Installing laravel-lang/publisher (16.2.0): Extracting archive
  - Installing laravel-lang/lang (14.2.1): Extracting archive
  - Installing laravel-lang/json-fallback (2.0.0): Extracting archive
  - Installing laravel-lang/http-statuses (3.8.0): Extracting archive
  - Installing laravel-lang/attributes (2.9.1): Extracting archive
  - Installing laravel-lang/actions (1.4.1): Extracting archive
  - Installing laravel-lang/common (6.1.0): Extracting archive
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   INFO  Discovering packages.

  laravel-lang/actions ........................................................................................................................ DONE
  laravel-lang/attributes ..................................................................................................................... DONE
  laravel-lang/http-statuses .................................................................................................................. DONE
  laravel-lang/lang ........................................................................................................................... DONE
  laravel-lang/locales ........................................................................................................................ DONE
  laravel-lang/publisher ...................................................................................................................... DONE
  laravel/sail ................................................................................................................................ DONE
  laravel/sanctum ............................................................................................................................. DONE
  laravel/tinker .............................................................................................................................. DONE
  nesbot/carbon ............................................................................................................................... DONE
  nunomaduro/collision ........................................................................................................................ DONE
  nunomaduro/termwind ......................................................................................................................... DONE
  spatie/laravel-ignition ..................................................................................................................... DONE

88 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
  • 版本

PHP 版本

php -v
PHP 8.1.2-1ubuntu2.14 (cli) (built: Aug 18 2023 11:41:11) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.2, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.2-1ubuntu2.14, Copyright (c), by Zend Technologies

Laravel 版本

php artisan --version
Laravel Framework 10.40.0

Ubuntu版本

cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04 (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末翼闹,一起剝皮案震驚了整個(gè)濱河市,隨后出現(xiàn)的幾起案子蒋纬,更是在濱河造成了極大的恐慌猎荠,老刑警劉巖,帶你破解...
    沈念sama閱讀 206,311評(píng)論 6 481
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件蜀备,死亡現(xiàn)場(chǎng)離奇詭異关摇,居然都是意外死亡,警方通過查閱死者的電腦和手機(jī)碾阁,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 88,339評(píng)論 2 382
  • 文/潘曉璐 我一進(jìn)店門输虱,熙熙樓的掌柜王于貴愁眉苦臉地迎上來,“玉大人脂凶,你說我怎么就攤上這事宪睹。” “怎么了蚕钦?”我有些...
    開封第一講書人閱讀 152,671評(píng)論 0 342
  • 文/不壞的土叔 我叫張陵亭病,是天一觀的道長(zhǎng)。 經(jīng)常有香客問我嘶居,道長(zhǎng)罪帖,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 55,252評(píng)論 1 279
  • 正文 為了忘掉前任邮屁,我火速辦了婚禮整袁,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘佑吝。我一直安慰自己坐昙,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 64,253評(píng)論 5 371
  • 文/花漫 我一把揭開白布芋忿。 她就那樣靜靜地躺著民珍,像睡著了一般擅耽。 火紅的嫁衣襯著肌膚如雪想暗。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 49,031評(píng)論 1 285
  • 那天广鳍,我揣著相機(jī)與錄音逆趣,去河邊找鬼蝶溶。 笑死,一個(gè)胖子當(dāng)著我的面吹牛宣渗,可吹牛的內(nèi)容都是我干的抖所。 我是一名探鬼主播,決...
    沈念sama閱讀 38,340評(píng)論 3 399
  • 文/蒼蘭香墨 我猛地睜開眼痕囱,長(zhǎng)吁一口氣:“原來是場(chǎng)噩夢(mèng)啊……” “哼田轧!你這毒婦竟也來了?” 一聲冷哼從身側(cè)響起鞍恢,我...
    開封第一講書人閱讀 36,973評(píng)論 0 259
  • 序言:老撾萬榮一對(duì)情侶失蹤傻粘,失蹤者是張志新(化名)和其女友劉穎,沒想到半個(gè)月后帮掉,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體弦悉,經(jīng)...
    沈念sama閱讀 43,466評(píng)論 1 300
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 35,937評(píng)論 2 323
  • 正文 我和宋清朗相戀三年蟆炊,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了稽莉。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片。...
    茶點(diǎn)故事閱讀 38,039評(píng)論 1 333
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡涩搓,死狀恐怖污秆,靈堂內(nèi)的尸體忽然破棺而出,到底是詐尸還是另有隱情昧甘,我是刑警寧澤良拼,帶...
    沈念sama閱讀 33,701評(píng)論 4 323
  • 正文 年R本政府宣布,位于F島的核電站疾层,受9級(jí)特大地震影響将饺,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜痛黎,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 39,254評(píng)論 3 307
  • 文/蒙蒙 一予弧、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧湖饱,春花似錦掖蛤、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 30,259評(píng)論 0 19
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽致讥。三九已至,卻和暖如春器赞,著一層夾襖步出監(jiān)牢的瞬間垢袱,已是汗流浹背。 一陣腳步聲響...
    開封第一講書人閱讀 31,485評(píng)論 1 262
  • 我被黑心中介騙來泰國打工港柜, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留请契,地道東北人。 一個(gè)月前我還...
    沈念sama閱讀 45,497評(píng)論 2 354
  • 正文 我出身青樓夏醉,卻偏偏與公主長(zhǎng)得像爽锥,于是被迫代替她去往敵國和親。 傳聞我的和親對(duì)象是個(gè)殘疾皇子畔柔,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 42,786評(píng)論 2 345

推薦閱讀更多精彩內(nèi)容