有人可以解釋以下內容嗎?
user@system:~/gexiv2-0.11.0/build$ exiv2 --version
exiv2 0.27.1
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the Free
Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301 USA
user@system:~/gexiv2-0.11.0/build$ meson --prefix=/usr ..
The Meson build system
Version: 0.49.0
Source dir: /home/user/gexiv2-0.11.0
Build dir: /home/user/gexiv2-0.11.0/build
Build type: native build
Project name: gexiv2
Project version: 0.11.0
Native C compiler: cc (gcc 8.3.0 "cc (Ubuntu 8.3.0-6ubuntu1) 8.3.0")
Native C++ compiler: c++ (gcc 8.3.0 "c++ (Ubuntu 8.3.0-6ubuntu1) 8.3.0")
Build machine cpu family: x86_64
Build machine cpu: x86_64
Found pkg-config: /usr/bin/pkg-config (0.29.1)
Found CMake: /usr/bin/cmake (3.13.4)
Dependency exiv2 found: NO (tried pkgconfig)
meson.build:13:0: ERROR: Dependency "exiv2" not found, tried pkgconfig
A full log can be found at /home/user/gexiv2-0.11.0/build/meson-logs/meson-log.txt
鑑於 Ubuntu 中一般不存在 exiv2 版本 0.27(它停止於v0.25)。
我做了以下事情:
- 我去了埃克斯維網站
- 我獲取了 exiv 0.27 的 linux 版本的鏈接
我運行了以下命令
wget https://www.exiv2.org/builds/exiv2-0.27.1-Linux64.tar.gz sudo tar xzf exiv2-0.27.1-Linux64.tar.gz -C /usr/local/lib/ sudo nano /etc/environment
添加
:/usr/local/lib/exiv2-0.27.1-Linux64/bin
source /etc/environment
- 重新啟動終端。
然後 exiv 就可以正確使用了。
但介子在建構過程中並沒有偵測到它的存在。
需要明確的是:套件 gexiv2 版本0.10.9為 Ubuntu 19.04 提供的版本至少不如我需要的 0.11.0 版本。
答案1
我發現出了什麼問題 - 您已經下載了 Exiv2 的二進位版本,但實際上您需要帶有相應標頭和開發文件的來源版本。
所以完整的步驟如下:
exiv2 部分
sudo apt-get install cmake meson
sudo apt-get build-dep exiv2
cd ~/Downloads
wget https://www.exiv2.org/builds/exiv2-0.27.1-Source.tar.gz
tar -xf exiv2-0.27.1-Source.tar.gz
cd exiv2-0.27.1-Source/
cmake .
make
sudo make install
查看:
$ exiv2 --version | head -n1 exiv2 0.27.1
gexiv2 部分
sudo apt-get build-dep libgexiv2-dev
cd ~/Downloads
wget http://ftp.gnome.org/pub/GNOME/sources/gexiv2/0.11/gexiv2-0.11.0.tar.xz
tar -xf gexiv2-0.11.0.tar.xz
cd gexiv2-0.11.0/
meson build
cd build
sudo meson install
等等。