Tag Archives: linux

dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)

1. Problem description

The following error occurred while attempting to install CUDA 10.2 on Ubuntu 18.04

dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

2. Problem solving

1. Open the terminal and input sudo dpkg - I -- force overwrite XXX

 sudo dpkg -i --force-overwrite /var/cache/apt/archives/nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb

2. Repair the damaged package

sudo apt-get -f install

3. Sprinkle flowers after completion

Parse error in ubantu/Linux system [How to Solve]

Parse error in ubantu/Linux system

This problem took me some time. In order to avoid forgetting to post a blog in the future

Phenomenon:

The execution code and error reporting contents are as follows:

reason:

This is because the standard supported by the Linux gcc compiler is different from the current C89 standard. This C standard requires that the declaration of variables in a block be placed in front of all non declarative statements.

We can see that on line 266, a definition statement is placed before the declaration statement, so an error is reported

Solution:

Put 266 this non declarative statement under all declarative statements
as shown in the following figure:

the compilation succeeded without error, and the problem was solved successfully

Error: failed dependencies error during MySQL installation

When installing MySQL on Linux system, error: failed dependencies error occurs when installing services

I inquired about the solution on the Internet. There are so many dependencies that need to be installed. It is suggested to download them again. Personally, I think it is a waste of time. Another solution is to add -- nodeps -- force , which is successfully solved


after the installation is completed, an error occurs again when starting the MySQL service

unfortunately, to run 32-bit programs on a 64 bit system, you need to install the 32-bit lib library. Or download a 64 bit version.

QT error: – LGL not found [How to Solve]

QT error: – LGL not found

This is because QT cannot find the OpenGL dynamic link library (LIBGL.So). OpenGL is installed by default in most Linux distributions, including Ubuntu, CentOS, etc. if the link library cannot be found, the path is generally wrong.

Solution
1. Use root to find the path of “LIBGL.So” file. Use find/usr - name "LIBGL *" to find
2. The search result is that the version number is added to the suffix of the OpenGL link library provided with the Linux distribution, such as LIBGL.So.1.2.0, LIBGL.So.1.3.1, etc., but the OpenGL link library found by QT in the link phase does not have the version number. So we need to create a link for the OpenGL link library in the/usr/lib/directory and remove the version number
3. Just create a soft connection with ln - s

device no response, device descriptor read/64, error -71

Recently, I was porting rtl8723du to rk356x, and I encountered some problems in this process. Today, I recorded the problem as described in the title. This problem was recognized by the kernel when I plugged the WiFi module into the USB host, but the connection was unsuccessful. I checked a lot of data. It seems that I talked about the current signal. Now I record the problem I encountered, hoping to help more people
plug the module into the USB and use the dmesg command to view the cache information:

[  406.785107] usb 5-1: new high-speed USB device number 2 using xhci-hcd
[  406.908835] usb 5-1: device descriptor read/64, error -71
[  407.142008] usb 5-1: device descriptor read/64, error -71
[  407.371775] usb 5-1: new high-speed USB device number 3 using xhci-hcd
[  407.495321] usb 5-1: device descriptor read/64, error -71
[  407.725472] usb 5-1: device descriptor read/64, error -71
[  407.832210] usb usb5-port1: attempt power cycle
[  408.235232] usb 5-1: new high-speed USB device number 4 using xhci-hcd
[  408.235581] usb 5-1: Device not responding to setup address.
[  408.442000] usb 5-1: Device not responding to setup address.
[  408.648596] usb 5-1: device not accepting address 4, error -71
[  408.771923] usb 5-1: new high-speed USB device number 5 using xhci-hcd
[  408.772241] usb 5-1: Device not responding to setup address.
[  408.978858] usb 5-1: Device not responding to setup address.
[  409.185336] usb 5-1: device not accepting address 5, error -71
[  409.185559] usb usb5-port1: unable to enumerate USB device

First of all, I tried many online solutions. The general methods are:

echo Y > /sys/module/usbcore/parameters/old_scheme_first

perhaps

echo -1 > /sys/module/usbcore/parameters/autosuspend

I tried these methods, but they didn’t work in the end. But I directly inserted a hub on the board to transfer it out, and then inserted the module into the hub. At this time, the kernel can normally recognize the rtl8723du module
cache information displayed by dmesg after normal recognition:

[ 1862.348148] usb 5-1: new high-speed USB device number 11 using xhci-hcd
[ 1862.365237] usb 5-1: New USB device found, idVendor=1a40, idProduct=0101, bcdDevice= 1.11
[ 1862.365269] usb 5-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 1862.365281] usb 5-1: Product: USB 2.0 Hub
[ 1862.403229] hub 5-1:1.0: USB hub found
[ 1862.403327] hub 5-1:1.0: 4 ports detected
[ 1862.784974] usb 5-1.2: new high-speed USB device number 12 using xhci-hcd
[ 1862.803946] usb 5-1.2: New USB device found, idVendor=0bda, idProduct=d723, bcdDevice= 2.00
[ 1862.804023] usb 5-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1862.804055] usb 5-1.2: Product: 802.11n WLAN Adapter
[ 1862.804084] usb 5-1.2: Manufacturer: Realtek
[ 1862.804109] usb 5-1.2: SerialNumber: 00e04c000001
[ 1862.888575] RTW:
[ 1862.888575] usb_endpoint_descriptor(0):
[ 1862.888660] RTW: bLength=7
[ 1862.888684] RTW: bDescriptorType=5
[ 1862.888705] RTW: bEndpointAddress=84
[ 1862.888725] RTW: wMaxPacketSize=512
[ 1862.888744] RTW: bInterval=0
[ 1862.888764] RTW: RT_usb_endpoint_is_bulk_in = 4
[ 1862.888784] RTW:
[ 1862.888784] usb_endpoint_descriptor(1):
[ 1862.888807] RTW: bLength=7
[ 1862.888825] RTW: bDescriptorType=5
[ 1862.888876] RTW: bEndpointAddress=5
[ 1862.888901] RTW: wMaxPacketSize=512
[ 1862.888935] RTW: bInterval=0
[ 1862.888975] RTW: RT_usb_endpoint_is_bulk_out = 5
[ 1862.889009] RTW:
[ 1862.889009] usb_endpoint_descriptor(2):
[ 1862.889046] RTW: bLength=7
[ 1862.889066] RTW: bDescriptorType=5
[ 1862.889085] RTW: bEndpointAddress=6
[ 1862.889104] RTW: wMaxPacketSize=512
[ 1862.889135] RTW: bInterval=0
[ 1862.889172] RTW: RT_usb_endpoint_is_bulk_out = 6
[ 1862.889205] RTW:
[ 1862.889205] usb_endpoint_descriptor(3):
[ 1862.889241] RTW: bLength=7
[ 1862.889278] RTW: bDescriptorType=5
[ 1862.889311] RTW: bEndpointAddress=87
[ 1862.889344] RTW: wMaxPacketSize=64
[ 1862.889364] RTW: bInterval=3
[ 1862.889383] RTW: RT_usb_endpoint_is_int_in = 7, Interval = 3
[ 1862.889419] RTW:
[ 1862.889419] usb_endpoint_descriptor(4):
[ 1862.889455] RTW: bLength=7
[ 1862.889491] RTW: bDescriptorType=5
[ 1862.889525] RTW: bEndpointAddress=8
[ 1862.889559] RTW: wMaxPacketSize=512
[ 1862.889591] RTW: bInterval=0
[ 1862.889625] RTW: RT_usb_endpoint_is_bulk_out = 8
[ 1862.889646] RTW:
[ 1862.889646] usb_endpoint_descriptor(5):
[ 1862.889670] RTW: bLength=7
[ 1862.889701] RTW: bDescriptorType=5
[ 1862.889737] RTW: bEndpointAddress=9
[ 1862.889772] RTW: wMaxPacketSize=512
[ 1862.889806] RTW: bInterval=0
[ 1862.889839] RTW: RT_usb_endpoint_is_bulk_out = 9
[ 1862.889873] RTW: nr_endpoint=6, in_num=2, out_num=4
[ 1862.889873]
[ 1862.889910] RTW: USB_SPEED_HIGH
[ 1862.889937] RTW: CHIP TYPE: RTL8723DU
[ 1862.890090] RTW: loadparam, Select P2P interface: iface_id:1
[ 1862.890593] RTW: Chip Version Info: CHIP_8723D_T4_1T1R_RomVer(0)
[ 1862.890640] RTW: USB NumInPipe(2), NumOutPipe(4/4)
[ 1862.890809] RTW: EEPROM type is E-FUSE
[ 1862.891165] RTW: Boot from EFUSE, Autoload OK !
[ 1862.891663] RTW: hal_EfuseSwitchToBank: Efuse switch bank to 0
[ 1862.981769] RTW: hal_ReadEFuse_WiFi: data end at address=0x86
[ 1862.982020] RTW: HW EFUSE
......

Resolution of internal server error problem in diango project

Resolution of internal server error problem in diango project

Project scenario:

Django project
using uwsgi deployment
internal server error is found after packaging and running


Problem Description:

internal server error appears on the website of the project. Check the log and find no Python application found

Solution:

Delete uwsgi_ Log restart uwsgi open the uwsgi log file and constantly try to modify it. Open the uwsgi log to check the problem

Cause analysis:

the existing problems are as follows:

    when using pyinstaller to package, do not add – F. the packaged files are still run in the original directory


    Solution:

      put the packaged files in the original directory. Do not use pyinstaller – F manage.spec when running the packaged application
      use pyinstaller manage.spec; Make sure that the python path of the project directory in uwsgi.ini is correct

error: unrecognized argument in option ‘-mabi=apcs-gnu‘

This is the problem I encountered when compiling rtl8723du and executing makefile:

aarch64-buildroot-linux-gnu-gcc.br_real: error: unrecognized argument in option '-mabi=apcs-gnu'
aarch64-buildroot-linux-gnu-gcc.br_real: note: valid arguments to '-mabi=' are: ilp32 lp64
aarch64-buildroot-linux-gnu-gcc.br_real: error: unrecognized command line option '-mapcs'
aarch64-buildroot-linux-gnu-gcc.br_real: error: unrecognized command line option '-mno-sched-prolog'
aarch64-buildroot-linux-gnu-gcc.br_real: error: unrecognized command line option '-msoft-float'

Let me say the conclusion first. In fact, this is the problem of conflict between the compilation target architecture. The tool chain I use is aarch64 builderoot Linux GNU GCC, which is the tool chain for compiling arm64 architecture, but the architecture in makefile is arch: = arm. Therefore, my modification is to change the architecture to arm64, that is, arch: = arm64.

[Solved] YUM Error: error: rpmdb: BDB0113 Thread/process 11498/140107732375616 failed

Problem description

An error occurred while installing the software using yum

[root@localhost ~]# yum install pv -y
error: rpmdb: BDB0113 Thread/process 11498/140107732375616 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db5 -  (-30973)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed
[root@localhost ~]# 

Problem analysis

Yum was unable to open the package index using db5 – (- 30973) and the package database in/var/lib/rpm
according to the prompt yumrpmdb: bdb0113 thread/process 11498/140107732375616 failed, enter/var/lib/rpm to delete the corresponding DB file, and then rebuild yum

Solution:

1. View the/var/lib/RPM directory and delete it__DB * file

$ /var/lib/rpm
$ ls
Basenames     __db.001  __db.003  Group       Name          Packages     Requirename  Sigmd5
Conflictname  __db.002  Dirnames  Installtid  Obsoletename  Providename  Sha1header   Triggername
$ rm -rf __db.*

2. Refactoring yum

$ rpm --rebuilddb

3. Clear Yum cache

$ yum clean all

4. Update the software chain of Yum

$  yum repolist

[Solved] RHEL 7 installs Oracle RAC 11.2.0.4, executes root.sh error ohasd: failed to start

RHEL 7 installs Oracle RAC 11.2.0.4, executes root.sh and reports an error ohasd failed to start

Error reporting reason:

Because RHEL 7 uses SYSTEMd instead of initd to run and restart processes, while root.sh runs ohad processes through traditional initd.

Solution:
in RHEL 7, ohasd needs to be set as a service before running the script root.sh
the steps are as follows:

1. Create service file as root user
[root@rac1 ~]# touch /usr/lib/systemd/system/ohas.service
[root@rac1 ~]# chmod 777 /usr/lib/systemd/system/ohas.service
2. Add the following to the newly created ohas.service file
[root@rac1 init.d]# cat /usr/lib/systemd/system/ohas.service
[Unit]
Description=Oracle High Availability Services
After=syslog.target

[Service]
ExecStart=/etc/init.d/init.ohasd run >/dev/null 2>&1 Type=simple
Restart=always

[Install]
WantedBy=multi-user.target

3. Run the following command as root user
systemctl daemon-reload
systemctl enable ohas.service
systemctl start ohas.service
4. View running status
[root@rac1 init.d]# systemctl status ohas.service

Run root.sh after the service is up
if the ohad failed to start error is still reported, it may be that ohas.service does not start immediately after init.ohad is created by the root.sh script. Refer to the following for solutions:

When running root.sh, refresh/etc/init. D until the init.ohasd file appears. Start ohas.service manually immediately. The service command is systemctl start ohas.service

[Solved] Web server failed to start. Port 8080 was already in use.

An error occurs when starting the jar package on the Linux server, as follows:

Description:
Web server failed to start. Port 8080 was already in use.
action:
identify and stop the process that’s listening on port 8080 or configure this application to listen on another port.
indicates that the web server failed to start and port 8080 is already in use. Check whether the last started task stopped

Solution steps:

1. Enter the bin directory
CD/usr/local/Tomcat/bin

2. Check whether Tomcat is closed
PS – EF | grep Java

3. Use the Tomcat shutdown command
./shutdown.sh (use with caution)
if you want to kill Tomcat directly, you can use the kill command to kill the process directly
kill – 9 7010

[Solved] Clone Linux Code Error: server certificate verification failed. CAfile: none CRLfile: none

The following error occurs in Git clone Linux source code:

Solution:

Enter in the terminal:

git config –global http.sslverify false
git config –global https.sslverify false

xport GIT_SSL_NO_VERIFY=1

Then the download is normal