FredericJacobs / OpenSSL-Pod

Unmaintained - please fork. Email me to take over the CocoaPod
74 stars 112 forks source link

Error while installing pod: "cp: file.tgz: No such file or directory" #49

Open silvansky opened 6 years ago

silvansky commented 6 years ago

The following line fails with cp: file.tgz: No such file or directory https://github.com/FredericJacobs/OpenSSL-Pod/blob/23a8ee9ed539dba6310e8c57ce02a368fb4aeda9/1.0.210/OpenSSL.podspec#L26

So I can't install OpenSSL pod.

Mamong commented 6 years ago

cocoapods-downloader downloads the tgz to a temporary folder ,then exacts it and removes files to work folder. so pre command cannot find file.tgz. Code below will solve the problem. cp -rf "${BASEPATH}/" "${CURRENTPATH}/openssl-${VERSION}" cd "${CURRENTPATH}" cd "openssl-${VERSION}"

use OpenSSL-XM instead. please update your spec repo first.

wjmelements commented 6 years ago

I also see this issue when doing pod install.

mirokuratczyk commented 6 years ago

There seems to be an assumption in this Pod's .podspec about which directory CocoaPods will download the source files in that is broken by version 1.2.1 of cocoapods-downloader.

It seems that even using an older version of cocoapods (e.g.sudo gem install cocoapods -v 1.4.0) will cause the latest version of cocoapods-downloader to be installed (currently 1.2.1) which breaks the assumption made above.

Here is one possible solution: https://github.com/charlesmchen/OpenSSL-Pod/commit/69cd24d3fdbefc24804061314d070a8a36ba2d6f#diff-b144472b55e5ccbbff7c0971534cf8c3.

Otherwise, my strategy was to revert to the last version of cocoapods-downloader (1.2.0) that worked with this pod:

sudo gem uninstall cocoapods-downloader
sudo gem install cocoapods-downloader -v 1.2.0

This seems to work with cocoapods 1.4.0.

zeayal commented 6 years ago
step.1 
command line run :
$ sudo gem uninstall cocoapods-downloader
$ sudo gem install cocoapods-downloader -v 1.2.0

step.2 
waiting  for previous step completed ,command line run :
$ rm -rf /tmp/openssl

step.3
in you project folder run:
$ pod install

(Note: The installation time lasts about ten minutes.)
SantiPerti commented 6 years ago

In my case, I just had to uninstall previous Homebrew Cocoapods Installation: brew uninstall cocoapods reinstall ruby gem: sudo gem install cocoapods which installed Cocoapods v1.5.3, and that issue seems fixed for this version. pod install and everything installed correctly with the right dependencies, incuding OpenSSL.

jmfriend commented 5 years ago

This problem continues to occur with Cocoapods 1.6.0. However, it does not seem possible to use old version of cocoapods-downloader with Cocoapods 1.6.0. Thus workaround above no longer works. I have a third-party pod with a dependency on OpenSSl, so it's not possible to use OpenSSL-XM instead. Any suggestions?

crontab commented 5 years ago

The workaround is a bit more complex now: you need to downgrade Cocoapods back to 1.5.3, then cocoapods-downloader to 1.2.0. Then once you build OpenSSL, it looks like you can upgrade everything back to the latest. In the process you should probably do pod deintegrate, rm -rf /tmp/openssl before installing and running the older versions, to be sure.

polurezov8 commented 5 years ago

@crontab You are my hero! Thanks a lot! 👨🏼‍💻👍🏻

cobear25 commented 5 years ago

crontab's solution worked for me. So combining it with zeayal's suggestion seems to work.

sudo gem uninstall cocoapods-downloader sudo gem install cocoapods-downloader -v 1.2.0 sudo gem uninstall cocoapods sudo gem install cocoapods -v 1.5.3 pod deintegrate rm -rf /tmp/openssl

Then finally a pod install succeeds haha.

anivaros commented 5 years ago

This problem continues to occur with Cocoapods 1.6.0. However, it does not seem possible to use old version of cocoapods-downloader with Cocoapods 1.6.0. Thus workaround above no longer works. I have a third-party pod with a dependency on OpenSSl, so it's not possible to use OpenSSL-XM instead. Any suggestions?

Another workaround is use fixed version of same pod, I've found on GitHub: pod 'OpenSSL', :git => 'https://github.com/wzbozon/OpenSSL-Pod'

IMHitesh commented 4 years ago

I have the latest version of cocoapod and it's given below error.

The following line fails with cp: file.tgz: No such file or directory

techsupports-MacBook-Pro-2:~ hiteshsurani$ pod --version
1.8.4
intonarumori commented 4 years ago

Same problem exists with CocoaPods version 1.8.4

thejeff77 commented 4 years ago

Same problem exists with CocoaPods verion 1.9.0

@anivaros is this your repo?

Seems as if this is a serious issue for the repo - I.E. make it work with latest CocoaPods

anivaros commented 4 years ago

No, its not my repo. Just found workaround. For now I'm using this precompiled openssl framework: https://github.com/levigroker/GRKOpenSSLFramework

thejeff77 commented 4 years ago

Added in pull requests (fixes this issue) & mods for 1.1.1d in this fork:

https://github.com/thejeff77/OpenSSL-Pod