我正在使用最新版本的 manjaro 64 位和最新版本的 xampp。我想安装composer和laravel;我在 stackoverflow 和 askubuntu 上尝试了很多解决方案。每次我看到不同的错误,比如 openssl 和 phar 丢失之类的东西。但实际上什么都没有缺失;我启用了它们php.ini
那么是否有任何 manjaro 用户/弓箭手让 Laravel 在 xampp 上工作?如何?
编辑
php -i | grep ini
输出
▶ php -i | grep ini
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20151012/mcrypt.dll' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20151012/mcrypt.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20151012/php_openssl.dll' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20151012/php_openssl.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/opt/lampp/lib/php/extensions/no-debug-non-zts-20151012/php_phar.dll' - /opt/lampp/lib/php/extensions/no-debug-non-zts-20151012/php_phar.dll: cannot open shared object file: No such file or directory in Unknown on line 0
Configuration File (php.ini) Path => /opt/lampp/etc
Loaded Configuration File => /opt/lampp/etc/php.ini
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
Supported handlers => gdbm cdb cdb_make inifile flatfile
init_command_executed_count => 0
init_command_failed_count => 0
com_init_db => 0
Classes => AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, CallbackFilterIterator, DirectoryIterator, DomainException, EmptyIterator, FilesystemIterator, FilterIterator, GlobIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, MultipleIterator, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveCallbackFilterIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RecursiveTreeIterator, RegexIterator, RuntimeException, SplDoublyLinkedList, SplFileInfo, SplFileObject, SplFixedArray, SplHeap, SplMinHeap, SplMaxHeap, SplObjectStorage, SplPriorityQueue, SplQueue, SplStack, SplTempFileObject, UnderflowException, UnexpectedValueException
open sourced by => Epinions.com
PHPRC => /opt/lampp/etc/php.ini
$_SERVER['PHPRC'] => /opt/lampp/etc/php.ini
- 这正是我是如何安装composer的。我做了两个答案所说的
- 我的/opt/lampp/etc/php.ini如您所见,所需的一切都已加载。
- 这php-mcrypt 已安装,它有自己的 php 版本,但我没有使用它,我使用的是 Xampp 的版本
- 我使用的是最新版本的 xampp 64 位,即 PHP 7 附带的版本,与以前的版本有同样的问题。
- 在我的 zshrc 中我有
export PHPRC=/opt/lampp/etc/php.ini export PATH=$PATH:/opt/lampp/bin
如果我能够正确加载 openssl、mcrypt 和 phar,我想我所有的问题都会得到解决。 Composer 似乎安装没有问题,但当我安装 laravel 时,问题开始出现。它也可以顺利安装,但会显示如上所示的警告。