Cocoapods: Errno::ENOENT - No such file or directory @ rb_sysopen

Created on 8 Oct 2019  Â·  18Comments  Â·  Source: CocoaPods/CocoaPods

Report

What did you do?

Run pod repo update on an Azure DevOps agent

What did you expect to happen?

Update all pod dependencies correctly

What happened instead?

Error

Errno::ENOENT - No such file or directory @ rb_sysopen - /Users/vsts/.cocoapods/repos/Spec_Lock
/usr/local/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.1/lib/cocoapods/sources_manager.rb:118:in `initialize'
/usr/local/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.1/lib/cocoapods/sources_manager.rb:118:in `open'
/usr/local/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.1/lib/cocoapods/sources_manager.rb:118:in `update'
/usr/local/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.1/lib/cocoapods/command/repo/update.rb:23:in `run'
/usr/local/lib/ruby/gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/usr/local/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.1/lib/cocoapods/command.rb:52:in `run'
/usr/local/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.1/bin/pod:55:in `<top (required)>'
/usr/local/lib/ruby/gems/2.6.0/bin/pod:23:in `load'
/usr/local/lib/ruby/gems/2.6.0/bin/pod:23:in `<main>'

CocoaPods Environment

Stack

   CocoaPods : 1.8.1
        Ruby : ruby 2.6.4p104 (2019-08-28 revision 67798) [x86_64-darwin18]
    RubyGems : 3.0.3
        Host : Mac OS X 10.14.6 (18G103)
       Xcode : 10.3 (10G8)
         Git : git version 2.23.0
Ruby lib dir : /usr/local/Cellar/ruby/2.6.4_2/lib
Repositories : 

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.4.1
cocoapods-try         : 1.1.0

Most helpful comment

You can also do pod install --repo-update once and it should do it together.

All 18 comments

Seems like a duplicate of https://github.com/CocoaPods/CocoaPods/issues/9216.

Please upload clear instructions on how you got the issue. I am going to close as duplicate but https://github.com/CocoaPods/CocoaPods/issues/9216 is _still_ open and we need instructions on how to reproduce.

@dnkoutso How do you figure this is a duplicate? The errors are different.

The error here is:

Errno::ENOENT - No such file or directory @ rb_sysopen - /Users/vsts/.cocoapods/repos/Spec_Lock

The error in #9216 is also:

No such file or directory ~/.cocoapods/repos/Spec_Lock

Do you have concrete steps to get this error? i.e Were on CocoaPods 1.7.x and you upgraded? What does the Podfile look like? What is in your pod repo list?

I need clear information so I can reproduce this and fix it.

I'm also on an azure devops agent. Getting the same error. I tried both cocoapods versions 1.8.1 and 1.8.0

$ pod repo list

0 repos

EDIT: this is before trying to run pod repo update

What is the output of ls ~/.cocoapods/repos ?

ls: /Users/vsts/.cocoapods/repos: No such file or directory
cocoapods was installed with sudo gem install cocoapods -v 1.8.0 if that helps.

I guess you had no repo's before. I think I see the issue now. Basically on a clean install of CocoaPods 1.8.x we need to invoke at least one pod install for the repos dir to be created.

Ah okay. So the reason I'm doing pod repo update is that some of my pods don't get installed if I don't. Is this a good workaround:

$ pod install
$ pod repo update
$ pod install

You can also do pod install --repo-update once and it should do it together.

Solid. I'll try that.

This works

great. Will try to fix the issue for 1.8.3.

@Towerism Im having the same problem with azure pipelines I've tried the fix

pod install --repo-update

on the directory where i have my config.xml but I get.

No 'Podfile' found in the directory

This is my first time using a mac agent. could you tell at what level did you excecute the command?

my config:
CocoaPods : 1.8.1
Ruby : ruby 2.6.4p104 (2019-08-28 revision 67798) [x86_64-darwin18]
RubyGems : 3.0.3
Host : Mac OS X 10.14.6 (18G103)
Xcode : 10.3 (10G8)
Git : git version 2.23.0
Ruby lib dir : /usr/local/Cellar/ruby/2.6.4_2/lib

Plugins

```
cocoapods-deintegrate : 1.0.4
cocoapods-plugins : 1.0.0
cocoapods-search : 1.0.0
cocoapods-stats : 1.1.0
cocoapods-trunk : 1.4.1
cocoapods-try : 1.1.0

error: Errno::ENOENT - No such file or directory @ rb_sysopen - /Users/vsts/.cocoapods/repos/Spec_Lock

The issue is fixed and will ship with 1.8.4.

@HectorGlez4 For me there is a Podfile in platforms/ios within the directory that contains my config.xml. That's where I would run pod install --repo-update

This makes all our CI builds fail on pod repo update, which is required for pod lib lint to pull the dependencies. Would anyone mind tagging 1.8.4 with the fix?

Was this page helpful?
0 / 5 - 0 ratings