Imagerインストール時のエラー
WSL2のUbuntu 20.04でImagerをインストールしようとすると「could not find native static library webp」と言われる。 code:shell
% cargo install imager
Updating crates.io index
Downloaded imager v0.3.2
Downloaded 1 crate (37.0 KB) in 5.51s
Installing imager v0.3.2
(snip)
Compiling vmaf-sys v0.0.10
error: could not find native static library webp, perhaps an -L flag is missing?
error: aborting due to previous error
error: could not compile webp-dev.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: failed to compile imager v0.3.2, intermediate artifacts can be found at /tmp/cargo-install44fIb5
Caused by:
build failed
apt search webpでそれっぽいのを探してlibwebp-devを入れてみる。
code:shell
% sudo apt install libwebp-dev
sudo password for kitaitimakoto: Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
libwebp-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 267 kB of archives.
After this operation, 928 kB of additional disk space will be used.
Fetched 267 kB in 2s (111 kB/s)
Selecting previously unselected package libwebp-dev:amd64.
(Reading database ... 167580 files and directories currently installed.)
Preparing to unpack .../libwebp-dev_0.6.1-2_amd64.deb ...
Unpacking libwebp-dev:amd64 (0.6.1-2) ...
Setting up libwebp-dev:amd64 (0.6.1-2) ...
% cargo install imager
変わらない……
ビルド時にパスが通ってればいいんだよね?
code:shell
% dpkg -L libwebp-dev
/.
/usr
/usr/include
/usr/include/webp
/usr/include/webp/decode.h
/usr/include/webp/demux.h
/usr/include/webp/encode.h
/usr/include/webp/mux.h
/usr/include/webp/mux_types.h
/usr/include/webp/types.h
/usr/lib
/usr/lib/x86_64-linux-gnu
/usr/lib/x86_64-linux-gnu/libwebp.a
/usr/lib/x86_64-linux-gnu/libwebpdemux.a
/usr/lib/x86_64-linux-gnu/libwebpmux.a
/usr/lib/x86_64-linux-gnu/pkgconfig
/usr/lib/x86_64-linux-gnu/pkgconfig/libwebp.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/libwebpdemux.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/libwebpmux.pc
/usr/share
/usr/share/doc
/usr/share/doc/libwebp-dev
/usr/share/doc/libwebp-dev/AUTHORS
/usr/share/doc/libwebp-dev/NEWS.gz
/usr/share/doc/libwebp-dev/PATENTS
/usr/share/doc/libwebp-dev/README.gz
/usr/share/doc/libwebp-dev/copyright
/usr/lib/x86_64-linux-gnu/libwebp.so
/usr/lib/x86_64-linux-gnu/libwebpdemux.so
/usr/lib/x86_64-linux-gnu/libwebpmux.so
/usr/share/doc/libwebp-dev/changelog.Debian.gz
code:shell
% LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/x86_64-linux-gnu cargo build
Compiling webp-dev v0.4.1 (/home/kitaitimakoto/src/github.com/imager-io/webp-dev-rs)
error: could not find native static library webp, perhaps an -L flag is missing?
error: aborting due to previous error
error: could not compile webp-dev.
見てないか。
code:build.rs
("webp", "./src/libwebp.a"),
("webpdemux", "./src/demux/libwebpdemux.a"),
];
だめポイ