shaqian / react-native-ssh-sftp

SSH/SFTP client for React Native
https://www.npmjs.com/package/react-native-ssh-sftp
MIT License
62 stars 52 forks source link

Pod install erro #19

Open ThanhQuang1410 opened 4 years ago

ThanhQuang1410 commented 4 years ago

HI. I am using React Native 0.63.2 and trying to implement your library. When I reached to Pod install path I got this error. Can you have a look into it. Thanks

` [!] The 'Pods-vhomes_v2' target has libraries with conflicting names: libssl.a and libcrypto.a.

Aborting run An unexpected error was encountered. Please report it as a bug: Error: [!] use_native_modules! skipped the react-native dependency 'react-native-ssh-sftp'. No podspec file was found.

at CocoaPodsPackageManager._installAsync (/Users/creative/.npm/_npx/43767/lib/node_modules/pod-install/build/index.js:2:81979)
at process._tickCallback (internal/process/next_tick.js:68:7)

`

CodingByJerez commented 4 years ago

Hello, I have the exact same error, did you find a solution?

Bredansky commented 4 years ago

Same error.

miuel commented 4 years ago

Hello, same error, when I did pod install

Aborting run An unexpected error was encountered. Please report it as a bug: Error at CocoaPodsPackageManager._installAsync (/Users/maikol/.npm/_npx/9068/lib/node_modules/pod-install/build/index.js:2:75999) at process._tickCallback (internal/process/next_tick.js:68:7)

before that I had to re-install cocoapods from brew...

Anyone found a solution ? thanks.

Bredansky commented 4 years ago

Actually, it happens because of conflicting libraries OpenSSL (provided by React Native by default starting from 0.62 version to support Flipper, If I understand correctly) and NMSHH from react-native-ssh-sftp. They use dependent libraries with the same name.

You can just create a React Native project with an older version. 0.61 as an option.

Also, I have tried to rebuild NMSSH manually to get rid off the repeating libraries, but it was not successful. So, unfortunately, there is no way to run current react-native-ssh-sftp on the latest React Native project right now.

Bredansky commented 4 years ago

Okay, I found out you can build a project on a 0.63 version of RN commenting out the Flipper part in Podfile.

target 'rnssh' do
  pod 'NMSSH', '2.2.8'
  config = use_native_modules!

  use_react_native!(:path => config["reactNativePath"])

  target 'rnsshTests' do
    inherit! :complete
    # Pods for testing
  end

  # Enables Flipper.
  #
  # Note that if you have use_frameworks! enabled, Flipper will not work and
  # you should disable these next few lines.
  # use_flipper!
  # post_install do |installer|
  #   flipper_post_install(installer)
  # end
end

target 'rnssh-tvOS' do
  # Pods for rnssh-tvOS

  target 'rnssh-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end
end