GPG error (EXPKEYSIG) while on apt update on Ubuntu - ubuntu-18.04

I was trying to update the apt repository on Ubuntu by running:
$sudo apt update
And I get the following error:
W: An error occurred during the signature verification.
The repository is not updated and the previous index files will be used.
GPG error: https://nvidia.github.io/nvidia-container-runtime/experimental/ubuntu18.04/amd64
InRelease: The following signatures were invalid: EXPKEYSIG 6ED91CA3AC1160CD NVIDIA CORPORATION (Open Source Projects) <cudatools#nvidia.com>
W: Failed to fetch https://nvidia.github.io/nvidia-container-runtime/experimental/ubuntu18.04/amd64/InRelease
The following signatures were invalid: EXPKEYSIG 6ED91CA3AC1160CD NVIDIA CORPORATION (Open Source Projects) <cudatools#nvidia.com>
I googled this error and some blogs suggests to run
$sudo apt-key list
which I did and get:
pub rsa4096 2016-06-24 [SC]
AE09 FE4B BD22 3A84 B2CC FCE3 F60F 4B3D 7FA2 AF80
uid [ unknown] cudatools <cudatools#nvidia.com>
pub rsa4096 2017-09-28 [SCE]
C95B 321B 61E8 8C18 09C4 F759 DDCA E044 F796 ECB0
uid [ unknown] NVIDIA CORPORATION (Open Source Projects) <cudatools#nvidia.com>
The following link How to solve expired key suggests to run the following command with EXPKEYSIG, but I get the following error:
$ sudo apt-key adv --keyserver keys.gnupg.net --recv-keys 6ED91CA3AC1160CD
Executing: /tmp/apt-key-gpghome.A0899nj0Vo/gpg.1.sh --keyserver keys.gnupg.net --recv-keys 6ED91CA3AC1160CD
gpg: keyserver receive failed: No name
Really not sure how to resolve this? Any suggestion?
Thanks

For solve your problem:
delete old key
sudo apt-key del 6ED91CA3AC1160CD
delete repository info:
sudo rm /etc/apt/sources.list.d/nvidia-container-runtime.list
reinit repository as write here https://nvidia.github.io/nvidia-container-runtime/
curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey |
sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list |
sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
sudo apt-get update

Related

I got an illegal instruction when installing mongoDB when trying to check the version

Hey so I tried installing mongoDB and I can't get it to install correctly. I am installing it on wsl on a windows computer and I keep getting illegal instruction when I try to check the version and it won't let me finish installing it. Here are the instructions I used to install MongoDB (version 5.0) on WSL (Ubuntu 20.04):
Open your WSL terminal (ie. Ubuntu) and go to your home directory: cd ~
Update your Ubuntu packages: sudo apt update
Import the public key used by the MongoDB package management system: wget -qO - https://www.mongodb.org/static/pgp/server-5.0.asc | sudo apt-key add -
Create a list file for MongoDB: echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-5.0.list
Reload local package database: sudo apt-get update
Install MongoDB packages: sudo apt-get install -y mongodb-org
Confirm installation and get the version number: mongod --version
Make a directory to store data: mkdir -p ~/data/db
Run a Mongo instance: sudo mongod --dbpath ~/data/db
Check to see that your MongoDB instance is running with: ps -e | grep 'mongod'
To exit the MongoDB Shell, use the shortcut keys: Ctrl + C

mssql-cli cannot connect to remote server

I am trying to connect to a remote SQL Server with mssql-cli, I use this command:
/usr/local/bin/mssql-cli -S server -U admin -d db -P ****
and I get this error:
Error message: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 35 - An internal exception was caught)
However, I am able to connect using sqsh with no problem:
sqsh -S server -U admin -D db -P ****
Since I can connect with sqsh but not mssql-cli, and I am able to connect to a local instance of SQL Server, I'm not sure where to go from here.
I found the answer here: https://askubuntu.com/questions/1284658/how-to-fix-microsoft-odbc-driver-17-for-sql-server-ssl-provider-ssl-choose-cli
The answer is to update to the latest openssl:
wget https://www.openssl.org/source/latest.tar.gz -O openssl-1.1.1i.tar.gz
tar -zxvf openssl-1.1.1i.tar.gz
cd openssl-1.1.1i
./config
make
sudo make install
openssl version
sudo ldconfig
I also installed mssql-tools and unixodbc-dev - although I don't know if that had anything to do with it:
https://learn.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools?view=sql-server-ver15
These docs are for 16.04; so you have to change that to 20.04 if you're using mint 20 or ubuntu 20.04 like I am:
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/msprod.list
sudo apt install mssql-tools unixodbc-dev odbcinst1debian2 msodbcsql17 unixodbc libodbc1
It installs to /opt/mssql-tools/bin, so make sure add /opt/mssql-tools/bin/ to your PATH environment variable in a bash shell.

dpkg can't install pgAdmin4-web on my debian

I tried installing pgadmin4 on debian10 and it reported:
dpkg: error processing archive /var/cache/apt/archives/pgadmin4-web_4.24_all.deb (--unpack):
trying to overwrite '/etc/apache2/conf-available/pgadmin4.conf', which is also in package pgadmin4-apache2 4.23-1.pgdg100+1
Try force-overwriting :
sudo dpkg -i --force-overwrite /var/cache/apt/archives/pgadmin4-web_4.24_all.deb
sudo apt-get -f install
I just want to extend the answer of Thirumal. Just
try to get into
cd /var/cache/apt/archives/
You will find the exact version of your pgadmin4-web there.The version at the time of writing this answer is
pgadmin4-web_4.28_all.deb
After you locate your own version then apply the following two commands
sudo dpkg -i --force-overwrite /var/cache/apt/archives/pgadmin4-web_YOUR VERSION_all.deb
sudo apt-get -f install

OGR2OGR with MS SQL on Ubuntu 16.04

I need to access a Microsoft SQL Server with OGR2OGR from an Ubuntu Server 16.04. It is working on Microsoft, so the basic setup is fine.
My problem is that when I run my OGR2OGR command (after installing GDAL with sudo apt-get install gdal-bin):
ogr2ogr -overwrite -f MSSQLSpatial "MSSQL:server=tcp:<DATABASE_SERVER>,<PORT>;database=<DATABASE_NAME>;uid=<USER>;Pwd=<PASSWORD>;" "<IMPORT PATH FILE>" -nln "<TABLE NAME>" -progress
I get the error:
ERROR 1: Unable to initialize connection to the server for MSSQL:"DATABASE_SERVER";
[unixODBC][Driver Manager]Can't open lib 'SQL Server' : file not found
Try specifying the driver in the connection string from the list of available drivers:
I tried to install Microsoft ODBC Driver for SQL Server based on this instruction, but it cannot be installed when gdal is installed. The error is:
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
msodbcsql : Depends: unixodbc-utf16 (>= 2.3.1-1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I managed to install the Microsoft ODBC driver after a while but it meant removing GDAL. So I can either have GDAL or the Microsoft ODBC driver. Is there a way to solve this problem?
Thanks for your help!
UPDATE (2017.01.03): I found the following solution and I also commented on the according article on the MSDN Blog (so far without reply) here
Install UnixODBC if not already there
sudo apt-get install unixodbc unixodbc-dev
Download from somewhere: msodbcsql-11.0.2270.0.tar.gz (it could be better to use msodbcsql-13.x.x.x.tar.gz but I was not able to find it) and
tar xvfz msodbcsql-11.0.2270.0.tar.gz
cd msodbcsql-11.0.2270.0
ldd lib64/libmsodbcsql-11.0.so.2270.0
If there are missing dependencies install them, in my case it could be done like this: (everything except the apt-get install is to fix the naming of the file by creating a link:)
sudo apt-get install libssl1.0.0 libssl-dev
cd /lib/x86_64-linux-gnu
sudo ln -s libssl.so.1.0.0 libssl.so.10
sudo ln -s libcrypto.so.1.0.0 libcrypto.so.10
Installing and cleaning up:
sudo bash ./install.sh install --force --accept-license
rm -rf /tmp/msodbcubuntu
If the Driver is not found by the tool using it, (e.g. ogr2ogr or pyodbc) edit /etc/odbcinst.ini and create a connector for [SQL Server]
[SQL Server]
Description=Microsoft ODBC Driver 11 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-11.0.so.2270.0
Threading=1
UsageCount=2
Shamelessly from : https://learn.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-ver15
sudo su
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list > /etc/apt/sources.list.d/mssql-release.list
sudo apt-get update
sudo ACCEPT_EULA=Y apt-get install msodbcsql17
Verify with
ogr2ogr --formats
Which should then list:
MSSQLSpatial -vector- (rw+): Microsoft SQL Server Spatial Database

Unable to locate package matlab-psychtoolbox-3

I am trying to install the matlab-psychtoolbox-3 and I recieve this error:
$ sudo apt-get install matlab-psychtoolbox-3
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package matlab-psychtoolbox-3
Can anybody tell me how to solve the problem?
I guess this is old, but for anyone struggling with this error while installing psych-toolbox this is how to solve it. Basically, the error is because the neurodebian package is not installed in your system. To do so, run: sudo apt-get install neurodebian
Once you do this, then follow the next step, i.e., sudo apt-get install matlab-psychtoolbox-3
Then you are all set.
assuming that you've added the neurodebian ppa to your system witch is the easyest way to get the psychtoolbox to ubuntu
try to update your packet list with sudo apt-get update and then try to install again with sudo apt-get install matlab-psychtoolbox-3
if that doesn’t help check your software sources and see if the neurodebian nonfree ppa is installed (all matlab stuff is part of the nonfree branch).
if you got the free branch installed remove it put add the non free branch:
wget -O- http://neuro.debian.net/lists/trusty.de-md.full | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
sudo apt-key adv --recv-keys --keyserver hkp://pgp.mit.edu:80 2649A5A9
that should do the trick

Resources