I have found a workaround: I used wireshark-gtk I installed wireshark-gtk with apt-get install wireshark-gtk
I can capture with wireshark-gtk both when I start the program as root, and when I start the program as my own user, which is a member of the group wireshark.