최신 Wireshark를 설치하는 것은 불가능합니까?

최신 Wireshark를 설치하는 것은 불가능합니까?

Redhat 6에 최신 버전의 Wireshark를 설치하는 것은 거의 불가능한 것처럼 보입니다. 웹을 광범위하게 검색했는데 누군가가 문제가 해결되었다고 말하는 곳을 찾을 수 없습니다. 내가 하는 일에 대해서는 걱정하지 마세요. 내가 시도한 것은 다음과 같습니다.

yum install wireshark   <-- works but version too old
yum localinstall xxx    <-- works only with an rc2 of v10 and gives error
./configure             <-- "Need a working C++ compiler to build Wireshark with Qt"

첫 번째 방법은 버전이 너무 오래되었고 필요한 ipv6 옵션이 없기 때문에 더 이상 사용되지 않습니다.

두 번째 방법은 설치되어 실제로 작동하는 것처럼 보이지만 실행하면 라이브러리 누락에 대한 오류가 발생합니다. 출시후보 설치에 대한 고민도 되네요. 비릴리스 후보 rpm을 사용해 보면 설치하려고 할 때 라이브러리가 누락되었다는 오류가 발생합니다.

마지막 방법에서는 qt에 대한 오류가 발생했지만 qt 4.6이 설치되었습니다.

실제로 이런 일을 해본 사람이 있나요? v1.10 이상이 필요합니다.

EDIT: Qt libs installed:
yum list installed | grep qt
qt.x86_64                            1:4.6.2-28.el6_5                  @base    
qt-devel.x86_64                      1:4.6.2-28.el6_5                  @base    
qt-sqlite.x86_64                     1:4.6.2-28.el6_5                  @base    
qt-x11.x86_64                        1:4.6.2-28.el6_5                  @base    

편집: 이것은 ./configure의 출력입니다.

checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '0' is supported by ustar format... yes
checking whether GID '0' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
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 for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking dependency style of g++... none
checking how to run the C preprocessor... gcc -E
checking if gcc is Clang... no
checking if g++ is Clang... no
checking how to print strings... printf
checking for a sed that does not truncate output... /bin/sed
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for fgrep... /bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
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 for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for shl_load... no
checking for shl_load in -ldld... no
checking for dlopen... no
checking for dlopen in -ldl... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... yes
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking whether g++ is a C++ compiler... no
checking for perl... /usr/bin/perl
checking for python... /usr/bin/python
checking whether /usr/bin/python is Python 2.5 or later... yes
checking for bison... bison -y
checking for bison... /usr/bin/bison
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... none needed
checking whether yytext is a pointer... no
checking for flex... /usr/bin/flex
checking for pod2man... /usr/bin/pod2man
checking for pod2html... /usr/bin/pod2html
checking for xdg-open... no
checking for htmlview... no
checking for doxygen... no
checking for doxygen... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... 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 LIBGNUTLS... no
GnuTLS >= 3.1.10 not found 
checking for LIBGNUTLS... no
GnuTLS >= 1.2.0, < 3.0 not found 
GnuTLS with compatible license not found, disabling SSL decryption
checking for libgcrypt-config... no
checking for LIBGCRYPT - version >= 1.1.92... no
libgcrypt not found, disabling ipsec decryption
checking whether to use libnl for various network interface purposes... yes
checking for LIBNL3... no
checking for LIBNL2... no
checking for LIBNL1... no
checking if nl80211.h is new enough... yes
checking for NL80211_SET_CHANNEL... yes
checking for libsmi >= 2... not found
checking for a2x... no
checking for a2x... no
checking for elinks... no
checking for elinks... no
checking for fop... no
checking for fop... no
checking for lynx... /usr/bin/lynx
checking for lynx... yes
checking for w3m... no
checking for w3m... no
checking for xmllint... /usr/bin/xmllint
checking for xmllint... yes
checking for xsltproc... no
checking for xsltproc... no
checking for desktop-file-install... no
checking for pkgproto... no
checking for pkgmk... no
checking for pkgtrans... no
checking for rpm... yes
checking to see if we can redefine _topdir... yes
checking for dpkg-buildpackage... no
checking for xcodebuild... no
checking for hdiutil... no
checking for bless... no
checking whether the compiler fails when given an unknown warning option... yes
checking whether the compiler fails when given an warning option not supported for C++... yes
checking whether we can add -Wall -W to CFLAGS... yes
checking whether we can add -Wall -W to CXXFLAGS... no
./configure: line 22271: test: ) expected, found -W
checking whether we can add -Wextra to CFLAGS... yes
checking whether we can add -Wextra to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -Wdeclaration-after-statement to CFLAGS... yes
checking whether we can add -Wendif-labels to CFLAGS... yes
checking whether we can add -Wendif-labels to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -Wpointer-arith to CFLAGS... yes
checking whether we can add -Wpointer-arith to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -Wno-pointer-sign to CFLAGS... yes
checking whether we can add -Warray-bounds to CFLAGS... yes
checking whether we can add -Warray-bounds to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -Wformat-security to CFLAGS... yes
checking whether we can add -Wformat-security to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -fwrapv to CFLAGS... yes
checking whether we can add -fwrapv to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -fno-strict-overflow to CFLAGS... yes
checking whether we can add -fno-strict-overflow to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -fno-delete-null-pointer-checks to CFLAGS... yes
checking whether we can add -fno-delete-null-pointer-checks to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -Wold-style-definition to CFLAGS... yes
checking whether we can add -Wshorten-64-to-32 to CFLAGS... no
checking whether we can add -Wstrict-prototypes to CFLAGS... yes
checking whether we can add -Wjump-misses-init to CFLAGS... no
checking whether we can add -Wvla to CFLAGS... yes
checking whether we can add -Wvla to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -Waddress to CFLAGS... yes
checking whether we can add -Waddress to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -Wattributes to CFLAGS... yes
checking whether we can add -Wattributes to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -Wdiv-by-zero to CFLAGS... yes
checking whether we can add -Wdiv-by-zero to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -Wignored-qualifiers to CFLAGS... yes
checking whether we can add -Wignored-qualifiers to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -Wpragmas to CFLAGS... yes
checking whether we can add -Wpragmas to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -Wno-overlength-strings to CFLAGS... yes
checking whether we can add -Wno-overlength-strings to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -Wwrite-strings to CFLAGS... yes
checking whether we can add -Wwrite-strings to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -Wno-long-long to CFLAGS... yes
checking whether we can add -Wno-long-long to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -Wc++-compat to CFLAGS... yes
checking whether we can add -Wheader-guard to CFLAGS... no
checking whether we can add -Wheader-guard to CXXFLAGS... no
checking whether we can add -Wshadow to CFLAGS... yes
checking whether -Wshadow warns about variables in function declarations shadowing other variables... no
checking whether we can add -Wlogical-op to CFLAGS... yes
checking whether -Wlogical-op generates warnings from strchr()... yes
checking whether we can add -fexcess-precision=fast to CFLAGS... no
checking whether we can add -fexcess-precision=fast to CXXFLAGS... no
checking whether we can add -fvisibility=hidden to CFLAGS... yes
checking whether we can add -fvisibility=hidden to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -Wl,--as-needed to LDFLAGS... yes
checking whether we can add -fPIE to CFLAGS... yes
checking whether we can add -fPIE to CXXFLAGS... no
configure: WARNING: gcc and  appear to be a mismatched pair
checking whether we can add -fPIE -pie to LDFLAGS... yes
checking whether -D_FORTIFY_SOURCE=... can be used (without generating a warning)... yes
checking whether we should treat compiler warnings as errors... no
checking for platform-specific compiler flags... none needed
checking for platform-specific linker flags... none needed
checking whether make supports nested variables... (cached) yes
checking whether to use /usr/local for headers and libraries... yes
checking for sed... (cached) /bin/sed
checking for GNU sed as first sed in PATH... yes
checking if profile builds must be generated... no
configure: error: Need a working C++ compiler to build Wireshark with Qt

저는 gcc, bison, flex, qt4-devel 및 libstdc++에 yum 설치를 완료했습니다.

답변1

솔루션을 수정하고 CentOS에서만 컴파일할 수 있었습니다. 제가 들어가면 그런 것 같아요냠 설치 gcc.x86_64, g++ 라이브러리는 포함되지 않습니다. 일단 추가하면냠 설치 gcc-c++.x86_64, 효율적인. gcc-c++패키지가 설치되었는지 확인하는 메시지가 표시됩니다 .

답변2

좋습니다. tshark를 컴파일하기 위해 실행한 명령의 전체 목록은 다음과 같습니다. 이는 CentOS 6.5 및 Wireshark 1.12.4용입니다. 저는 명령줄만 사용하고 있으므로 이것이 GUI를 컴파일할지 확실하지 않습니다. 이는 업데이트가 설치되지 않은 새로운 CentOS 6.5 VM을 사용하여 수행되었으므로 모든 요구 사항을 충족할 수 있기를 바랍니다. 이제 쉬워보이네요 :-)

Click "Source Code" under "Stable Release" here:
https://www.wireshark.org/download.html

ftp the file to your CentOS 6 machine

yum install -y gcc-c++ bison flex gtk2 gtk2-devel libpcap-devel

tar -xvf wireshark-1.12.4.tar.bz2
cd wireshark-1.12.4

./configure --with-gtk2
make
make install

This should show 1.12.4:
tshark -v

기존 시스템의 경우 먼저 Wireshark를 지우려면 yum을 실행하는 것이 좋습니다.

나중에 문제를 일으키지 않고 설치된 패키지를 제거할 수 있는 것으로 보입니다: yum Freeze -y gcc-c++ bison flex gtk2 gtk2-devel libpcap-devel

저는 Linux 전문가가 아니므로 이 답변에 대한 개선을 환영합니다.

답변3

gcc-c++를 설치하여 이 문제를 해결했습니다. dnf install gcc-c++-x86_64-linux-gnu-6.1.1-2.fc25.x86_64

답변4

이 명령을 실행하세요.

yum install wireshark wireshark-gnome

관련 정보