MeetYouDevs / cocoapods-imy-bin

1.05k stars 245 forks source link

curl: (7) Failed to connect to 192.168.50.150 port 20480: Operation timed out #114

Open BlueSkyInwind opened 3 years ago

BlueSkyInwind commented 3 years ago

Installing FMDB (2.7.5) Installing LKDBHelper (2.5.7) Installing PodBinTest (1) Installing YYCache (1.0.4) Installing YYModel (1.0.4) /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader/cache.rb:114: warning: Using the last argument as keyword parameters is deprecated; maybe should be added to the call /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader/request.rb:61: warning: The called method `slug' is defined here /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader/cache.rb:100: warning: Using the last argument as keyword parameters is deprecated; maybe should be added to the call /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader/request.rb:61: warning: The called method `slug' is defined here

[!] Error installing FMDB

[!] Error installing YYModel [!] /usr/bin/curl -f -L -o /var/folders/0y/p7437fj55ggc4nflcw46x3tr0000gn/T/d20210127-46233-2ov2fk/file.zip http://192.168.50.150:20480/frameworks/YYModel/1.0.4/zip --create-dirs --netrc-optional --retry 2

% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed

curl: (7) Failed to connect to 192.168.50.150 port 20480: Operation timed out

[!] ====== cocoapods-imy-bin 0.3.1.3 版本 ========

[!] ====== dev 环境 ========

BlueSkyInwind commented 3 years ago

你好,我最近准备接入cocoapods-imy-bin ,但是在本地配置的demo工程时 一直提示 Failed to connect to 192.168.50.150 port 20480 的错误,请问能帮助看下这是怎么导致的吗?

y2kbug commented 3 years ago

cocoapods-imy-bin组件会默认添加两个私有cocoapods源git@github.com:su350380433/example_spec_source.git git@github.com:su350380433/example_spec_bin_dev.git, example_spec_bin_dev这个是二进制私有源,该源配置的默认二进制静态资源url是192.168.50.150: 20480, 你需要修改成你自己搭建的node.js静态资源地址,如果上面这些不明白的话,你可能需要去看看cocoapods原理。

miroda commented 3 years ago

你看下你的电脑是否用了代理

BlueSkyInwind commented 3 years ago

cocoapods-imy-bin组件会默认添加两个私有cocoapods源git@github.com:su350380433/example_spec_source.git git@github.com:su350380433/example_spec_bin_dev.git, example_spec_bin_dev这个是二进制私有源,该源配置的默认二进制静态资源url是192.168.50.150: 20480, 你需要修改成你自己搭建的node.js静态资源地址,如果上面这些不明白的话,你可能需要去看看cocoapods原理。

你好,下午的时候我找到了这个配置,所以现在我建立了自己的私有 repo ,解决了这个问题。pod bin auto --all-make 成功执行,但是在pod bin update 时 一直报错 如下:

Update all pods Updating local specs repositories /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/cdn_source.rb:342: warning: URI.escape is obsolete $ /usr/bin/git -C /Users/xin/.cocoapods/repos/master fetch origin --progress remote: Enumerating objects: 15, done. remote: Counting objects: 100% (15/15), done. remote: Compressing objects: 100% (8/8), done. remote: Total 9 (delta 6), reused 0 (delta 0), pack-reused 0 From https://github.com/CocoaPods/Specs 17103ca5d1df..5af607ac9702 master -> origin/master $ /usr/bin/git -C /Users/xin/.cocoapods/repos/master rev-parse --abbrev-ref HEAD master $ /usr/bin/git -C /Users/xin/.cocoapods/repos/master reset --hard origin/master HEAD is now at 5af607ac9702 [Add] Intercom 9.2.0 Analyzing dependencies Fetching podspec forYYCachefromhttps://github.com/ibireme/YYCache/raw/master/YYCache.podspec /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.3/lib/cocoapods/external_sources/podspec_source.rb:19: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open Fetching podspec forYYModelfromhttps://github.com/ibireme/YYModel/raw/master/YYModel.podspec` /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.3/lib/cocoapods/external_sources/podspec_source.rb:19: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open ====== cocoapods-imy-bin 0.3.1.3 版本 ========

====== dev 环境 ========

====== dev 环境 ======== /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/cdn_source.rb:342: warning: URI.escape is obsolete Downloading dependencies Installing FMDB (2.7.5) Installing LKDBHelper (2.5.7) Installing YYCache (1.0.4) Installing YYModel (1.0.4) /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader/cache.rb:114: warning: Using the last argument as keyword parameters is deprecated; maybe should be added to the call /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader/request.rb:61: warning: The called method `slug' is defined here /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader/cache.rb:100: warning: Using the last argument as keyword parameters is deprecated; maybe should be added to the call /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader/request.rb:61: warning: The called method `slug' is defined here

[!] Error installing YYCache

[!] Error installing LKDBHelper

[!] Error installing YYModel

[!] Error installing FMDB [!] /usr/bin/unzip /var/folders/0y/p7437fj55ggc4nflcw46x3tr0000gn/T/d20210127-55919-qtrrlp/file.zip -d /var/folders/0y/p7437fj55ggc4nflcw46x3tr0000gn/T/d20210127-55919-qtrrlp

Archive: /var/folders/0y/p7437fj55ggc4nflcw46x3tr0000gn/T/d20210127-55919-qtrrlp/file.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of /var/folders/0y/p7437fj55ggc4nflcw46x3tr0000gn/T/d20210127-55919-qtrrlp/file.zip or /var/folders/0y/p7437fj55ggc4nflcw46x3tr0000gn/T/d20210127-55919-qtrrlp/file.zip.zip, and cannot find /var/folders/0y/p7437fj55ggc4nflcw46x3tr0000gn/T/d20210127-55919-qtrrlp/file.zip.ZIP, period.`

BlueSkyInwind commented 3 years ago

cocoapods-imy-bin组件会默认添加两个私有cocoapods源git@github.com:su350380433/example_spec_source.git git@github.com:su350380433/example_spec_bin_dev.git, example_spec_bin_dev这个是二进制私有源,该源配置的默认二进制静态资源url是192.168.50.150: 20480, 你需要修改成你自己搭建的node.js静态资源地址,如果上面这些不明白的话,你可能需要去看看cocoapods原理。

你好,下午的时候我找到了这个配置,所以现在我建立了自己的私有 repo ,解决了这个问题。pod bin auto --all-make 成功执行,但是在pod bin update 时 一直报错 如下:

Update all pods Updating local specs repositories /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/cdn_source.rb:342: warning: URI.escape is obsolete $ /usr/bin/git -C /Users/xin/.cocoapods/repos/master fetch origin --progress remote: Enumerating objects: 15, done. remote: Counting objects: 100% (15/15), done. remote: Compressing objects: 100% (8/8), done. remote: Total 9 (delta 6), reused 0 (delta 0), pack-reused 0 From https://github.com/CocoaPods/Specs 17103ca5d1df..5af607ac9702 master -> origin/master $ /usr/bin/git -C /Users/xin/.cocoapods/repos/master rev-parse --abbrev-ref HEAD master $ /usr/bin/git -C /Users/xin/.cocoapods/repos/master reset --hard origin/master HEAD is now at 5af607ac9702 [Add] Intercom 9.2.0 Analyzing dependencies Fetching podspec forYYCachefromhttps://github.com/ibireme/YYCache/raw/master/YYCache.podspec` /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.3/lib/cocoapods/external_sources/podspec_source.rb:19: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open Fetching podspec for YYModel from https://github.com/ibireme/YYModel/raw/master/YYModel.podspec /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.3/lib/cocoapods/external_sources/podspec_source.rb:19: warning: calling URI.open via Kernel#open is deprecated, call URI.open directly or use URI#open ====== cocoapods-imy-bin 0.3.1.3 版本 ========

====== dev 环境 ========

====== dev 环境 ======== /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.9.3/lib/cocoapods-core/cdn_source.rb:342: warning: URI.escape is obsolete Downloading dependencies Installing FMDB (2.7.5) Installing LKDBHelper (2.5.7) Installing YYCache (1.0.4) Installing YYModel (1.0.4) /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader/cache.rb:114: warning: Using the last argument as keyword parameters is deprecated; maybe should be added to the call /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader/request.rb:61: warning: The called method `slug' is defined here /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader/cache.rb:100: warning: Using the last argument as keyword parameters is deprecated; maybe should be added to the call /Users/xin/.rvm/rubies/ruby-2.7.0/lib/ruby/gems/2.7.0/gems/cocoapods-1.9.3/lib/cocoapods/downloader/request.rb:61: warning: The called method `slug' is defined here

[!] Error installing YYCache

[!] Error installing LKDBHelper

[!] Error installing YYModel

[!] Error installing FMDB [!] /usr/bin/unzip /var/folders/0y/p7437fj55ggc4nflcw46x3tr0000gn/T/d20210127-55919-qtrrlp/file.zip -d /var/folders/0y/p7437fj55ggc4nflcw46x3tr0000gn/T/d20210127-55919-qtrrlp

Archive: /var/folders/0y/p7437fj55ggc4nflcw46x3tr0000gn/T/d20210127-55919-qtrrlp/file.zip End-of-central-directory signature not found. Either this file is not a zipfile, or it constitutes one disk of a multi-part archive. In the latter case the central directory and zipfile comment will be found on the last disk(s) of this archive. unzip: cannot find zipfile directory in one of /var/folders/0y/p7437fj55ggc4nflcw46x3tr0000gn/T/d20210127-55919-qtrrlp/file.zip or /var/folders/0y/p7437fj55ggc4nflcw46x3tr0000gn/T/d20210127-55919-qtrrlp/file.zip.zip, and cannot find /var/folders/0y/p7437fj55ggc4nflcw46x3tr0000gn/T/d20210127-55919-qtrrlp/file.zip.ZIP, period.`

这个问题也找到原因了 http://localhost:8080/frameworks/%s/%s.zip -> http://localhost:8080/frameworks/%s/%s/zip 就可以了,不给过为啥这个路径需要这么设置的呢 ?

miroda commented 3 years ago

%s是占位符,第一个是占位符是表示版本名称,第二个是版本号,这样可以请求接口获取到zip静态库,nodejs的接口是这样定义的

BlueSkyInwind commented 3 years ago

%s是占位符,第一个是占位符是表示版本名称,第二个是版本号,这样可以请求接口获取到zip静态库,nodejs的接口是这样定义的

哦,学到了...

BlueSkyInwind commented 3 years ago

配置通了以后,在尝试混编时,配置 swift 库 SnapKit.framework,编译时 报错如下:

Ld /Users/xin/Library/Developer/Xcode/DerivedData/PodBinTest-dosoexqsgavciratatrkeubcngsw/Build/Products/Debug-iphoneos/PodBinTest.app/PodBinTest normal (in target 'PodBinTest' from project 'PodBinTest') cd /Users/xin/Desktop/pod-bin-test/PodBinTest /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -target arm64-apple-ios13.0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.2.sdk -L/Users/xin/Library/Developer/Xcode/DerivedData/PodBinTest-dosoexqsgavciratatrkeubcngsw/Build/Products/Debug-iphoneos -L/Users/xin/Desktop/pod-bin-test/PodBinTest/Pods/AFNetworking/bin_AFNetworking_4.0.1 -L/Users/xin/Desktop/pod-bin-test/PodBinTest/Pods/FMDB/bin_FMDB_2.7.5 -L/Users/xin/Desktop/pod-bin-test/PodBinTest/Pods/LKDBHelper/bin_LKDBHelper_2.5.7 -L/Users/xin/Desktop/pod-bin-test/PodBinTest/Pods/YYCache/bin_YYCache_1.0.4 -L/Users/xin/Desktop/pod-bin-test/PodBinTest/Pods/YYModel/bin_YYModel_1.0.4 -F/Users/xin/Library/Developer/Xcode/DerivedData/PodBinTest-dosoexqsgavciratatrkeubcngsw/Build/Products/Debug-iphoneos -F/Users/xin/Desktop/pod-bin-test/PodBinTest/Pods/SnapKit -filelist /Users/xin/Library/Developer/Xcode/DerivedData/PodBinTest-dosoexqsgavciratatrkeubcngsw/Build/Intermediates.noindex/PodBinTest.build/Debug-iphoneos/PodBinTest.build/Objects-normal/arm64/PodBinTest.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -dead_strip -Xlinker -object_path_lto -Xlinker /Users/xin/Library/Developer/Xcode/DerivedData/PodBinTest-dosoexqsgavciratatrkeubcngsw/Build/Intermediates.noindex/PodBinTest.build/Debug-iphoneos/PodBinTest.build/Objects-normal/arm64/PodBinTest_lto.o -Xlinker -export_dynamic -Xlinker -no_deduplicate -fembed-bitcode-marker -fobjc-link-runtime -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphoneos -L/usr/lib/swift -Xlinker -add_ast_path -Xlinker /Users/xin/Library/Developer/Xcode/DerivedData/PodBinTest-dosoexqsgavciratatrkeubcngsw/Build/Intermediates.noindex/PodBinTest.build/Debug-iphoneos/PodBinTest.build/Objects-normal/arm64/PodBinTest.swiftmodule -ObjC -lAFNetworking -lFMDB -lLKDBHelper -lYYCache -lYYModel -lsqlite3 -framework CoreFoundation -framework Foundation -framework QuartzCore -framework SnapKit -framework UIKit -lPods-PodBinTest -Xlinker -no_adhoc_codesign -Xlinker -dependency_info -Xlinker /Users/xin/Library/Developer/Xcode/DerivedData/PodBinTest-dosoexqsgavciratatrkeubcngsw/Build/Intermediates.noindex/PodBinTest.build/Debug-iphoneos/PodBinTest.build/Objects-normal/arm64/PodBinTest_dependency_info.dat -o /Users/xin/Library/Developer/Xcode/DerivedData/PodBinTest-dosoexqsgavciratatrkeubcngsw/Build/Products/Debug-iphoneos/PodBinTest.app/PodBinTest ld: framework not found SnapKit clang: error: linker command failed with exit code 1 (use -v to see invocation)

dabing1022 commented 3 years ago

提供下Podspec、Podfile等配置

BlueSkyInwind commented 3 years ago

提供下Podspec、Podfile等配置

`Pod::Spec.new do |s| s.name = 'PodBinTest' s.version = '1' s.description = '我只是一个测试的,主要是想要 s.dependency' s.license = 'MIT' s.summary = 'Seeyou' s.homepage = 'https://github.com/meiyoudev/IMYPublic' s.authors = { 'suliangjin' => 'suliangjin@xiaoyouzi.com' } s.source = { :git => 'git@github.com:su350380433/cocaopods-imy-bin.git', :branch => 'dev' } s.requires_arc = true s.ios.deployment_target = '13.0' s.source_files = 'Source/*/.{h,m,swift,pch}'

s.public_header_files = 'Source/*/.h'

    s.dependency 'YYModel'
    s.dependency 'YYCache'
    s.dependency 'FMDB'
    s.dependency 'LKDBHelper'
    s.dependency 'AFNetworking'
    s.dependency 'SnapKit'

end`

podfile:

`source 'https://github.com/cocoapods/specs.git'

platform :ios, '13.0' use_frameworks!

命令写在这里也是等效, 已移动到Podfile_local中,避免git提交冲突等场景

plugin 'cocoapods-imy-bin' use_binaries!

target 'PodBinTest' do pod 'FMDB' pod 'LKDBHelper' pod 'AFNetworking' pod 'SnapKit' pod 'YYModel',:podspec => 'https://github.com/ibireme/YYModel/raw/master/YYModel.podspec' pod 'YYCache',:podspec => 'https://github.com/ibireme/YYCache/raw/master/YYCache.podspec' end`

BlueSkyInwind commented 3 years ago

提供下Podspec、Podfile等配置

hello, 目前我这边 被这个报错卡着 了,Podspec、Podfile 配置如上,麻烦帮忙看下 ,或者还需要其他什么信息?

wolimomomo commented 2 years ago

如果报错 删除这个目录下的所有文件 /用户名/.cocoapods/repos/example_spec_bin_dev ,然后重新提交下代码到git上, 再重新执行命令就好了

wolimomomo commented 2 years ago

配置文件在这个目录下 /用户名/.cocoapods/