whi*_*ngs 4 tar make software-installation images
如何在 Linux Mint 17 上安装 BPG(更好的便携式图形)?我从Fabrice Bellard 的网站下载了 tar.gz 文件。自述文件说,
编辑 Makefile 以更改编译选项(Linux 的默认编译选项应该没问题)。输入“make”进行编译,输入“make install”安装编译好的二进制文件。
我没有编辑Makefile
. 我在目录中打开终端并运行make
. 它返回以下错误:
gcc -g -Wl,--gc-sections -o bpgdec bpgdec.o libbpg.a -lpng -lrt -lm -lpthread
bpgdec.o: In function `png_save':
/home/ghort/Downloads/libbpg-0.9.5/bpgdec.c:118: undefined reference to
`png_set_longjmp_fn'
collect2: error: ld returned 1 exit status
make: *** [bpgdec] Error 1
Run Code Online (Sandbox Code Playgroud)
我想我在别处读到我需要安装 libpng16 实验性的,但我不确定。
libbpg
取决于 PNG 库的 1.6 版,您无法apt-get
在 Linux Mint 17 上安装该库。该库与源不兼容,libpng12
需要从源代码安装(我使用的是1.6.16版)
额外的复杂之处在于,如果你安装PNG 1.6make
的libbpg
仍然使用libpng12-dev
,即使你配置PNG 1.6用configure --prefix=/usr
。你不能只卸载libpng12-dev
的libsdl-image1.2-dev
,并libsdl1.2-dev
依赖于它,而那些需要编译libbpg
为好。
您也可以下载和编译libsdl-image
和libsdl1
源代码,而不是安装它们的-dev
包。我没有遵循这条路线,我只是暂时删除了文件(不是包),libpng12-dev
并在完成后重新安装(你应该能够在 Linux Mint 17 上复制和粘贴它):¹
# install dev packages needed
sudo apt-get install -y libsdl-image1.2-dev libsdl1.2-dev libjpeg8-dev
#### temporarily remove the files from the libpng12 package
# this gives error messages on the directories (that cannot be removed this
# way, which can be ignored.
sudo rm $(dpkg -L libpng12-dev)
# download, configure, make and make install PNG 1.6
wget -O libpng-1.6.16.tar.xz 'http://downloads.sourceforge.net/project/libpng/libpng16/1.6.16/libpng-1.6.16.tar.xz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Flibpng%2Ffiles%2Flibpng16%2F1.6.16%2F&ts=1424607004&use_mirror=garr'
tar xf libpng-1.6.16.tar.xz
pushd libpng-1.6.16
./configure --prefix=/usr
make -j
sudo make install
popd
# download, make and make install BPG
wget http://bellard.org/bpg/libbpg-0.9.5.tar.gz
tar xf libbpg-0.9.5.tar.gz
pushd libbpg-0.9.5
make -j
sudo make install
popd
# reinstall libpng12-dev
sudo apt-get install --reinstall libpng12-dev
Run Code Online (Sandbox Code Playgroud)
当然,并行安装 PNG 1.6libpng12-dev
并适应libbpg
.
¹您也可以尝试构建libpng16-dev,但安装它可能只会删除-dev
依赖于的软件包libpng12-dev
,我没有尝试过。
归档时间: |
|
查看次数: |
3741 次 |
最近记录: |