Cordova要求说明在安装时未安装CocoaPods

时间:2018-11-12 14:14:08

标签: ios macos cordova cocoapods

我同时使用推荐的方法$ sudo gem install cocoapods和带有--user-install标志的sudo-less方法安装了CocoaPods,但是无论哪种情况,当我运行$ sudo cordova要求时,我都会在下面得到相同的错误:

void constructRabbits (int anum) {
    for (int i = 0; i < anum; i++) {
       std::srand((unsigned)time(nullptr)); //seeding engine
       int age = std::rand() % 5;
       bool sex = std::rand() % 2;
       int is_vampire = std::rand() % 1000;

       Rabbit *rab = new Rabbit(age, sex, is0or1(is_vampire)); 
       myfarm.push_back(*rab);
       if (sex) { females++; }
       else { males++; }
       }
   }

在运行需求检查之前,我什至成功运行了CocoaPods设置。我还创建了一个.bash_profile,其中包含以下条目:

int main() {
constructRabbits(5);
for (farm_it = myfarm.begin(); farm_it != myfarm.end(); farm_it++) {
    std::cout << farm_it->getName() << ", " << farm_it->getAge() << "\n";

}
std::cout << males << ", " << females;}

O / S是macOS mojave 10.14.1

关于如何修复它的任何建议?

1 个答案:

答案 0 :(得分:0)

在终端中键入以下命令

  1. cd〜/ .cocoapods / repos

  2. git clone https://github.com/CocoaPods/Specs.git

这将在大多数情况下解决问题,请参阅: https://github.com/CocoaPods/CocoaPods/issues/5744