gpt4 book ai didi

xcode - 安装 OpenSSL Cocoapod 时遇到问题

转载 作者:行者123 更新时间:2023-12-04 15:29:54 31 4
gpt4 key购买 nike

我正在尝试在 Xcode 9.4 中安装 OpenSSL Cocoapod,我得到以下信息:

[!] /bin/bash -c set -e VERSION="1.0.2h" SDKVERSION=xcrun --sdk
iphoneos --show-sdk-version 2> /dev/null
MIN_SDK_VERSION_FLAG="-miphoneos-version-min=7.0"

BASEPATH="${PWD}" CURRENTPATH="/tmp/openssl" ARCHS="i386 x86_64 armv7 armv7s arm64" DEVELOPER=xcode-select -print-path

mkdir -p "${CURRENTPATH}" mkdir -p "${CURRENTPATH}/bin"

cp "file.tgz" "${CURRENTPATH}/file.tgz" cd "${CURRENTPATH}" tar -xzf file.tgz cd "openssl-${VERSION}"

for ARCH in ${ARCHS} do CONFIGURE_FOR="iphoneos-cross"

if [ "${ARCH}" == "i386" ] || [ "${ARCH}" == "x86_64" ] ; then PLATFORM="iPhoneSimulator" if [ "${ARCH}" == "x86_64" ] ; then CONFIGURE_FOR="darwin64-x86_64-cc" fi else sed -ie "s!static volatile sig_atomic_t intr_signal;!static volatile intr_signal;!" "crypto/ui/ui_openssl.c" PLATFORM="iPhoneOS" fi

export CROSS_TOP="${DEVELOPER}/Platforms/${PLATFORM}.platform/Developer"
export CROSS_SDK="${PLATFORM}${SDKVERSION}.sdk"

echo "Building openssl-${VERSION} for ${PLATFORM} ${SDKVERSION} ${ARCH}" echo "Please stand by..."

export CC="${DEVELOPER}/usr/bin/gcc -arch ${ARCH} ${MIN_SDK_VERSION_FLAG}" mkdir -p "${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk"
LOG="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/build-openssl-${VERSION}.log"

LIPO_LIBSSL="${LIPO_LIBSSL} ${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/lib/libssl.a" LIPO_LIBCRYPTO="${LIPO_LIBCRYPTO} ${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk/lib/libcrypto.a"

./Configure ${CONFIGURE_FOR} --openssldir="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" > "${LOG}" 2>&1 sed -ie "s!^CFLAG=!CFLAG=-isysroot ${CROSS_TOP}/SDKs/${CROSS_SDK} !" "Makefile"

make >> "${LOG}" 2>&1 make all install_sw >> "${LOG}" 2>&1 make clean >> "${LOG}" 2>&1 done

echo "Build library..." rm -rf "${BASEPATH}/lib/" mkdir -p "${BASEPATH}/lib/" lipo -create ${LIPO_LIBSSL} -output "${BASEPATH}/lib/libssl.a" lipo -create ${LIPO_LIBCRYPTO} -output "${BASEPATH}/lib/libcrypto.a"

echo "Copying headers..." rm -rf "${BASEPATH}/opensslIncludes/" mkdir -p "${BASEPATH}/opensslIncludes/" cp -RL "${CURRENTPATH}/openssl-${VERSION}/include/openssl" "${BASEPATH}/opensslIncludes/"

cd "${BASEPATH}" echo "Building done."

echo "Cleaning up..." rm -rf "${CURRENTPATH}" echo "Done."

cp: file.tgz: No such file or directory



这是我在 podfile 中使用的命令:
pod 'OpenSSL', '~> 1.0'

我已经尝试安装 Xcode 命令行工具,但这并没有解决问题。

任何人都知道问题是什么?

最佳答案

首先要做的事情是:如果可以,请尝试切换到不同的 POD。那个已经不维护了。

如果无法切换,解决方法:

curl https://www.openssl.org/source/openssl-<your-version>.tar.gz > file.tgz
cp file.tgz /tmp/openssl #create directory if needed
sed 's/cp \\"file.tgz\\" \\"${CURRENTPATH}\/file.tgz\\"//' `find ~/.cocoapods|grep "OpenSSL/<your-version>/OpenSSL.podspec.json"`
pod install

“<您的版本>”将是例如URL 为“1.0.2j”,grep 为“1.0.210”

关于xcode - 安装 OpenSSL Cocoapod 时遇到问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50780041/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com