Tag Archives: apt

[Solved] Add-apt-repository Command Error: AttributeError: ‘Thread‘ object has no attribute ‘isAlive‘

Question:

Today, when installing the software package, I found that an error occurred when executing the add apt repository command, and the software source could not be added

Traceback (most recent call last):
  File "/usr/bin/add-apt-repository", line 191, in <module>
    if not sp.add_source_from_shortcut(shortcut, options.enable_source):
  File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 777, in add_source_from_shortcut
    if worker.isAlive():
AttributeError: 'Thread' object has no attribute 'isAlive'

reason:

The file softwareproperties.py refers to “isalive”. The python version installed on the computer is 3.9.2. This method is no longer supported in 3.9.

Solution:

Modify the “/ usr/lib/python3/dist packages/softwareproperties/softwareproperties. Py” file, and change the “isalive” in line 777 to “is_live”.

Ubuntu found an error during apt operation [How to Solve]

1. An error will be reported during apt install. The error content is: couldn’t resolve host mirrors aliyun.com

Cause of problem: the domain name resolution server needs to be configured because the domain name cannot be resolved.

Solution:

— vi /etc/resolv.conf

Add at the end of the text

nameserver 8.8.8.8

nameserver 114.114.114.114

2.ubuntu Apt-get error
ubuntu use apt-get error:
E: Could not get lock /var/lib/dpkg/lock – open (11 Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?

Solution:
1.delete the lock file
sudo rm /var/lib/apt/lists/lock
2.delete the lock file in the cache directory
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock

3.ubuntu apt-get  Unable to locate package
Reason:
Unable to locate packet Just can’t find the package
Solution:
— apt-get update

Solution of apt unable to update in the docker container of raspberry pie

Today, apt failed to update when building the image with dockerfile on raspberry pie

...
 ---> Running in 05393fa6f242
Get:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease [265 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease [114 kB]
Err:1 http://ports.ubuntu.com/ubuntu-ports focal InRelease
  At least one invalid signature was encountered.
Err:2 http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease
  At least one invalid signature was encountered.
Get:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease [101 kB]
Err:3 http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease
  At least one invalid signature was encountered.
Get:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease [114 kB]
Err:4 http://ports.ubuntu.com/ubuntu-ports focal-security InRelease
  At least one invalid signature was encountered.
Reading package lists...
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal InRelease' is not signed.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-updates InRelease' is not signed.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-backports InRelease' is not signed.
W: GPG error: http://ports.ubuntu.com/ubuntu-ports focal-security InRelease: At least one invalid signature was encountered.
E: The repository 'http://ports.ubuntu.com/ubuntu-ports focal-security InRelease' is not signed.
...

The solution is:
in http://ftp.debian.org/debian/pool/main/libs/libseccomp/ Download the latest version of libseccomp2. The current version is libseccomp2_ 2.5.1-1_ Armhf. DEB
install on raspberry pie

>>> sudo dpkg -i libseccomp2_2.5.1-1_armhf.deb

“20999;” 21448;”

[br] https://askubuntu.com/a/1264921/685786
https://stackoverflow.com/a/64463211/7151777

Err:1 http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu xxxxxx 404 Not Found [IP: 101.6.8.193 80]

Using sudo apt get install ROS melodic TEB local planner
to install the software, this error is reported, and the solution found can not be used
later, it is found that there is this file in the mirror source, but the previous one is all right, and the suffix of the upload date is wrong, which leads to the failure to find the installed package
after searching, it is found that there is a problem with DNS resolution

Solution:
change DNS first https://note.qidong.name/2020/05/resolvconf/
Modify the/etc/resolv.conf file, add 202.106.0.20
this is from Beijing Unicom, and then execute sudo apt get update
to get the result

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu bionic Release: The following signatures were invalid: EXPKEYSIG F42ED6FBAB17C654 Open Robotics <[email protected]>
W: Failed to fetch http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/dists/bionic/Release.gpg  The following signatures were invalid: EXPKEYSIG F42ED6FBAB17C654 Open Robotics <[email protected]>
W: Some index files failed to download. They have been ignored, or old ones used instead.

Such an error report
execute sudo apt key adv — KeyServer keyserver.ubuntu.com — recv keys f42ed6fbab17c654
the following key is the key on the error report, just copy it

Then execute sudo apt get update
and finally sudo apt get install ROS melody TEB local planner
successfully!

Linux Ubuntu ImportError: Libtk8.5.so: cannot open shared object file:No such file Install tkinter Library

Ubuntu resolves errors importerror: libtk8.5.so: cannot open shared object file:No such File to install Tkinter Library

 

terms of settlement


terms of settlement


at the beginning, I wanted to install with PIP3, but all of them made mistakes. It seems that PIP does not have this library?Then use </ font> instead

sudo apt-get update
sudo apt-get install python3-tk

   done

note: if there is an error in the installation process, you can refer to my previous article to add image source processing – Linux Ubuntu modify image source