Can't install with composer - composer-php

There seems to be an issue with the certificate of https://repo.packagist.org/packages.json. Even when I try to open it in a browser it shouts a certificate error.
Therefore I can't install any package and I'm getting this error:
The "https://repo.packagist.org/packages.json" file could not be downloaded: Peer certificate CN='packagist.org' did not match expected CN='repo.packagist.org' . Is there any workaround?
I'm on a fresh MacOS Mojave. It's been a few years since I was setting up composer on a mac for myself so in case this is really basic, sorry :)
Thank you for advices.

Seems it was just a temporary error with packagist. Murphy's laws ensured it was exactly when I was trying to install packages.
It works now without any issue.

Related

pip install psd-tools3 => FileNotFoundError: [Errno 2] No such file or directory

I was trying to install Ursina but I was having trouble getting all the required packages I needed to run my code properly. Come to find out, there's a package that refuses to install called 'psd-tools3' that won't install, no matter what I do.
I've been using cmd commands like 'pip install psd-tools3' and 'pip3 install psd-tools3' but no other commands work (i.e. 'sudo pip install psd-tools3' doesn't work because my PC doesn't know what 'sudo' means and doesn't run). I've tried installing required packages for this package, but nothing works. It just keeps giving me this error:
enter image description here
I would really appreciate the help with this problem. All I can really assume is that the Python file '_version' hasn't been created and that's what's throwing the whole program off. If there is a way to add this manually and then install it, I would appreciate steps to do that as well.
I was running this on a Lenovo Thinkpad (Windows 10) on Python 3.10 (I also have Python 3.8.3 but that was installed with the 3.10) and I made sure all packages and pip are up-to-date. Still having this problem and I don't know why.
Seems to me like the issue is on the side of the maintainers of psd-tools3.
For example, looking at the content of the latest source distribution on PyPI, we can see that it does not contain any _version.py file.
This needs to be solved by the project's maintainers, but they do not have a ticket tracker. On the other hand there seems to be an "Author" email address on the project's PyPI page as well as in the project's setup.py script.
A solution might be to clone the project's source code repository (with git), and try to install from the local clone.
Just simply try
pip install psd-tools3==1.9.0
Or
pip install psd-tools3==1.8.2
This should work on your pc as well. I was having same issue, and then I tried this It worked for me

On macOS Monterey 12.5, how can I allow Conda to collect package metadata from <https://repo.anaconda.com/pkgs/main/osx-64/current_repodata.json>?

I am on a MacBook M1 Pro, macOS Monterey 12.5, using conda 4.13.0 in zsh(z-shell) to attempt package installations.
(My goal is to install tensorflow-deps from the apple channel of Anaconda, so I can use GPU-accelerated TensorFlow on my M1 Pro. As far as I understand, Conda is the only way to install apple's tensorflow-deps package.)
Problem
Whenever I try to install packages with Anaconda (conda) in the terminal, I get:
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/osx-64/current_repodata.json>
Note that I managed to successfully access this resource with this command:
curl https://repo.anaconda.com/pkgs/main/osx-64/current_repodata.json
So it seems like it's just the Conda tool that is failing.
The issue has been marked as stale in GitHub, and has not been solved.
Similar issues have been addressed before and solved, but since those solutions are not working, I am assuming that my issue is somehow different, and thus I am creating a new question to nuance the discussion.
Attempted solutions
I have tried everything from the discussion of the GitHub issue, and more.
I have to download and convert my root certificate, and then:
export REQUESTS_CA_BUNDLE=/path/to/root/certificate.pem
as outlined here, but that does not fix the issue.
I have tried replacing
~/opt/anaconda3/lib/python3.9/site-packages/certifi/cacert.pem
with the same generated cert, which did not work.
Doing conda update -n base -c defaults conda as suggested in the GitHub issue shows the same CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/osx-arm64/repodata.json> error.
Some users report that using the -k/--insecure flag or configuring Conda to not verify ssl fixes this issue. This is not really a solution in the first place, and also it does not work for me.
Some Windows users report that copying come DLLs around fixes the issue, but I don't know what the equivalent of this would be on Mac, if there is one.

Installing pyodbc and unixodbc on a mac

I've seen Pypyodbc: Can't open lib 'FreeTDS' : file not found") error when trying to connect to SQL server, but. that's 7 years old, and doesn't seem to be working for me, possibly because brew appears to be putting things in different places now?
I've used brew to install unixodbc, it's in /opt/homebrew/Cellar.
When I do pip install pyodbc, it appears to work, but I get:
connection = pyodbc.connect(connection_string)
pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib '/usr/local/lib/libtdsodbc.so' : file not found (0) (SQLDriverConnect)")
which is obviously wrong, because libtdsodbc is in /opt/homebrew/lib
I tried editing odbcinst.ini, but I'm not sure where that's supposed to live. There wasn't one in /etc, or a /etc/unixODBC directory... and when I create either one, the don't seem to be read, because it still complains about /usr/local/lib...
ETA: This is on a new Macbook, so on one of the new M1 chips.
Note: This is a BAD answer in the hopes of attracting a good one, but it technically seems to be working.
Homebrew for M1 installs everything in /opt/homebrew. Everything else expects things in /usr/local. On a new computer, /usr/local/lib didn't even exist. So I did
sudo ln -s /opt/homebrew/lib /usr/local/lib
THIS IS VERY BAD AND I KNOW IT But it's the only way I've figured out currently to deal with the problem. Maybe something hasn't caught up to M1? I'm not sure.
BETTER solution:
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/opt/homebrew/lib
There is a pull request that has been pretty much ignored for 13 months now by the pyodbc maintainer: https://github.com/mkleehammer/pyodbc/pull/870
You can install the forked version with this command (might need to uninstall the previous version or add extra arguments to force reinstall)
python3 -m pip install git+git://github.com/Aloisius/pyodbc.git#m1-homebrew

Problems with Cocoapods on Xcode 6.4

I'm trying to install and use Cocoapods with Xcode. I've installed already Brew, so I've used this command:
sudo gem install cocoapods
but it stays there, without response and without asking me for password (that's really strange, because of sudo command).
Maybe I got some problem with Brew Installation or Ruby on my Yosemite iMac?
I met the same error in the past, there is something wrong with my development environment. I re-install the Command Line Tools follow this guide, then everything is ok.
You can get the detail information from here, hope it can help you.

Problems installing v8 on OS X (seems like an SVN issue of some sort?)

Simple brew install v8 command is giving me the following results.
Warning: Your Xcode (5.0.2) is outdated
Please update to Xcode 5.1.
Xcode can be updated from the App Store.
==> Downloading https://github.com/v8/v8/archive/3.21.17.tar.gz
Already downloaded: /Library/Caches/Homebrew/v8-3.21.17.tar.gz
==> Checking out http://gyp.googlecode.com/svn/trunk
svn: E175002: Unable to connect to a repository at URL 'http://gyp.googlecode.com/svn/trunk'
svn: E175002: OPTIONS of 'http://gyp.googlecode.com/svn/trunk': Could not read status line: connection was closed by server (http://gyp.googlecode.com)
Error: Failed to download resource "v8--gyp"
Failure while executing: svn checkout -q --force http://gyp.googlecode.com/svn/trunk /Library/Caches/Homebrew/v8--gyp--svn -r 1685
Unable to decipher the problem here. Any information at this point would really help.
Found this! Seems to be an issue with AnyConnect.
https://apple.stackexchange.com/questions/113717/svn-cant-co-source-code
I ran sudo /opt/cisco/anyconnect/bin/websecurity_uninstall.sh and voila
I've got the same probleme, but I found another solution.
Simply reinstalling svn :
brew install svn
Removing old version :
rm /usr/local/bin/svnversion
Recreate link :
brew link subversion
And then install v8
brew install v8
I got yet another solution: my xcode installation was brand new and I never accepted the terms and conditions. Just try to execute $ svn and the terms and conditions of xcode will prompt

Resources