34 / 10 / 2 Регистрация: 20.02.2016 Сообщений: 1,509 |
|
1 |
|
25.12.2022, 17:09. Показов 433. Ответов 5
Добрый день! To enable extensions, verify that they are enabled in your .ini files:
0 |
168 / 124 / 42 Регистрация: 25.10.2019 Сообщений: 474 |
|
25.12.2022, 17:18 |
2 |
Играйте с путями или с extension_dir
0 |
34 / 10 / 2 Регистрация: 20.02.2016 Сообщений: 1,509 |
|
25.12.2022, 19:04 [ТС] |
3 |
появился вопрос — а где хранятся расширения для php на Ubuntu? на windows — это ext, а — на Ubuntu?
0 |
168 / 124 / 42 Регистрация: 25.10.2019 Сообщений: 474 |
|
25.12.2022, 19:21 |
4 |
0 |
Невнимательный 2380 / 742 / 265 Регистрация: 08.02.2013 Сообщений: 5,045 Записей в блоге: 2 |
|
25.12.2022, 19:22 |
5 |
раскомментировал extension=fileinfo оно и не было закомментировано в /etc/php/7.4/cli/conf.d/20-fileinfo.ini для доступных/установленных расширений такие файлы в /etc/php/7.4/mods-available/ У меня для php-fpm вроде важнее то что в /etc/php/7.4/fpm/ но незнаю чего там могли навернуть в laravel хочет ещё какое-то расширение …?
где хранятся расширения там где надо ))
0 |
Fatmarmelad 34 / 10 / 2 Регистрация: 20.02.2016 Сообщений: 1,509 |
||||
25.12.2022, 22:42 [ТС] |
6 |
|||
может кому-то это будет интересно, помогла эта команда
у меня php 7.4
0 |
IT_Exp Эксперт 87844 / 49110 / 22898 Регистрация: 17.06.2006 Сообщений: 92,604 |
25.12.2022, 22:42 |
6 |
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and
privacy statement. We’ll occasionally send you account related emails.
Already on GitHub?
Sign in
to your account
Assignees
Comments
- VS Code Version:
Version: 1.58.0-insider
Commit: 3caebff
Date: 2021-06-24T05:14:29.975Z
Electron: 12.0.12
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Darwin x64 19.6.0 - OS Version: macOS Catalina 10.15.7
Steps to Reproduce:
- Open a new workspace and make it untrusted by default. Then use «Manage workspace trust» to trust the workspace.
- Observe the extensions state in extensions view. Those extensions without declaring support for workspace trust are still grayed out. And those that are supposed to be activated in trusted workspace are not activated either.
workspace-trust.mov
This issue only exists in latest insider, but works in the stable VS Code.
lszomoru
added
the
bug
Issue identified by VS Code Team member as probable bug
label
Jun 24, 2021
This was referenced
Jun 24, 2021
fwiw I still have this issue (or at least the specific version of it reported in #127012) today, running what I believe should be a build with the fix:
Version: 1.58.0-insider (user setup)
Commit: 9056b400b527c562871093916081c3e6df2691dd
Date: 2021-07-03T07:56:10.923Z
Electron: 12.0.13
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.22000
[2021-07-04 11:24:36.867] [exthost] [error] ProxyResolver#resolveProxy Canceled: Canceled
at Object.i [as canceled] (c:UsersdavidAppDataLocalProgramsMicrosoft VS Code InsidersresourcesappoutvsworkbenchservicesextensionsnodeextensionHostProcess.js:5:1157)
at u._remoteCall (c:UsersdavidAppDataLocalProgramsMicrosoft VS Code InsidersresourcesappoutvsworkbenchservicesextensionsnodeextensionHostProcess.js:88:12817)
at Proxy._.<computed>.D.charCodeAt._.<computed> (c:UsersdavidAppDataLocalProgramsMicrosoft VS Code InsidersresourcesappoutvsworkbenchservicesextensionsnodeextensionHostProcess.js:88:9349)
at D.resolveProxy (c:UsersdavidAppDataLocalProgramsMicrosoft VS Code InsidersresourcesappoutvsworkbenchservicesextensionsnodeextensionHostProcess.js:88:36547)
at Object.resolveProxy (c:UsersdavidAppDataLocalProgramsMicrosoft VS Code InsidersresourcesappoutvsworkbenchservicesextensionsnodeextensionHostProcess.js:93:57068)
at useProxySettings (c:UsersdavidAppDataLocalProgramsMicrosoft VS Code Insidersresourcesappnode_modules.asarvscode-proxy-agentoutindex.js:159:16)
at c:UsersdavidAppDataLocalProgramsMicrosoft VS Code Insidersresourcesappnode_modules.asarvscode-proxy-agentoutindex.js:107:13
at c:UsersdavidAppDataLocalProgramsMicrosoft VS Code Insidersresourcesappnode_modules.asarvscode-proxy-agentoutindex.js:335:13
at processTicksAndRejections (internal/process/task_queues.js:93:5)
@dboreham, I am unable to reproduce the problem in the latest Insiders release.
Could you please share the steps that you are using when running into the issue? Thanks!
Hi, some testing reveals that the problem is only present in WSL2 and Container targets (it works ok against local Windows).
Reproduction:
- Create an empty directory in WSL2.
- Open a new VSCode window.
- Select «Open folder in WSL2».
- Pick the empty directory.
- Click to trust the folder.
- Install the «Scala Metala» VSCode extension.
- Observe that the extension is disabled for mysterious reasons.
This setup worked prior to a recent VSCode insiders update, so I am assuming we’re looking at a symptom of the same problem, although it’s also possible something specific to the Scala extensions is causing a different problem with similar symptoms. I don’t see anything terribly useful in the logs, just the same error pasted above.
Not working case (remote, WSL2):
Working (local, Windows):
Thanks @dboreham for the steps. I was able to reproduce the problem on my side, but I do not believe that this is necessarily related to workspace trust. I am able to reproduce the issue even after I have disable the workspace trust feature using the security.workspace.trust.enabled
setting.
If you hover over the warning icon for the Scala (Metals)
extension, it looks like the extension is disabled because it depends on an extension (Scala Syntax (official)
) that is currently being disabled. If you hover over the information icon for the Scala Syntax (official)
extension, it looks like the extension is disabled in WSL because it is already enabled locally. @sandy081, is there anything obvious that I am missing?
If you hover over the warning icon for the
Scala (Metals)
extension, it looks like the extension is disabled because it depends on an extension (Scala Syntax (official)
) that is currently being disabled. If you hover over the information icon for theScala Syntax (official)
extension, it looks like the extension is disabled in WSL because it is already enabled locally. @sandy081, is there anything obvious that I am missing?
I did some testing with non-insiders VSCode. What I see there is that initially the scala syntax extension is also in the «installed globally so disabled» state, however a popup appears saying something like «metals needs scala extension, would you like it downloaded?». Click yes, and after some gears turning it appears to be working. That popup never appears in the insiders case.
I’ll file a bug against the metals project…
however a popup appears saying something like «metals needs scala extension, would you like it downloaded?»
Can you please copy/paste this pop up?
however a popup appears saying something like «metals needs scala extension, would you like it downloaded?»
Can you please copy/paste this pop up?
This took a bit of work because you have to completely uninstall both extensions to get it back into the right state:
For clarity: I do not ever see this popup in VSCode Insiders, although that could be because the system isn’t in the correct state to prompt the popup. I will try to see if I can make it come up in Insiders by uninstalling extensions, re-starting..
I tried again to see if I could get the popup to show in VSCode insiders by uninstalling, restarting. No luck.
I also compared the logs between the Insiders and regular VSCode cases, and I didn’t see any significant difference there.
Log looks like this:
[2021-07-08 11:24:46.646] [remoteagent] [info] Installing extension: scalameta.metals
[2021-07-08 11:24:47.444] [remoteagent] [info] Installing extension: scala-lang.scala
[2021-07-08 11:24:47.478] [remoteagent] [info] Downloaded extension: scala-lang.scala /home/david/.vscode-server-insiders/data/CachedExtensionVSIXs/scala-lang.scala-0.5.3
[2021-07-08 11:24:47.503] [remoteagent] [info] Removed the extension from uninstalled list: scala-lang.scala
[2021-07-08 11:24:47.508] [remoteagent] [info] Extensions installed successfully: scala-lang.scala
[2021-07-08 11:24:47.542] [remoteagent] [info] Downloaded extension: scalameta.metals /home/david/.vscode-server-insiders/data/CachedExtensionVSIXs/scalameta.metals-1.10.6
[2021-07-08 11:24:47.565] [remoteagent] [info] Removed the extension from uninstalled list: scalameta.metals
[2021-07-08 11:24:47.570] [remoteagent] [info] Extensions installed successfully: scalameta.metals
This popup says that Scala (Metals)
extension got activated but it’s dependency Scala Syntax (official)
extension is not enabled. This is an error coming from VS Code and ideally VS Code should not be activating the extension when its dependencies are not there.
We enhanced VS Code recently to fix this error by not enabling the extension when its dependencies are not enabled — #122448. Thats why you do not see the prompt in insiders.
To know the root cause may I know why Scala Syntax (official)
extension is disabled? You can check it by hovering on the extension.
To know the root cause may I know why
Scala Syntax (official)
extension is disabled? You can check it by hovering on the extension.
Hover over only says that it is disabled, not why.
I have a theory as to why, testing it now…
I have a theory as to why, testing it now…
Nope, it wasn’t that. (I noticed another extension complain that it needed JDK11, while I had switched to JDK8 on WSL2 recently, but after reverting to JDK11 in WSL2 the scalametals extension problem remains).
Digging into this some more: it appears that VSCode disabling the scala-lang plugin for remote is expected behavior. That extension is defined as of kind UI: https://github.com/scala/vscode-scala-syntax/blob/99868aa9177f33b9bd7dce2ea0d1b25e37e6899c/package.json#L11
So the question is probably not why is scala-lang disabled, but why does VSCode think that it needs to be enabled remote as a dependency of scalametals?
Also btw I noticed that the problem has crept into non-insiders VSCode now. It updated, so perhaps that’s the reason, or perhaps there is a bad state causing the problem that wasn’t initially present when I first downloaded VSCode this morning.
Version: 1.58.0 (user setup)
Commit: 2d23c42a936db1c7b3b06f918cde29561cc47cd6
Date: 2021-07-08T06:54:55.083Z
Electron: 12.0.13
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.22000
Update: I found another computer that had working VSCode Insiders with working scalametals extension.
Using this system, by updating VSCode, I confirmed that something breaks scalametals between the following versions (first one works, second one does not):
Version: 1.57.0-insider (user setup)
Commit: b4c1bd0a9b03c749ea011b06c6d2676c8091a70c
Date: 2021-06-09T11:49:36.076Z
Electron: 12.0.9
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.22000
Version: 1.58.0-insider (user setup)
Commit: 2d23c42a936db1c7b3b06f918cde29561cc47cd6
Date: 2021-07-07T12:09:55.219Z
Electron: 12.0.13
Chrome: 89.0.4389.128
Node.js: 14.16.0
V8: 8.9.255.25-electron.0
OS: Windows_NT x64 10.0.22000
(btw I did not do anything other than allow VSCode to update — previously working scala projects stopped working after the update).
Isn’t the reason for the issue the fact the scala-syntax
is a UI extension so it is on the local machine and Metals works on the remote one? It seems they are on different «machines», so VS Code might not be detecting scala-syntax
on a remote machine, which is why it’s disabling Metals there.
So essentially, this a false negative caused by #122448 ?
Isn’t the reason for the issue the fact the
scala-syntax
is a UI extension so it is on the local machine and Metals works on the remote one? It seems they are on different «machines», so VS Code might not be detectingscala-syntax
on a remote machine, which is why it’s disabling Metals there.So essentially, this a false negative caused by #122448 ?
I wondered about that, and to test the theory went looking for other extensions that might follow the same pattern. I couldn’t find an example in my fairly large set of installed extensions where a remote plugin depends on a UI plugin, but I did find an example of a UI plugin «disabled» remote:
It displays with the same status as the scala-lang extension, but no other remote extension depends on it:
Conversely, I wondered about this pair of extensions which you’d think would be similarly afflicted:
But it appears the Haskell syntax extension is different vs Scala in that it is remote-only, and shows as disabled local:
Adding the remote extension behavior in my settings.json fixed the issue for me
"remote.extensionKind": { "scala-lang.scala": [ "workspace" ] }
It seems that the Haskell syntax extension doesn’t declare extensionKind
, so I would say that the theory holds. Remote workspace extensions should be allowed to depend on local UI ones.
This should most likely be fixed in VS Code, we can alternatively remove extensionKind
from Scala extension, but that would be a workaround.
Edit: Is there an issue for that?
The long, good fix is fine for me because I reverted to VSCode 1.57 for the time being.
Adding the remote extension behavior in my settings.json fixed the issue for me
"remote.extensionKind": { "scala-lang.scala": [ "workspace" ] }
Thanks, I’d seen that in the doc and wondered if it would help, but hadn’t tried it.
This was referenced
Jul 10, 2021
@dboreham and @tgodzik Thanks for the provided info. It seems there is a change in the behaviour and let’s discuss in the newly opened issue.
composer.json
"require": {
"php": "~7.4",
"ext-json": "*",
"yidas/yii2-composer-bower-skip": "~2.0.5",
"yiisoft/yii2": "~2",
"ext-zip": "*",
"yiisoft/yii2-queue": "^2.3",
"enqueue/amqp-lib": "^0.10.9"
},
Ошибка
www@ef0d8432969f:/var/www/service$ ./yii queue/listen -v
PHP Warning:
Sockets extension is not enabled in
/var/www/service/vendor/php-amqplib/php-amqplib/PhpAmqpLib/Helper/SocketConstants.php
on line 34
В докер файл есть
RUN docker-php-ext-install sockets
Использовал доку https://www.yiiframework.com/extension/yiisoft/yii…
When installing Magento 2.0.2 via composer getting this error:
I have installed php5-cli, php5-curl.
Содержание
- 20 Answers 20
- How to explain Composer’s error log?
- 1 Answer 1
- Errors
- Troubleshooting
- Вопрос №29722 от пользователя Алексей Видякин в уроке «Исполняемые файлы в пакетах», курс «PHP: Настройка окружения»
- 19 Answers 19
20 Answers 20
This solved my issues
or newer version (* = your php version )
Have tried for many times, the above answers don’t solve my quesiton, but this command helped me:
ubuntu users try this
this is work for php 7.2 but you can change this 7.2 to 5.2 and run this command it is work.
When I went to create a laravel project, I got this problem.
After googling, I got this solution.
I followed these steps:
Step 2: sudo apt-get install php7.2-intl
Step 3: sudo apt-get install php7.2-xsl
Step 4: sudo apt-get install php7.2-mbstring
this command would do the trick
After that, it is installing as it should.
Install according to your php-version.
since i have php7, I will do the following to list the php packages:
sudo apt-cache search php7-*
now to install packages run the following command with your desired package
UPDATE: Don’t forget to restart apache/
This was the fix for me when trying to install Laravel on a fresh WSL installation:
sudo apt-get install php7.2-gd
sudo apt-get install php7.2-intl
sudo apt-get install php7.2-xsl
sudo apt-get install php7.2-zip
On Ubuntu 16.04 php7 is now the default, so if you follow the top answers and are still having this issue, check your php version.
If your default php version is php7, but you followed an answer using php5 packages, you can use the following command to set the default version of php to php5.6:
Updated. For ubuntu users
The exact name of the extension depends on the repository from which you got PHP but look here. For example on CentOS:
I used below to fix issue
Gonna post this answer here after seeing some of the answers (including the accepted one) which claim to «do the trick». First, we need to identify the issue before fixing it.
the requested PHP extension gd is missing from your system.
As the above line clearly states, we need to install the extension php-gd.
Источник
How to explain Composer’s error log?
I did a lot of research on the web, but did not find a documentation of the composer error log. In the discussions I found, nobody had an explanation that was consistent with the error log. For example:
I know, what composer does and can resolve issues on my own, but I often have to consult packagist.org for this. Despite being quite (and unnecessarily) verbose, the composer log only gives me some hints. It does not really point out the concrete problems.
Does anyone know of a complete documentation or how to explain the reasoning behind the logs, maybe taking the above ones as an example?
1 Answer 1
Documentation of Composer can be found at getcomposer.org/doc, especially Troubleshooting section. Usually the dependency problems comes from misconfiguration of your composer.json and understanding Composer logs comes with experience or learning on trial and error. Documenting every possible errors out of hundreds can become quickly outdated. If you believe some specific error isn’t clear enough, you can always raise a new suggestion at the Composer’s GitHub page.
Errors
Here is a small guide explaining the common Composer’s errors:
Can only install one of: org/package[x.y.z, X.Y.Z].
If you see this messages, that could be the main cause of the dependency issue. It basically means that based on the Composer’s dependency calculation both of these versions are required, but only one major version can be installed (you cannot have both x.y.z and X.Y.Z, unless you split your configuration for different folders). To see why these packages are required, use the composer why / depends command and adjust the dependencies accordingly.
Installation request for org/package2 (locked at vX.Y.Z)
This message means that there was an installation request for org/package, however, it is locked at X.Y.Z. If the requested version is not compatible with the locked version (like a different major version), you cannot install both. This message often comes along with already mentioned «Can only install one» one. So, whenever you see «locked at», that means Composer reads your installed package version from the composer.lock file. To troubleshoot, you can use composer why / depends command to find why the package was requested and adjust the compatibility, otherwise, you may try to remove composer.lock file and start from scratch (ideally from the empty folder).
org/package1 vx.y.z conflicts with org/package2[vX.Y.Z].
conflict with your requirements or minimum-stability
This message means as it reads, so you should check the required version and/or your minimum-stability settings.
This can be caused by a package being marked as non-stable and your requirements being «stable only. See: But these conflict with your requirements or minimum-stability
For any other errors, check out the official Composer’s Troubleshooting page.
Troubleshooting
Here are more suggestions how to troubleshoot the Composer dependency issues in general:
To fully debug Composer’s dependency problem, you can:
Источник
Вопрос №29722 от пользователя Алексей Видякин в уроке «Исполняемые файлы в пакетах», курс «PHP: Настройка окружения»
Не могу установить опубликованный пакет глобально. Вот ошибка:
Сергей К., Да, по команде composer документация выводится. Попробую установить утилиту phploc получаю вывод:
(тут я сократил текст, т.к. он не многим отличается от первого спойлера)
Посмотрите топики с похожей проблемой тут и тут. Каким способом вы устанавливали composer?
Сергей К., Прошу прощения за задержку с ответом, но для решения проблемы я всё же поставил рядом ещё одну операционку, в ней я провожу эксперимент только по этой теме и ничего лишнего.
Способов установки composer было несколько. Установка с помощью официального руководства прошла безуспешно. Наверно потому что банально плохо владею английским, а перевод переводчиком мне дал абро катабру. Для меня во всяком случае перевод текста оказался связанным, но информативно бесполезен т.к. не точен. И те команды что я вводил понимал на 50% максимум. В итоге я получил тоже, что имею сейчас (ошибки см. выше)
Сергей К., Проблема решена.
Тогда я переключился на php, прогуглив проблему в этом ключе, как раз и пришёл к расширениям пакета, на которые я честно говоря внимания не заострял при установке composera (php-curl php-mbstring. ).
Алексей Видякин, Спасибо за публикацию! Ваш способ: sudo apt-get install php-xml помог мне справиться с такой же проблемой, с которой Вы столкнулись.
Источник
I newly install Dompdf in Laravel Project via Composer ( composer require barryvdh/laravel-dompdf ). After enter the Command Terminal Reply Following Errors.
How to Solve this Error
I already Installed GD using Following comment. sudo apt-get install php5-gd and also Apache Server Restarted. My Laravel Version is 5.3 and Ubuntu Version is 14.04
19 Answers 19
I have installed php7, I did the following to solve exactly the same error
If you are working in PHP version 5.* then you have to install
And if you are working in PHP version 7.* then you have to install
And if you are working in PHP version 7.2 then you have to install
Open your php.ini and uncomment this line:
It may not be enabled for php-cli, you can enable like this;
I guess, you are using ppa:ondrej php package (5.6), which is confusing you with default ubuntu 14.04 php package (5.5.9).
To install php 5.6 gd library from ppa:ondrej, you should use:
PHP 7.4.2 (cli) (built: Feb 5 2020 16:50:21) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.2, Copyright (c), by Zend Technologies
if you are working in PHP version 7.2 then you have to install
Before installing the missing dependency, you need to check which version of PHP is installed on your system.
In this case it’s php7.2. apt search php7.2 returns all the available PHP extensions.
You can now proceed to installing the missing dependency by running:
sudo apt install php7.2-gd
For php-8, just locate your php.ini file and uncomment the line extension=gd
Below is a picture guide for those using Xampp and Windows
Step 1: Open php.ini or locate it in your machine (C:/xampp/php/php.ini)
Step 2: Uncomment the line extension=gd by removing the semicolon
Step 3: Save your file and restart your services
Источник
Thanks to Remi Collet for clearing up the confusion between installing PHP extensions for single PHP installations and multiple version PHP installations.
In this case, on AlmaLinux 8 (Centos 8 compatible) system, with a single PHP installation, logged in as root
user.
First verify single PHP installalation:
> locate bin/php
/usr/bin/php
/usr/bin/php-cgi
/usr/bin/phpize
/usr/sbin/php-fpm
Indeed, a single PHP installation.
For additional troubleshooting, determine the location of the PHP extension modules and configuration files. Searching /etc/php.ini
reveals:
;;;;
; Note: packaged extension modules are now loaded via the .ini files
; found in the directory /etc/php.d; these are loaded by default.
;;;;
Notice PHP is looking in /etc/php.d
for an extension module configuration file. Attempt to list the extension module and it’s configuration file:
> ls -la /usr/lib64/php/modules/ | grep dom.so
> ls -la /etc/php.d/ | grep dom.ini
Is there a config file in the /etc/php.d
directory? If so, read it to see what directory PHP is looking for the extension in, and compare that to /usr/lib64/php/modules/dom.so
.
If there is no config file for that extension in /etc/php.d
that’s why PHP is not loading the extension.
There are two options if you have a version specific extension loaded, 1) (not recommended) is to move the config file to the /etc/php.d
directory and make sure it points to the module location, or, 2) (recommended) is to remove the previous extension installation and use the proper repository and package to install it.
To properly install a PHP extension module for single PHP installation…
…start by listing the system’s current repo status (in pertinent part):
> dnf repolist all
repo id repo name status
apprepo apprepo enabled
appstream AlmaLinux 8 - AppStream enabled
baseos AlmaLinux 8 - BaseOS enabled
epel Extra Packages for Enterprise Linux 8 - x86_64 enabled
extras AlmaLinux 8 - Extras enabled
powertools AlmaLinux 8 - PowerTools enabled
remi Remi's RPM repository for Enterprise Linux 8 - x86_64 disabled
remi-safe Safe Remi's RPM repository for Enterprise Linux 8 - x86_64 enabled
Is PowerTools enabled? (AlmaLinux 8 comes with powertools installed.)
powertools AlmaLinux 8 - PowerTools enabled
…yes. However, if not enabled:
> dnf config-manager --set-enabled powertools
Is epel
repo installed and enabled? In this case yes, but if not:
> dnf install epel-release
Is remi
repo installed and enabled? In this case yes, but if not:
> dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
> dnf config-manager --set-enabled remi
Now simply:
> dnf install php-dom
> systemctl restart nginx
> systemctl restart php-fpm
And verify:
> php -m | grep dom
dom