OpenSSL-Pod icon indicating copy to clipboard operation
OpenSSL-Pod copied to clipboard

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

Open silvansky opened this issue 6 years ago • 15 comments

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.

silvansky avatar Jun 09 '18 19:06 silvansky

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.

Mamong avatar Jun 14 '18 09:06 Mamong

I also see this issue when doing pod install.

wjmelements avatar Jun 20 '18 19:06 wjmelements

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.

mirokuratczyk avatar Jun 21 '18 21:06 mirokuratczyk

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.)

zeayal avatar Jul 14 '18 11:07 zeayal

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.

SantiPerti avatar Sep 26 '18 07:09 SantiPerti

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?

jmfriend avatar Feb 22 '19 10:02 jmfriend

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.

crontab avatar May 03 '19 09:05 crontab

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

polurezov8 avatar May 09 '19 17:05 polurezov8

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.

cobear25 avatar May 10 '19 17:05 cobear25

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'

anivaros avatar Jun 06 '19 12:06 anivaros

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

IMHitesh avatar Dec 12 '19 13:12 IMHitesh

Same problem exists with CocoaPods version 1.8.4

intonarumori avatar Jan 28 '20 12:01 intonarumori

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

thejeff77 avatar Mar 01 '20 13:03 thejeff77

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

anivaros avatar Mar 02 '20 08:03 anivaros

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

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

thejeff77 avatar Mar 03 '20 00:03 thejeff77