pyexiv2修改图片exvif

1.安装pyexiv2
pip install pyexiv2
2.使用是出现

OSError: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.27' not found (required by /usr/local/lib/python3.5/dist-packages/pyexiv2/lib/libexiv2.so)

需要下载一个GLIBC_2.27
查看现有GLBC版本

strings  /lib/x86_64-linux-gnu/libc.so.6 | grep GLIBC_

版本升级 http://ftp.gnu.org/gnu/libc/下载对应的版本。
找到2.27的版本。下载完后,解压,进入目录,编译,安装:

 tar xzvf glibc-2.27.tar.gz
 cd glibc-2.27/
 ./configure
 
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for readelf... readelf
configure: error: you must configure in a separate build directory

系统给出了一个错误提示,说必须在另外一个独立的目录下执行configure命令。于是:

 mkdir build
cd build
~/glibc-2.27/build$ ../configure --prefix=/opt/glibc-2.27
或者
../configure -prefix=/usr -disable-profile -enable-add-ons -with-headers=/usr/include -with-binutils=/usr/bin

又给出了一个错误提示:

......
checking for gmsgfmt... no
checking for msgfmt... msgfmt
checking version of msgfmt... 0.18.1, ok
checking for makeinfo... no
checking for sed... sed
checking version of sed... 4.2.1, ok
checking for gawk... no
checking for nm... nm
configure: error: 
*** These critical programs are missing or too old: gawk
*** Check the INSTALL file for required versions.

查找 http://ftp.gnu.org/gnu/gawk/选择合适的版本,我选的是4.1
下载完后,解压,进入目录,编译,安装:

 tar xvzf gawk-4.1.4.tar.gz
 cd gawk-4.1.4/
~/gawk-4.1.4$ ./configure
~/gawk-4.1.4$ make
~/gawk-4.1.4$ sudo make install

路顺畅,等待安装完毕之后。再回到glibc的目录下,重新执行configure的命令。这下成功了。然后顺序执行make和make install,直到全部完成。

./configure 出现问题(根据查阅博客多说没有出现这种问题)

LD_LIBRARY_PATH shouldn't contain the current directory when building glibc. Please change the environment variable and run configure again.

是因为 LD_LIBRARY_PATH不能包含当前目录,请修改环境变量并重新执行configure
解决方法:

[root@localhost opt]# echo $LD_LIBRARY_PATH
:/usr/local/lib
[root@localhost opt]# export LD_LIBRARY_PATH=
[root@localhost opt]# echo $LD_LIBRARY_PATH
 
[root@localhost opt]# ./glibc-2.14/configure 

然后

…/configure --disable-sanity-checks
make
sudo make install

然后将 原来的 libm.so.6 ln 到这个 so 上

/lib64/libm.so.6 最好先备份一下再link。

sudo rm /lib64/libm.so.6
sudo ln -s $HOME/download/glibc-2.27/build/math/libm.so.6  /lib64/libm.so.6

另一片有价值的博客:
https://blog.csdn.net/ardenwang/article/details/9860821

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值