当前位置:   article > 正文

mac上编译openssl及使用protobuf遇到问题及解决_configure: error: package requirements (protobuf >

configure: error: package requirements (protobuf >= 2.6.0) were not met:

mac上安装软件可以通过brew install安装

编译openssl报错找不到malloc.h

解决方法:将报错文件中
#include <malloc.h>
修改为
#include <sys/malloc.h>
  • 1
  • 2
  • 3
  • 4

The pkg-config script could not be found or is too old”

brew install pkg-config
  • 1

configure: error: Package requirements (protobuf >= 2.6.0) were not met:
No package ‘protobuf’ found

brew install protobuf
  • 1

aclocal-1.13: command not found

brew install automake autoconf libtool
autoreconf -ivf
  • 1
  • 2

找不不到gcc、python

安装Command Line Toos,必须安装对应系统的版本
  • 1

编译动态库

gcc -dynamiclib -o libxxx.dylib
  • 1

查看执行文件或库依赖

otool -L libxxx.dylib
  • 1

安装python的protobuf

wget https://github.com/google/protobuf/releases/download/v3.6.0/protobuf-python-3.6.0.tar.gz
tar zxvf protobuf-python-3.6.0.tar.gz
cd protobuf-3.6.0
./configure
make
make check
make install
cd ./python
python setup.py build
python setup.py test
python setup.py install

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
声明:本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号