Linux common problems and Solutions

>Linux FAQs and solutions, continuous updates…
> bbb>/ font>>>>>>>

./mnist_caffe: error while loading shared libraries: cannot open shared object file: No such file ordirectory

libarmnn.socode>./mnist_caffecode> . actually libarmnn. So is already compiled file, the directory is /home/lg/armnnSDK armnn .
home /lg/armnnSDK/armnn
<>ode>sudo />/ ldconfig
<>de>/home/lg/armnnSDK/armnn sudo /sbin/ldconfig However, this is generally not done for self-compiled files, and self-compiled libraries generally use method two configuration path. export LD_LIBRARY_PATH=/home/lg/armnnSDK/armnn:$LD_LIBRARY_PATH LD_LIBRARY_PATH=/home/lg/armnnSDK/armnn:$LD_LIBRARY_PATH if this only takes effect at the current terminal.
2. Check the static library which contained in o file
ar - TV libXXX. A
3. View the static library or o what functions contained in
objdump - tT libXXX. A or objdump - tT libXXX. O
4. How to survive the static library
ar - RCS libXXX. A A.o B.o
with A.o and B.o with the following method to generate, specify the GCC -c is generated by the o file:
GCC - c - O3 A.c - i./, GCC - c - O3 biggest - i./
5. Statistical number of files and folders
in the current directory file number: the ls -l | grep "^ -" | wc -l
in the current directory. O number at the end of the file: ls -l *. O | grep "^ -" | wc -l
the current number of directories and subdirectories file: ls - lR | grep "^ -" | wc -l
in the current directory folder contains the number of folders: ls -l | grep "^ d | wc -l
number of the current folder and subfolders contained in the folder ls - lR | grep" ^ d | wc -l
6. Linux system (Linux server and Linux device, IPC, etc.) mount Windows directory
cifs mount
for embedded development tend to the source code on Windows, Compile on Linux, if you mount the Windows directory under Linux will greatly improve the development efficiency.
for IPC, serial logins IPC, into the root directory of the IPC /, in the mount point choices /MNT or /TMP , may also be other directory.
mount -t the IP address of the cifs// Windows/on Windows to the Shared folder name/MNT/hardpoints name -o username = XXX, password = XXX
for example, set up a folder in Windows' D set the win - MNT , and then set up a Shared, assuming that the IP address of the Windows is , Mount way is:
mount -t cifs// - MNT/MNT -o username = garylau, password = mypasswd
for Linux system other equipment is also similar, creating good to mount the directory under Linux (mount point), Windows directory can be mounted to the Linux hardpoints.
delete mount: umount,/MNT
sometimes need to hardpoints under Linux has the authority to read not only must have the write permissions, this instruction need to add the dir_mode = 7, 77, file_mode = 0777 , namely:
mount -t the IP address of the cifs// Windows/on Windows to the Shared folder name/MNT/hardpoints name -o username = XXX, password = XXX, dir_mode = 0777, file_mode = 0777
if the mount times the following error, is due to the NFS (Network File System, a Network File System server) has multiple versions, V2, V3, V4, and all versions run at the same time, so you need to specify the version number when mounting. mount -t cifs //Windows IP address /Windows to share folder name/MNT/mount point name -o username=XXX, password=XXX, vers=2.1

mount error(121): Remote I/O error
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

> Download nfs1219.exe, use this software to share the directory to Linux under Windows as NFS format, and then use the instruction unt -t nfs-o nolock windowsIP:/ Windows/under disk/path MNT / t>unt. D :\win-mnt \ nfs-o nolock D /win-mnt / \>-o nolock D /win-mnt /
7. Find the current in all the files in the directory containing a string
find./| xargs grep - ri "VGGNetBody"
if you want to list only the file name is combined with the -l
find./| xargs grep - ri "VGGNetBody - l"
8. #include < include < #include < #include < math.h> While the function in the add the header files, but will still be submitted to the at compile time undefined reference to SQRT mistake, at this point in the compilation instructions add - lm, reference here.
br> >
ery Linux system has three options to clear the cache without interrupting any processes or services.
code> s>; echo 1 >/proc/sys/vm/drop_caches
remove directory entry and inode
sync; echo 2 >/proc/sys/vm/drop_caches
page caching, directory entries and inode
sync; echo 3 > /proc/sys/vm/drop_caches
10. View Linux system bits

a. getconf LONG_BIT
b. uname -a
c. uname -r
d. cat /proc/version

/ font>>
a. indicate the search path, such as VPATH = SRC include or VPATH %. The CPP SRC , VPATH %. H include , etc.
b. Indicates the final target, such as l: run;>
c. j = main.o factorial.o hello.o;>
d. Generate intermediate target, such as o: %.
e. ear c> :; clean :> Rm *.o run, etc.
kefile filenames can be represented by wildcards. The wildcards available are: *?> ,[...] . However, these wildcards are not used anywhere in a makefile. Wildcards can be used in one of two ways: a. This can be used in the target, dependency of a rule. Make automatically matches makefiles when it reads them (wildcard expansion). B. Can appear in the command of the rule. Wildcard processing is done when this command is executed in the shell.
You cannot use wildcards directly in any context other than these two cases. wildcard

Read More: