pixz の configure に失敗する

# pixz の configure に失敗する

## libarchive　がない

```
./configure 
…

checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBARCHIVE... no
configure: error: Package requirements (libarchive) were not met:

No package 'libarchive' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LIBARCHIVE_CFLAGS
and LIBARCHIVE_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
```

いれてるんですけどねー。
どうやら`libarchive-devel`を入れないといけないようです。

```
[root@master pixz-1.0.6]# wget http://rpmfind.net/linux/centos/7.2.1511/os/x86_64/Packages/libarchive-devel-3.1.2-7.el7.x86_64.rpm
[root@master pixz-1.0.6]# rpm -ivh libarchive-devel-3.1.2-7.el7.x86_64.rpm
```

## liblzma がない

```
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBARCHIVE... yes
checking for LZMA... no
configure: error: Package requirements (liblzma) were not met:

No package 'liblzma' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables LZMA_CFLAGS
and LZMA_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
```

こっちは`xz-devel`に入ってるようです。

```
yum -y install xz-devel
```


そして、`./configure `

```
[root@master pixz-1.0.6]# ./configure --prefix=/usr/local/sbin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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 gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99
checking for src/pixz.1... yes
checking for ceil in -lm... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking if compiler needs -Werror to reject unknown flags... no
checking for the pthreads library -lpthreads... no
checking whether pthreads work without any flags... no
checking whether pthreads work with -Kthread... no
checking whether pthreads work with -kthread... no
checking for the pthreads library -llthread... no
checking whether pthreads work with -pthread... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking if more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for LIBARCHIVE... yes
checking for LZMA... yes
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for off_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking for working strtod... yes
checking for memchr... yes
checking for memmove... yes
checking for memset... yes
checking for strerror... yes
checking for strtol... yes
checking whether htole64 is declared... no
checking whether htole64 is declared... (cached) no
checking whether le64toh is declared... yes
checking whether le64toh is declared... (cached) yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating test/Makefile
config.status: creating config.h
config.status: executing depfiles commands
```

あとは`make`と`make install`をするだけ

```
[root@master pixz-1.0.6]# make
make  all-recursive
make[1]: ディレクトリ `/root/serch/pixz-1.0.6' に入ります
Making all in src
make[2]: ディレクトリ `/root/serch/pixz-1.0.6/src' に入ります
make[2]: `all' に対して行うべき事はありません.
make[2]: ディレクトリ `/root/serch/pixz-1.0.6/src' から出ます
Making all in test
make[2]: ディレクトリ `/root/serch/pixz-1.0.6/test' に入ります
make[2]: `all' に対して行うべき事はありません.
make[2]: ディレクトリ `/root/serch/pixz-1.0.6/test' から出ます
make[2]: ディレクトリ `/root/serch/pixz-1.0.6' に入ります
make[2]: ディレクトリ `/root/serch/pixz-1.0.6' から出ます
make[1]: ディレクトリ `/root/serch/pixz-1.0.6' から出ます
[root@master pixz-1.0.6]# make install
Making install in src
make[1]: ディレクトリ `/root/serch/pixz-1.0.6/src' に入ります
make[2]: ディレクトリ `/root/serch/pixz-1.0.6/src' に入ります
 /usr/bin/mkdir -p '/usr/local/bin'
  /usr/bin/install -c pixz '/usr/local/bin'
 /usr/bin/mkdir -p '/usr/local/share/man/man1'
 /usr/bin/install -c -m 644 pixz.1 '/usr/local/share/man/man1'
make[2]: ディレクトリ `/root/serch/pixz-1.0.6/src' から出ます
make[1]: ディレクトリ `/root/serch/pixz-1.0.6/src' から出ます
Making install in test
make[1]: ディレクトリ `/root/serch/pixz-1.0.6/test' に入ります
make[2]: ディレクトリ `/root/serch/pixz-1.0.6/test' に入ります
make[2]: `install-exec-am' に対して行うべき事はありません.
make[2]: `install-data-am' に対して行うべき事はありません.
make[2]: ディレクトリ `/root/serch/pixz-1.0.6/test' から出ます
make[1]: ディレクトリ `/root/serch/pixz-1.0.6/test' から出ます
make[1]: ディレクトリ `/root/serch/pixz-1.0.6' に入ります
make[2]: ディレクトリ `/root/serch/pixz-1.0.6' に入ります
make[2]: `install-exec-am' に対して行うべき事はありません.
make[2]: `install-data-am' に対して行うべき事はありません.
make[2]: ディレクトリ `/root/serch/pixz-1.0.6' から出ます
make[1]: ディレクトリ `/root/serch/pixz-1.0.6' から出ます
```