简体   繁体   English

如何使用 composer install --disable-phar 修复错误

[英]How fix bug with composer install --disable-phar

I'm have php version 5.6, and I need to install composer for my project.我的 php 版本是 5.6,我需要为我的项目安装 composer。 I'm installing using these commands:我正在使用这些命令进行安装:

 curl -sS https://getcomposer.org/installer | php
 php -r "readfile('https://getcomposer.org/installer');" | php

I'm getting this error message:我收到此错误消息:

Some settings on your machine make Composer unable to work properly.
Make sure that you fix the issues listed below and run this script again:

The phar extension is missing.
Install it or recompile php without --disable-phar

The error tells you that you have to enable or install the extension for .phar files.该错误告诉您必须启用或安装.phar文件的扩展名。

Because you didn't give any information about your system, OS and so on, there is nothing more I can do to help point you into the correct direction.因为您没有提供有关您的系统、操作系统等的任何信息,所以我无法帮助您指明正确的方向。 In general it's unlikely that you have to recompile PHP, you have to search the source of your current PHP version how to obtain or enable said extension.一般来说,您不太可能需要重新编译 PHP,您必须搜索当前 PHP 版本的来源,如何获取或启用所述扩展。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM