I have tried to install linux headers but still showing the same error.
Here's the stack to process.
"pi@raspberrypi:~ $ sudo dpkg -i linux-headers-4.9.31-v7+_4.9.31-v7+-2_armhf.deb Selecting previously unselected package linux-headers-4.9.31-v7+.(Reading database ... 132946 files and directories currently installed.)Preparing to unpack linux-headers-4.9.31-v7+_4.9.31-v7+-2_armhf.deb ... Unpacking linux-headers-4.9.31-v7+ (4.9.31-v7+-2) ...dpkg: dependency problems prevent configuration of linux-headers-4.9.31-v7+:linux-headers-4.9.31-v7+ depends on bc; however:Package bc is not installed.dpkg: error processing package linux-headers-4.9.31-v7+ (--install):dependency problems - leaving unconfiguredErrors were encountered while processing:linux-headers-4.9.31-v7+pi@raspberrypi:~ $ lsmod | grep wireguardpi@raspberrypi:~ $ sudo apt-get install wireguard-dkms wireguard-toolsReading package lists... DoneBuilding dependency treeReading state information... Donewireguard-dkms is already the newest version (0.0.20170726-1).wireguard-tools is already the newest version (0.0.20170726-1).You might want to run 'apt --fix-broken install' to correct these.The following packages have unmet dependencies:linux-headers-4.9.31-v7+ : Depends: bc but it is not going to be installedE: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).pi@raspberrypi:~ $ sudo apt --fix-broken installReading package lists... DoneBuilding dependency treeReading state information... DoneCorrecting dependencies... DoneThe following additional packages will be installed:bcThe following NEW packages will be installed:bc0 upgraded, 1 newly installed, 0 to remove and 855 not upgraded.1 not fully installed or removed.Need to get 101 kB of archives.After this operation, 212 kB of additional disk space will be used.Do you want to continue? [Y/n] YWARNING: The following packages cannot be authenticated!bcInstall these packages without verification? [y/N] yGet:1 http://deb.debian.org/debian unstable/main armhf bc armhf 1.06.95-9+b3 [101 kB]Fetched 101 kB in 0s (226 kB/s)Selecting previously unselected package bc.(Reading database ... 148260 files and directories currently installed.)Preparing to unpack .../bc_1.06.95-9+b3_armhf.deb ...Unpacking bc (1.06.95-9+b3) ...Processing triggers for install-info (5.2.0.dfsg.1-6) ...Processing triggers for man-db (2.7.5-1~bpo8+1) ...Setting up bc (1.06.95-9+b3) ...Setting up linux-headers-4.9.31-v7+ (4.9.31-v7+-2) ...make: Entering directory '/usr/src/linux-headers-4.9.31-v7+' HOSTCC scripts/basic/fixdepHOSTCC scripts/basic/bin2cHOSTCC scripts/kconfig/conf.oHOSTCC scripts/kconfig/zconf.tab.oHOSTLD scripts/kconfig/conf*** Default configuration is based on 'bcm2709_defconfig'## configuration written to .config#make: Leaving directory '/usr/src/linux-headers-4.9.31-v7+' make: Entering directory '/usr/src/linux-headers-4.9.31-v7+' scripts/kconfig/conf --silentoldconfig KconfigCHK include/config/kernel.releaseUPD include/config/kernel.releaseWRAP arch/arm/include/generated/asm/bitsperlong.h WRAP arch/arm/include/generated/asm/clkdev.h WRAP arch/arm/include/generated/asm/cputime.h WRAP arch/arm/include/generated/asm/current.h WRAP arch/arm/include/generated/asm/early_ioremap.h WRAP arch/arm/include/generated/asm/emergency-restart.h WRAP arch/arm/include/generated/asm/errno.h WRAP arch/arm/include/generated/asm/exec.h WRAP arch/arm/include/generated/asm/ioctl.h WRAP arch/arm/include/generated/asm/ipcbuf.h WRAP arch/arm/include/generated/asm/irq_regs.h WRAP arch/arm/include/generated/asm/kdebug.h WRAP arch/arm/include/generated/asm/local.h WRAP arch/arm/include/generated/asm/local64.h WRAP arch/arm/include/generated/asm/mm-arch-hooks.h WRAP arch/arm/include/generated/asm/msgbuf.h WRAP arch/arm/include/generated/asm/msi.h WRAP arch/arm/include/generated/asm/param.h WRAP arch/arm/include/generated/asm/parport.h WRAP arch/arm/include/generated/asm/poll.h WRAP arch/arm/include/generated/asm/preempt.h WRAP arch/arm/include/generated/asm/resource.h WRAP arch/arm/include/generated/asm/rwsem.h WRAP arch/arm/include/generated/asm/seccomp.h WRAP arch/arm/include/generated/asm/segment.h WRAP arch/arm/include/generated/asm/sembuf.h WRAP arch/arm/include/generated/asm/serial.h WRAP arch/arm/include/generated/asm/shmbuf.h WRAP arch/arm/include/generated/asm/siginfo.h WRAP arch/arm/include/generated/asm/simd.h WRAP arch/arm/include/generated/asm/sizes.h WRAP arch/arm/include/generated/asm/socket.h WRAP arch/arm/include/generated/asm/sockios.h WRAP arch/arm/include/generated/asm/termbits.h WRAP arch/arm/include/generated/asm/termios.h WRAP arch/arm/include/generated/asm/timex.h WRAP arch/arm/include/generated/asm/trace_clock.h WRAP arch/arm/include/generated/asm/unaligned.h CHK include/generated/uapi/linux/version.h UPD include/generated/uapi/linux/version.h CHK include/generated/utsrelease.hUPD include/generated/utsrelease.hGEN include/generated/mach-types.hCC kernel/bounds.sCHK include/generated/bounds.hUPD include/generated/bounds.hCHK include/generated/timeconst.hUPD include/generated/timeconst.hCC arch/arm/kernel/asm-offsets.sCHK include/generated/asm-offsets.h UPD include/generated/asm-offsets.h CALL scripts/checksyscalls.shgrep: scripts/../arch/x86/entry/syscalls/syscall_32.tbl: No such file or directory HOSTCC scripts/dtc/dtc.oHOSTCC scripts/dtc/flattree.oHOSTCC scripts/dtc/fstree.oHOSTCC scripts/dtc/data.oHOSTCC scripts/dtc/livetree.oHOSTCC scripts/dtc/treesource.oHOSTCC scripts/dtc/srcpos.oHOSTCC scripts/dtc/checks.oHOSTCC scripts/dtc/util.oHOSTCC scripts/dtc/dtc-lexer.lex.oHOSTCC scripts/dtc/dtc-parser.tab.oHOSTLD scripts/dtc/dtcHOSTCC scripts/genksyms/genksyms.oHOSTCC scripts/genksyms/parse.tab.oSHIPPED scripts/genksyms/lex.lex.cHOSTCC scripts/genksyms/lex.lex.oHOSTLD scripts/genksyms/genksymsCC scripts/mod/empty.oHOSTCC scripts/mod/mk_elfconfigMKELF scripts/mod/elfconfig.hHOSTCC scripts/mod/modpost.oCC scripts/mod/devicetable-offsets.s GEN scripts/mod/devicetable-offsets.h HOSTCC scripts/mod/file2alias.oHOSTCC scripts/mod/sumversion.oHOSTLD scripts/mod/modpostHOSTCC scripts/kallsymsHOSTCC scripts/pnmtologoHOSTCC scripts/conmakehashHOSTCC scripts/recordmcountHOSTCC scripts/sortextablemake: Leaving directory '/usr/src/linux-headers-4.9.31-v7+' -------- Uninstall Beginning --------Module: wireguardVersion: 0.0.20170726-1Kernel: 4.9.35+ (armv7l)------------------------------------- Status: Before uninstall, this module version was ACTIVE on this kernel.wireguard.ko:- Uninstallation- Deleting from: /lib/modules/4.9.35+/kernel/net/ - Original module- No original module was found for this module on this kernel.- Use the dkms install command to reinstall any previous module version.depmod...DKMS: uninstall completed.-------- Uninstall Beginning --------Module: wireguardVersion: 0.0.20170726-1Kernel: 4.9.35-v7+ (armv7l)------------------------------------- Status: Before uninstall, this module version was ACTIVE on this kernel.wireguard.ko:- Uninstallation- Deleting from: /lib/modules/4.9.35-v7+/kernel/net/ - Original module- No original module was found for this module on this kernel.- Use the dkms install command to reinstall any previous module version.depmod...DKMS: uninstall completed.------------------------------Deleting module version: 0.0.20170726-1completely from the DKMS tree.------------------------------Done.Loading new wireguard-0.0.20170726-1 DKMS files...It is likely that 4.9.35-v7+ belongs to a chroot's hostBuilding for 3.6-trunk-rpi, 4.9.31-v7+, 4.9.35+ and 4.9.35-v7+Building initial module for 3.6-trunk-rpiError! The dkms.conf for this module includes a BUILD_EXCLUSIVE directive whichdoes not match this kernel/arch. This indicates that it should not be built.Skipped.Building initial module for 4.9.31-v7+Done.wireguard:Running module version sanity check.- Original module- No original module exists within this kernel- Installation- Installing to /lib/modules/4.9.31-v7+/kernel/net/ depmod...DKMS: install completed.Building initial module for 4.9.35+Done.wireguard:Running module version sanity check.- Original module- No original module exists within this kernel- Installation- Installing to /lib/modules/4.9.35+/kernel/net/ depmod...DKMS: install completed.Building initial module for 4.9.35-v7+Done.wireguard:Running module version sanity check.- Original module- No original module exists within this kernel- Installation- Installing to /lib/modules/4.9.35-v7+/kernel/net/ depmod...DKMS: install completed.-------- Uninstall Beginning --------Module: wireguardVersion: 0.0.20170726-1Kernel: 4.9.31-v7+ (armv7l)------------------------------------- Status: Before uninstall, this module version was ACTIVE on this kernel.wireguard.ko:- Uninstallation- Deleting from: /lib/modules/4.9.31-v7+/kernel/net/ - Original module- No original module was found for this module on this kernel.- Use the dkms install command to reinstall any previous module version.depmod...DKMS: uninstall completed.-------- Uninstall Beginning --------Module: wireguardVersion: 0.0.20170726-1Kernel: 4.9.35+ (armv7l)------------------------------------- Status: Before uninstall, this module version was ACTIVE on this kernel.wireguard.ko:- Uninstallation- Deleting from: /lib/modules/4.9.35+/kernel/net/ - Original module- No original module was found for this module on this kernel.- Use the dkms install command to reinstall any previous module version.depmod...DKMS: uninstall completed.-------- Uninstall Beginning --------Module: wireguardVersion: 0.0.20170726-1Kernel: 4.9.35-v7+ (armv7l)------------------------------------- Status: Before uninstall, this module version was ACTIVE on this kernel.wireguard.ko:- Uninstallation- Deleting from: /lib/modules/4.9.35-v7+/kernel/net/ - Original module- No original module was found for this module on this kernel.- Use the dkms install command to reinstall any previous module version.depmod...DKMS: uninstall completed.------------------------------Deleting module version: 0.0.20170726-1completely from the DKMS tree.------------------------------Done.Loading new wireguard-0.0.20170726-1 DKMS files...It is likely that 4.9.35-v7+ belongs to a chroot's hostBuilding for 3.6-trunk-rpi, 4.9.31-v7+, 4.9.35+ and 4.9.35-v7+Building initial module for 3.6-trunk-rpiError! The dkms.conf for this module includes a BUILD_EXCLUSIVE directive whichdoes not match this kernel/arch. This indicates that it should not be built.Skipped.Building initial module for 4.9.31-v7+Done.wireguard:Running module version sanity check.- Original module- No original module exists within this kernel- Installation- Installing to /lib/modules/4.9.31-v7+/kernel/net/ depmod...DKMS: install completed.Building initial module for 4.9.35+Done.wireguard:Running module version sanity check.- Original module- No original module exists within this kernel- Installation- Installing to /lib/modules/4.9.35+/kernel/net/ depmod...DKMS: install completed.Building initial module for 4.9.35-v7+Done.wireguard:Running module version sanity check.- Original module- No original module exists within this kernel- Installation- Installing to /lib/modules/4.9.35-v7+/kernel/net/ depmod...DKMS: install completed.pi@raspberrypi:~ $ lsmod | grep wireguardpi@raspberrypi:~ $ ip link add dev wg0 type wireguardRTNETLINK answers: Operation not permittedpi@raspberrypi:~ $ sudo apt-get install wireguard-dkms wireguard-toolsReading package lists... DoneBuilding dependency treeReading state information... Donewireguard-dkms is already the newest version (0.0.20170726-1).wireguard-tools is already the newest version (0.0.20170726-1).0 upgraded, 0 newly installed, 0 to remove and 855 not upgraded.pi@raspberrypi:~ $ lsmod | grep wireguardpi@raspberrypi:~ $ ip link add dev wg0 type wireguardRTNETLINK answers: Operation not permittedpi@raspberrypi:~ $ sudo apt-get purge wireguard-dkms wireguard-toolsReading package lists... DoneBuilding dependency treeReading state information... DoneThe following packages were automatically installed and are no longer required:dkms libmnl0 linux-headers-3.6-trunk-common linux-headers-3.6-trunk-rpi linux-kbuild-3.6Use 'sudo apt autoremove' to remove them.The following packages will be REMOVED:wireguard-dkms* wireguard-tools*0 upgraded, 0 newly installed, 2 to remove and 855 not upgraded.After this operation, 918 kB disk space will be freed.Do you want to continue? [Y/n] Y(Reading database ... 148279 files and directories currently installed.)Removing wireguard-dkms (0.0.20170726-1) ...-------- Uninstall Beginning --------Module: wireguardVersion: 0.0.20170726-1Kernel: 4.9.31-v7+ (armv7l)------------------------------------- Status: Before uninstall, this module version was ACTIVE on this kernel.wireguard.ko:- Uninstallation- Deleting from: /lib/modules/4.9.31-v7+/kernel/net/ - Original module- No original module was found for this module on this kernel.- Use the dkms install command to reinstall any previous module version.depmod...DKMS: uninstall completed.-------- Uninstall Beginning --------Module: wireguardVersion: 0.0.20170726-1Kernel: 4.9.35+ (armv7l)------------------------------------- Status: Before uninstall, this module version was ACTIVE on this kernel.wireguard.ko:- Uninstallation- Deleting from: /lib/modules/4.9.35+/kernel/net/ - Original module- No original module was found for this module on this kernel.- Use the dkms install command to reinstall any previous module version.depmod...DKMS: uninstall completed.-------- Uninstall Beginning --------Module: wireguardVersion: 0.0.20170726-1Kernel: 4.9.35-v7+ (armv7l)------------------------------------- Status: Before uninstall, this module version was ACTIVE on this kernel.wireguard.ko:- Uninstallation- Deleting from: /lib/modules/4.9.35-v7+/kernel/net/ - Original module- No original module was found for this module on this kernel.- Use the dkms install command to reinstall any previous module version.depmod...DKMS: uninstall completed.------------------------------Deleting module version: 0.0.20170726-1completely from the DKMS tree.------------------------------Done.Removing wireguard-tools (0.0.20170726-1) ...dpkg: warning: while removing wireguard-tools, directory '/etc/wireguard' not empty so not removedProcessing triggers for man-db (2.7.5-1~bpo8+1) ..."On Sat, Aug 5, 2017 at 3:38 PM, Sahil Gupta <sg5414@g.rit.edu> wrote:Hi,
I am not able to setup Wireguard interface on Raspberry pi.
Error:
RTNETLINK answers: Operation not supported
See the stack:
"pi@raspberrypi:~ $ cd /etc/wireguard/pi@raspberrypi:/etc/wireguard $ l-bash: l: command not foundpi@raspberrypi:/etc/wireguard $ lspublickey wg0.confpi@raspberrypi:/etc/wireguard $ history | grep wg015 history | grep wg0pi@raspberrypi:/etc/wireguard $ ip link add wg0 type wireguardRTNETLINK answers: Operation not permittedpi@raspberrypi:/etc/wireguard $ sudo suroot@raspberrypi:/etc/wireguard# wg-quick up wg0 Warning: `/etc/wireguard/wg0.conf' is world accessible[#] ip link add wg0 type wireguardRTNETLINK answers: Operation not supported`wg0` is not a valid WireGuard interfaceUsage: wg show { <interface> | all | interfaces } [public-key | private-key | listen-port | fwmark | peers | preshared-keys | endpoints | allowed-ips | latest-handshakes | transfer | persistent-keepalive | dump]root@raspberrypi:/etc/wireguard# wg show root@raspberrypi:/etc/wireguard# wg show all root@raspberrypi:/etc/wireguard# "Any pointers will be appreciated.Thanks
Sahil Gupta