Category Archives: Linux

When installing software in Ubuntu, it prompts: E: You don’t have enough free space in /var/cache/apt/archives/.

There is not enough free space in/var/cache/apt/Archives /. The tips are as follows:


/The files in var/cache/apt/Archives folder are the installation files downloaded when using sudo apt get install appName. These files can be cleaned up. If you are short of system space, you can think of cleaning up from here to get space. The files under my computer are as follows:

linuxidc@ubuntu :~/linuxidc.com$ cd /var/cache/apt/archives
linuxidc@ubuntu :/var/cache/apt/archives$ ls

The cleaning method is simple:

linuxidc@ubuntu :/var/cache/apt/archives$ sudo apt-get clean
[sudo] password for linuxidc:

When you look again, *. DEB file does not exist

Ubuntu Run Error: not syncing : VFS: Unable to mount root

Problem Description:

Previously, Ubuntu needed to be updated, but it was considered to be interrupted in the middle of the update, or it was easy to open and crash later, which was described in the title

When Ubuntu starts, not syncing: VFS: unable to mount root appears

The solution is as follows:

1. After boot, do not directly enter the boot option of Ubuntu, select advanced mode,

2. Then select recovery mode,

3. Select resume resume normal boot

4. After entering the system, open the terminal and input

sudo apt-get autoremove –purge

After running, update grub

sudo update-grub

Done!

Git error: unpack failed: error Missing tree [How to Solve]

I recently created a new warehouse and encountered the following problems when I pushed it. I tried many methods and finally found a solution on stackoverflow, but I tried this method at the beginning, but it didn’t work. As for why this error occurred, I still don’t understand the reason.

git.exe push –progress  “origin” release:refs/for/release%r=xxx

Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 663 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
error: unpack failed: error Missing tree 4201fba85e02299e016f0129621858ec21ac94ae
To (url)
! [remote rejected] release -> refs/for/release%r=xxx(n/a (unpacker error))
error: failed to push some refs to ‘(url)’

git did not exit cleanly (exit code 1) (593 ms @ 2015/5/15 9:51:12)

 

Solution: git push –no-thin origin HEAD:refs/for/release

The solution of insufficient disk space of docker in Ubuntu

First, check the docker location:

docker info

Stop docker service

systemctl stop docker

Look at the high capacity location and create a transfer directory on it

df -h
mkdir -p /home/docker

Take/home/docker as an example. I will transfer the docker of/var/lib/docker to here later.

Migrate the files in/var/lib/docker directory to the target location

sudo rsync -avz /var/lib/docker /home/docker

Create a new/etc/docker/daemon.json file and edit it

There is no such file by default, so you can create and edit it directly with vim
sudo vim /etc/docker/daemon.json
Here is how to use vim.
Press i to enter the insert state and copy the following list into the file
{
  "graph":"/docker/lib/docker"

}
Press Esc to exit the insert state, then press shift+:
and then press wq! Enter to force save the file.
PS. If you encounter any swap file already open when inserting, then sudo rm file name to delete the file

Reload docker and restart docker

systemctl daemon-reload && systemctl restart docker

Check whether the docker is changed to a new directory

docker info

Delete old docker directory

rm -rf /var/lib/docker

[Solved] Python Import mmcv Warning: ImportError: libGL.so.1: cannot open shared object file: No such file or directory

ImportError: libGL.so.1: cannot open shared object file: No such file or directory
centos 7.5 Simply install the relevant dependencies.

 yum install mesa-libGL.x86_64
 
 Installed
  mesa-libGL.x86_64 0:18.3.4-12.el7_9

Installed as a dependency:
  libX11.x86_64 0:1.6.7-3.el7_9       libX11-common.noarch 0:1.6.7-3.el7_9         libXau.x86_64 0:1.0.8-2.1.el7
  libXdamage.x86_64 0:1.1.4-4.1.el7   libXext.x86_64 0:1.3.3-3.el7                 libXfixes.x86_64 0:5.0.3-1.el7
  libXxf86vm.x86_64 0:1.1.4-1.el7     libglvnd.x86_64 1:1.0.1-0.8.git5baa1e5.el7   libglvnd-glx.x86_64 1:1.0.1-0.8.git5baa1e5.el7
  libxcb.x86_64 0:1.13-1.el7          libxshmfence.x86_64 0:1.2-1.el7              mesa-libglapi.x86_64 0:18.3.4-12.el7_9

Done!

Ubuntu 20.04 installation:

(mmdet2) root@ubuntuserver:~# apt install libgl1-mesa-glx
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libgl1 libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0
  libllvm12 libpciaccess0 libsensors-config libsensors5 libvulkan1 libwayland-client0 libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0
  libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxfixes3 libxshmfence1 libxxf86vm1
  mesa-vulkan-drivers
Suggested packages:
  lm-sensors
The following NEW packages will be installed:
  libdrm-amdgpu1 libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libgl1 libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa libglvnd0
  libglx-mesa0 libglx0 libllvm12 libpciaccess0 libsensors-config libsensors5 libvulkan1 libwayland-client0 libx11-xcb1
  libxcb-dri2-0 libxcb-dri3-0 libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-shm0 libxcb-sync1 libxcb-xfixes0 libxfixes3
  libxshmfence1 libxxf86vm1 mesa-vulkan-drivers
0 upgraded, 30 newly installed, 0 to remove and 127 not upgraded.
Need to get 34.3 MB/34.8 MB of archives.
After this operation, 458 MB of additional disk space will be used.
Do you want to continue?[Y/n] y
...
Setting up libgl1-mesa-glx:amd64 (21.0.3-0ubuntu0.1~20.04.1) ...
Processing triggers for libc-bin (2.31-0ubuntu9.2) ...

Try importing again:

(mmdet) [root@node1 ~]# python
Python 3.8.10 (default, Jun  4 2021, 15:09:15)
[GCC 7.5.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mmcv
>>> exit

[Solved] Error reported using telnet command in Centos7: telnet: error while loading shared libraries: libtinfo.so.6

1.Preconditions for solution

LZ found the package libtinfo. So. 5 in the directory/usr/lib64. Although there is no libtinfo. So. 6, there is libtinfo. So. 5, which can be downward compatible. Building a link can solve this problem.

2.Solutions

1. Replace the nonexistent libtinfo. So. 6 library with libtinfo. So. 5 and execute the following command

[root@localhost /]# cd /usr/lib64/
[root@localhost lib64]# ln -s libtinfo.so.5 libtinfo.so.6

2. Execute the telnet command again.

[Solved] Cmake: symbol lookup error: cmake: undefined symbol: archive_write_add_filter_zstd

centOS8(x86_ Cmake-3.18.2-11.el8, which is installed by default in Yum or DNF, cannot be used after installation   cmake: symbol lookup error: cmake: undefined symbol: archive_ write_ add_ filter_ Zstd error.

There are two solutions to this error:

The first one is

Install libarchive

dnf install   libarchive   Or Yum install   libarchive

Second: install a lower or higher version of cmake

1. Uninstall cmake program
Yum remove cmake   or   RPM – e cmake
2. Re install cmake,
website: https://cmake.org/download/
3. Create a soft connection
ln – S  /xx-path/cmake    / usr/bin/cmake

Ubuntu18.04 Compile A40i SDK Error: misc/create_inode.c:395:18: error: conflicting types for ‘copy_file_range‘

Main desktop version:
Linux version 5.4.0-77-generic ( buildd@lgw01 -amd64-021) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #86~18.04.1-Ubuntu SMP Fri Jun 18 01:23:22 UTC 2021

1

Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\${ <-- HERE ([^ \t=:+{}]+)}/ at /media/nrjd/cqr40_linuxqt_bv3s/buildroot-2017.02.3/output/host/usr/bin/automake line 3936.

Modifybuildroot-2017.02.3/output/host/usr/bin/automakeFile Line 3936

$text =~ s/\${([^ \t=:+{}]+)}/substitute_ac_subst_variables_worker ($1)/ge;

is $text =~ s/\$([^ \t=:+{}]+)/substitute_ac_subst_variables_worker ($1)/ge;
2

misc/create_inode.c:395:18: error: conflicting types for ‘copy_file_range‘

Comment out the header file referenced by buildroot-2017.02.3/output/build/host-e2fsprogs-1.43.3/misc/create_inode.c

//#include <unistd.h>

3

digitlst.cpp:67:13: fatal error: xlocale.h: Not having that file or directory
 #   include <xlocale.h>

Comment out buildroot-2017.02.3/output/build/host-icu-58.2/source/i18n/digitlst.cpp
Referenced headers

//#   include <xlocale.h>

other

Unescaped left brace in regex is illegal here in regex; marked by <-- HERE in m/\${ <-- HERE ?PACKAGE}?/ at /media/nrjd/cqr40_linuxqt_bv3s/buildroot-2017.02.3/output/host/usr/bin/intltool-update line 1115.

Wrap the first { in curly brackets ] , such as

$varhash{"PACKAGE"} = $name if (not $name =~ /\${?PACKAGE}?/);

Amend to read

$varhash{"PACKAGE"} = $name if (not $name =~ /\$[{]?PACKAGE}?/);