Error while Executing Simple kernel Module using make command

following is the error message while executing my first kernel module using make command, feeling so much demotivated please help.

:~/modules$   make  make -C/lib/modules/5.0.0-31-generic/build/ M=/home/zeeshan/modules modules  make[1]: Entering directory '/usr/src/linux-headers-5.0.0-31-generic'    CC [M]  /home/zeeshan/modules/simple.o  In file included from /home/zeeshan/modules/simple.c:3:0:  /home/zeeshan/modules/simple.c: In function ‘__exittest’: /home/zeeshan/modules/simple.c:16:13: error: return from incompatible pointer type [-Werror=incompatible-pointer-types]  module_exit(simple_exit);              ^ ./include/linux/module.h:137:11: note: in definition of macro ‘module_exit’   { return exitfn; }     \            ^~~~~~ /home/zeeshan/modules/simple.c: In function ‘simple_exit’: /home/zeeshan/modules/simple.c:13:1: warning: control reaches end of non-void function [-Wreturn-type]  }  ^ cc1: some warnings being treated as errors scripts/Makefile.build:291: recipe for target '/home/zeeshan/modules/simple.o' failed make[2]: *** [/home/zeeshan/modules/simple.o] Error 1 Makefile:1608: recipe for target '_module_/home/zeeshan/modules' failed make[1]: *** [_module_/home/zeeshan/modules] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-5.0.0-31-generic' Makefile:3: recipe for target 'all' failed make: *** [all] Error 2 

How to fix error: Failed to load module “canberra-gtk-module”

I am running Ubuntu 18.04.3 LTS and when I launch MATLAB R2019b I get the following error:

Gtk-Message: 00:20:10.283: Failed to load module "canberra-gtk-module" [0921/002013.995543:INFO:context.cpp(159)] Using multi-threaded message loop for Linux

I read this thread: Failed to load module “canberra-gtk-module” …. but already installed

but wasn’t able to resolve the issue. Matlab launches and then it functions well but I would like to solve this error. Any ideas would be appreciated.

Import Error: No module named Quirks while trying to install nvidia-390

There was a problem with my Nvidia drivers, so I had to delete them all (with purge). But now, when I’m trying to reinstall nvidia-390, I get the following error:

File "/usr/bin/quirks-handler", line 26 in <module>   import Quirks.quirkapplier ImportError: No module named 'Quirks' dpkg: error processing package nvidia-390 (--configure):  subprocess installed post-installation script returned error exit status 1 ... 

This is not a surprise as I can’t find a folder named Quirks in “/usr/lib/python3/dist-packages, and I don’t know how to install it manually, as all simple commands that pass through my mind, such as pip install python3-quirks,… don’t work.

Can’t load wireguard module

I have a VPS server running ubuntu 18.04 LTS where I wanted to install a Wireguard VPN service. I have startet with adding the repository and then installing the module which is running fine and without any error messages.

add-apt-repository ppa:wireguard/wireguard apt-get update apt-get install wireguard-dkms wireguard-tools 

Then I wanted to load the kernel module using

sudo modprobe wireguard 

but modprobe tells me, that it is unable to locate the kernel module.

modprobe: ERROR: ../libkmod/libkmod.c:514 lookup_builtin_file() could not open builtin file '/lib/modules/4.15.0/modules.builtin.bin' modprobe: FATAL: Module wireguard not found in directory /lib/modules/4.15.0 

Rereading the console output, the installer told me that it had installed the module to /lib/modules/4.15.0-62-generic/updates/dkms but modprobe seems to look only into /lib/modules/4.15.0/. I have already tried to create a symlink into the 4.15.0-directory but modprobe still is not able to locate the module file.

The Ubuntu Server was ‘out of box’, since I was renewing it. Is anyone who can help?

Cannot find module ‘jquery’

I am using this tutorial to try to load jquery into my SPF project. http://dev.office.com/sharepoint/docs/spfx/web-parts/basics/add-an-external-library

I followed strictly

tsd install jquery –save

Update the config.json in the config folder to load jQuery from CDN. Add an entry to the externals field:

"jquery": "https://code.jquery.com/jquery-3.1.0.min.js" 

Import jQuery in your web part:

import * as $   from 'jquery'; 

However I keep getting this errors

Warning - tslint - src/webparts/helloWorld/HelloWorldWebPart.ts(12,13): error no-unused-variable: Unused import: '$  ' Error - typescript - src/webparts/helloWorld/HelloWorldWebPart.ts(12,20): error TS2307: Cannot find module 'jquery'. Error - 'typescript' sub task errored after 3.97 s  

pip : AttributeError: module ‘lib’ has no attribute ‘Cryptography_HAS_SSL_ST’

So everytime I want to use pip command on Ubuntu 16.04 I get the following error:

 ~ pip3 --version               Traceback (most recent call last):   File "/usr/local/bin/pip3", line 6, in <module>     from pip._internal import main   File "/usr/local/lib/python3.5/dist-packages/pip/_internal/__init__.py", line 40, in <module>     from pip._internal.cli.autocompletion import autocomplete   File "/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/autocompletion.py", line 8, in <module>     from pip._internal.cli.main_parser import create_main_parser   File "/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/main_parser.py", line 12, in <module>     from pip._internal.commands import (   File "/usr/local/lib/python3.5/dist-packages/pip/_internal/commands/__init__.py", line 6, in <module>     from pip._internal.commands.completion import CompletionCommand   File "/usr/local/lib/python3.5/dist-packages/pip/_internal/commands/completion.py", line 6, in <module>     from pip._internal.cli.base_command import Command   File "/usr/local/lib/python3.5/dist-packages/pip/_internal/cli/base_command.py", line 20, in <module>     from pip._internal.download import PipSession   File "/usr/local/lib/python3.5/dist-packages/pip/_internal/download.py", line 15, in <module>     from pip._vendor import requests, six, urllib3   File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/requests/__init__.py", line 97, in <module>     from pip._vendor.urllib3.contrib import pyopenssl   File "/usr/local/lib/python3.5/dist-packages/pip/_vendor/urllib3/contrib/pyopenssl.py", line 46, in <module>     import OpenSSL.SSL   File "/usr/local/lib/python3.5/dist-packages/OpenSSL/__init__.py", line 8, in <module>     from OpenSSL import crypto, SSL   File "/usr/local/lib/python3.5/dist-packages/OpenSSL/SSL.py", line 194, in <module>     if _lib.Cryptography_HAS_SSL_ST: AttributeError: module 'lib' has no attribute 'Cryptography_HAS_SSL_ST' 

I tried to reinstall pyOpenSSL but it requires pip to install it with the command:

pip install pyOpenSSL 

which reproduces the same error message. How can I solve this problem, please?

Error using python3 ssl module while openssl is installed

I’m using Ubuntu 19.04.

Have openssl installed

openssl version

OpenSSL 1.1.1b 26 Feb 2019

$ find . | grep libssl

./x86_64-linux-gnu/libssl.so

./x86_64-linux-gnu/libssl.so.1.1

However while running python3 it still gives ssl error

 python3 -c 'import ssl' Traceback (most recent call last):   File "<string>", line 1, in <module>   File "/usr/local/lib/python3.7/ssl.py", line 98, in <module>     import _ssl             # if we can't import it, let the error propagate ImportError: libssl.so.1.0.0: cannot open shared object file: No such file or directory 

Authenticate to SharePoint using Client Id and Client Secret with python Requests module

I would like to authenticate to SharePoint using Python and the Requests package. This is what I have so fare:

from oauthlib.oauth2 import BackendApplicationClient from requests_oauthlib import OAuth2Session  client_id = 'my_client_id' client_secret = 'my_client_secret' sitepath = 'https://our_sites.company_name.com/sites/my_site'  client = BackendApplicationClient(client_id=client_id) oauth = OAuthSession(client=client) token = oauth.fetch_token(token_url='super_long_token_url',                           client_id=client_id,                           client_secret=client_secret) 

However a “ValueError: Please supply either code or authorization_response parameters”

Ideally I was hoping to use the client_id and client_secret basically as a user and password. In any case, help would be appreciated.

How could I write a kernel module for 14.04 to extend the radiotap fields?

My application specifically needs to run on Ubuntu 14.04.

According to the man page, Ubuntu only supports the following fields:

IEEE80211_RADIOTAP_TSFT

IEEE80211_RADIOTAP_FLAGS

IEEE80211_RADIOTAP_RATE

IEEE80211_RADIOTAP_CHANNEL

IEEE80211_RADIOTAP_DBM_ANTSIGNAL

IEEE80211_RADIOTAP_DBM_ANTNOISE

IEEE80211_RADIOTAP_DBM_TX_POWER

IEEE80211_RADIOTAP_ANTENNA

IEEE80211_RADIOTAP_DB_ANTSIGNAL

IEEE80211_RADIOTAP_DB_ANTNOISE

IEEE80211_RADIOTAP_XCHANNEL

I want to write a kernel module that will supply the VHT and MCS fields if the driver can provide them.

I’ve written kernel modules before, but it’s been a while, and I’m not sure exactly where to start for network stuff. I would appreciate a general outline if anyone is able to give it.

“Module nvidia is in use” but there are no processes running on the GPU

I am trying to configure VirtualGL, and the configuration gives the following message:

IMPORTANT NOTE: Your system uses modprobe.d to set device permissions. You must execute rmmod nvidia with the display manager stopped in order for the new device permission settings to become effective. 

When I try running rmmod nvidia (or with sudo), it says that module nvidia is in use:

rmmod: ERROR: Module nvidia is in use by: nvidia_uvm nvidia_modeset

I have already stopped my window manager by running sudo systemctl stop sddm.service, so when I check nvidia-smi it says that there are no processes running on the GPU.

Most of the threads I found on this issue are related to bumblebee, but I don’t even have it insalled.

Output of nvidia-smi:

+-----------------------------------------------------------------------------+ | NVIDIA-SMI 430.40       Driver Version: 430.40       CUDA Version: 10.1     | |-------------------------------+----------------------+----------------------+ | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC | | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. | |===============================+======================+======================| |   0  GeForce GTX 1080    Off  | 00000000:01:00.0 Off |                  N/A | | 33%   39C    P8    12W / 200W |      9MiB /  8119MiB |      0%      Default | +-------------------------------+----------------------+----------------------+  +-----------------------------------------------------------------------------+ | Processes:                                                       GPU Memory | |  GPU       PID   Type   Process name                             Usage      | |=============================================================================| |  No running processes found                                                 | +-----------------------------------------------------------------------------+ 

Ubuntu 18.04