Article directory
- 1.qdebug does not output:
- 2. Release of program:
- 3.mysql related
- 4. Unable to debug, reporting no debugger:
- 5.Camera Viewing
- 6.No lsusb
- 7. Compile opencv
- 8. It is normal to use QCamera on the development machine, but there is no response on the client machine and the available camera cannot be found.
- 9. Write the password directly in the script, and there is no need to enter the password when running a program with sudo.
- 10. No ifconfig
1.qdebug does not output:
https://blog.csdn.net/qq_43166035/article/details/124085036
First find 00deepin-dde-env through the following command, and then follow the above tutorial.
sudo find / -name *dde-env
2. Release of program:
https://blog.csdn.net/xiaobai_cpp/article/details/125506593
When it comes to mysql, you need to copy the libmysqlclient.so together. The
above article mentioned that you need to copy the folder in the plugins to the same file as the executable file. This problem in the level directory can actually be solved by modifying the startup script: copy the plugins folder directly to the executable file directory instead of copying one by one.
#!/bin/bash
export QT_PLUGIN_PATH=$(pwd)/plugins
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)
sudo -E env LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd) ./MyApp
# 配合上面的export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd),理论上可以这样用;
# 但是实际上不可以,不知道为啥
#sudo -E ./MyApp
3.mysql related
Install mysql:
https://www.cnblogs.com/jasonx1an/p/16690866.html
Remember to install devlop
when compiling qtmysql:
After modifying the source code (shielding two places), use a statement similar to the following to initialize the compilation step,
/home/openeuler/Qt5.15/5.15.2/gcc_64/bin/qmake "INCLUDEPATH+=/usr/include/mysql" "LIBS+=/usr/lib64/mysql/libmysqlclient.a" mysql.pro
Then make make install
4. Unable to debug, reporting no debugger:
sudo yum install gdb
5.Camera Viewing
sudo yum install cheese
6.No lsusb
sudo yum install usbutils
7. Compile opencv
https://www.huawei.com/cn/open-source/blogs/setting-up-environment-testing-opencv440-on-openeuler
8. It is normal to use QCamera on the development machine, but there is no response on the client machine and the available camera cannot be found.
Mainly because some dynamic libraries have not been copied yet. (Note that you must first copy the plugins according to point 2, and prepare the corresponding startup script)
Copy the ldd_copy.sh script mentioned in point 2 to the audio and mediaservice directories under Qt's plugins directory, and use them respectively. This script collects dependent libraries from the so files inside, and then copies the files collected in lib to the same directory as the executable program. Then it's ok.
9. Write the password directly in the script, and there is no need to enter the password when running a program with sudo.
! ! ! Please use this with caution and fully understand the risks of password exposure before using it! ! !
! ! ! Please use this with caution and fully understand the risks of password exposure before using it! ! !
! ! ! Please use this with caution and fully understand the risks of password exposure before using it! ! !
#!/bin/bash
password="123456" # 将此处的密码替换为实际密码
echo $password | sudo -S ./myApp
10. No ifconfig
sudo yum install net-tools