Package installation and removal: add Add packages to WORLD and commit changes del Remove packages from WORLD and commit changes
System maintenance: fix Fix, reinstall or upgrade packages without modifying WORLD update Update repository indexes upgrade Install upgrades available from repositories cache Manage the local package cache
Querying package information: info Give detailed information about packages or repositories list List packages matching a pattern or other criteria dot Render dependencies as graphviz graphs policy Show repository policy for packages search Search for packages by name or description
Repository maintenance: index Create repository index file from packages fetch Download packages from global repositories to a local directory manifest Show checksums of package contents verify Verify package integrity and signature
Miscellaneous: audit Audit system for changes stats Show statistics about repositories and installations version Compare package versions or perform tests on version strings
This apk has coffee making abilities. For more information: man 8 apk /usr/local/bin # apk add ^C /usr/local/bin # apk^C /usr/local/bin # locate libpcap /bin/sh: locate: not found /usr/local/bin # apk add libpcap libpcap-dev fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz (1/3) Installing libpcap (1.10.0-r0) (2/3) Installing pkgconf (1.7.4-r0) (3/3) Installing libpcap-dev (1.10.0-r0) Executing busybox-1.33.1-r8.trigger OK: 7 MiB in 17 packages /usr/local/bin # locate libpcap /bin/sh: locate: not found /usr/local/bin # cd /usr/lib64/ /bin/sh: cd: can't cd to /usr/lib64/: No such file or directory /usr/local/bin # ls -S /usr/lib64/libpcap.so /usr/lib64/libpcap.so.0.8 /usr/local/bin # apk info -a libpcap libpcap-1.10.0-r0 description: A system-independent interface for user-level packet capture
/usr/local/bin # ls unix-flora-gopacket-service /usr/local/bin # apk info musl busybox alpine-baselayout alpine-keys libcrypto1.1 libssl1.1 ca-certificates-bundle libretls ssl_client zlib apk-tools scanelf musl-utils libc-utils libpcap pkgconf libpcap-dev /usr/local/bin # ls unix-flora-gopacket-service /usr/local/bin # ./unix-flora-gopacket-service Error loading shared library libpcap.so.0.8: No such file or directory (needed by ./unix-flora-gopacket-service) Error relocating ./unix-flora-gopacket-service: pcap_list_tstamp_types: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_promisc: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_tstamp_type_name_to_val: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_findalldevs: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_sendpacket: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_close: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_tstamp_precision: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_list_datalinks: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_open_live: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_setdirection: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_geterr: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_fopen_offline_with_tstamp_precision: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_statustostr: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_buffer_size: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_compile: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_get_selectable_fd: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_next_ex: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_timeout: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_immediate_mode: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_freealldevs: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_stats: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_snaplen: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_lookupnet: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_datalink: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_free_datalinks: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_create: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_tstamp_type_val_to_name: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_datalink: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_offline_filter: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_activate: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_setfilter: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_tstamp_type: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_datalink_val_to_name: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_free_tstamp_types: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_open_dead: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_setnonblock: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_freecode: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_can_set_rfmon: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_datalink_name_to_val: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_snapshot: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_datalink_val_to_description: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_get_tstamp_precision: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_lib_version: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_rfmon: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_open_offline_with_tstamp_precision: symbol not found /usr/local/bin # locate /bin/sh: locate: not found /usr/local/bin # apk add locate ERROR: unable to select packages: locate (no such package): required by: world[locate] /usr/local/bin # cd /usr /usr # ls bin include lib local sbin share /usr # cd lib /usr/lib # ls engines-1.1 libpcap.so libpkgconf.so.3 libtls.so.2 pkgconfig libcrypto.so.1.1 libpcap.so.1 libpkgconf.so.3.0.0 libtls.so.2.0.3 libpcap.a libpcap.so.1.10.0 libssl.so.1.1 modules-load.d /usr/lib # ls|grep libpcap libpcap.a libpcap.so libpcap.so.1 libpcap.so.1.10.0 /usr/lib # ls -S /usr/lib64/libpcap.so /usr/lib64/libpcap.so.0.8 ls: /usr/lib64/libpcap.so: No such file or directory ls: /usr/lib64/libpcap.so.0.8: No such file or directory /usr/lib # ln -S /usr/lib64/libpcap.so /usr/lib64/libpcap.so.0.8 ln: /usr/lib64/libpcap.so.0.8: No such file or directory /usr/lib # l -S /usr/lib64/libpcap.so /usr/lib64/libpcap.so.0.8 /bin/sh: l: not found /usr/lib # ln -S /usr/lib64/libpcap.so /usr/lib64/libpcap.so.0.8 ln: /usr/lib64/libpcap.so.0.8: No such file or directory /usr/lib # ls engines-1.1 libpcap.so libpkgconf.so.3 libtls.so.2 pkgconfig libcrypto.so.1.1 libpcap.so.1 libpkgconf.so.3.0.0 libtls.so.2.0.3 libpcap.a libpcap.so.1.10.0 libssl.so.1.1 modules-load.d /usr/lib # touch libpcap.so.0.8 /usr/lib # ln -S /usr/lib64/libpcap.so /usr/lib64/libpcap.so.0.8 ln: /usr/lib64/libpcap.so.0.8: No such file or directory /usr/lib # ls engines-1.1 libpcap.so libpcap.so.1.10.0 libssl.so.1.1 modules-load.d libcrypto.so.1.1 libpcap.so.0.8 libpkgconf.so.3 libtls.so.2 pkgconfig libpcap.a libpcap.so.1 libpkgconf.so.3.0.0 libtls.so.2.0.3 /usr/lib # rm libpcap.so.0.8 /usr/lib # ls engines-1.1 libpcap.so libpkgconf.so.3 libtls.so.2 pkgconfig libcrypto.so.1.1 libpcap.so.1 libpkgconf.so.3.0.0 libtls.so.2.0.3 libpcap.a libpcap.so.1.10.0 libssl.so.1.1 modules-load.d /usr/lib # ls engines-1.1 libpcap.so libpkgconf.so.3 libtls.so.2 pkgconfig libcrypto.so.1.1 libpcap.so.1 libpkgconf.so.3.0.0 libtls.so.2.0.3 libpcap.a libpcap.so.1.10.0 libssl.so.1.1 modules-load.d /usr/lib # cd .. /usr # ls bin include lib local sbin share /usr # cd lib/ /usr/lib # ls -S /usr/lib/libpcap.so /usr/lib/libpcap.so.0.8 ls: /usr/lib/libpcap.so.0.8: No such file or directory /usr/lib/libpcap.so /usr/lib # ln -S /usr/lib/libpcap.so /usr/lib/libpcap.so.0.8 ln: /usr/lib/libpcap.so.0.8: No such file or directory /usr/lib # touch libpcap.so.0.8 /usr/lib # ln -S /usr/lib/libpcap.so /usr/lib/libpcap.so.0.8 ln: libpcap.so.0.8: File exists /usr/lib # touch libpcap.so.0.8^C /usr/lib # cd - /usr /usr # ls bin include lib local sbin share /usr # cd /usr/local/bin /usr/local/bin # ls unix-flora-gopacket-service /usr/local/bin # ./unix-flora-gopacket-service Error loading shared library libpcap.so.0.8: Exec format error (needed by ./unix-flora-gopacket-service) Error relocating ./unix-flora-gopacket-service: pcap_list_tstamp_types: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_promisc: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_tstamp_type_name_to_val: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_findalldevs: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_sendpacket: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_close: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_tstamp_precision: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_list_datalinks: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_open_live: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_setdirection: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_geterr: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_fopen_offline_with_tstamp_precision: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_statustostr: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_buffer_size: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_compile: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_get_selectable_fd: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_next_ex: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_timeout: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_immediate_mode: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_freealldevs: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_stats: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_snaplen: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_lookupnet: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_datalink: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_free_datalinks: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_create: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_tstamp_type_val_to_name: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_datalink: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_offline_filter: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_activate: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_setfilter: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_tstamp_type: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_datalink_val_to_name: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_free_tstamp_types: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_open_dead: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_setnonblock: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_freecode: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_can_set_rfmon: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_datalink_name_to_val: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_snapshot: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_datalink_val_to_description: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_get_tstamp_precision: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_lib_version: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_set_rfmon: symbol not found Error relocating ./unix-flora-gopacket-service: pcap_open_offline_with_tstamp_precision: symbol not found /usr/local/bin # cd /usr/lib/ /usr/lib # ls engines-1.1 libpcap.so libpcap.so.1.10.0 libssl.so.1.1 modules-load.d libcrypto.so.1.1 libpcap.so.0.8 libpkgconf.so.3 libtls.so.2 pkgconfig libpcap.a libpcap.so.1 libpkgconf.so.3.0.0 libtls.so.2.0.3 /usr/lib # ls|grep lib libcrypto.so.1.1 libpcap.a libpcap.so libpcap.so.0.8 libpcap.so.1 libpcap.so.1.10.0 libpkgconf.so.3 libpkgconf.so.3.0.0 libssl.so.1.1 libtls.so.2 libtls.so.2.0.3 /usr/lib # ls -l total 796 drwxr-xr-x 2 root root 4096 Jul 19 21:06 engines-1.1 lrwxrwxrwx 1 root root 26 Jul 19 21:06 libcrypto.so.1.1 -> ../../lib/libcrypto.so.1.1 -rw-r--r-- 1 root root 413414 Jan 4 2021 libpcap.a lrwxrwxrwx 1 root root 12 Aug 5 07:29 libpcap.so -> libpcap.so.1 -rw-r--r-- 1 root root 0 Aug 5 07:42 libpcap.so.0.8 lrwxrwxrwx 1 root root 17 Aug 5 07:29 libpcap.so.1 -> libpcap.so.1.10.0 -rwxr-xr-x 1 root root 247824 Jan 4 2021 libpcap.so.1.10.0 lrwxrwxrwx 1 root root 19 Aug 5 07:29 libpkgconf.so.3 -> libpkgconf.so.3.0.0 -rwxr-xr-x 1 root root 64544 Mar 18 2021 libpkgconf.so.3.0.0 lrwxrwxrwx 1 root root 23 Jul 19 21:06 libssl.so.1.1 -> ../../lib/libssl.so.1.1 lrwxrwxrwx 1 root root 15 Jul 19 21:06 libtls.so.2 -> libtls.so.2.0.3 -rwxr-xr-x 1 root root 71416 Mar 24 15:38 libtls.so.2.0.3 drwxr-xr-x 2 root root 4096 Jul 19 21:06 modules-load.d drwxr-xr-x 2 root root 4096 Aug 5 07:29 pkgconfig /usr/lib # ln -s libpcap.so.1.10.0 libpcap.so.0.8 ln: libpcap.so.0.8: File exists /usr/lib # rm libpcap.so.0.8 /usr/lib # ln -s libpcap.so.1.10.0 libpcap.so.0.8 /usr/lib # cd /usr/local/bin /usr/local/bin # ./unix-flora-gopacket-service panic: load config file error: open config.yml: no such file or directory
RUN apt-get update && echo "y" | apt-get upgrade RUN echo "y" | apt-get install libpcap-dev WORKDIR /usr/src/app
# RUN apt-get install libpcap-dev
# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading them in subsequent builds if they change COPY go.mod go.sum ./ RUN go mod download && go mod verify
CGO_ENABLED=1 GOOS=linux go build # runtime/cgo linux_syscall.c:67:13: error: implicit declaration of function 'setresgid' is invalid in C99 [-Werror,-Wimplicit-function-declaration] linux_syscall.c:67:13: note: did you mean 'setregid'? /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/unistd.h:593:6: note: 'setregid' declared here linux_syscall.c:73:13: error: implicit declaration of function 'setresuid' is invalid in C99 [-Werror,-Wimplicit-function-declaration] linux_syscall.c:73:13: note: did you mean 'setreuid'? /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/include/unistd.h:595:6: note: 'setreuid' declared here