From 5cf2d8982984427ca8a367dafc883e2ae6694d8f Mon Sep 17 00:00:00 2001 From: hehaoyang <1109196436@qq.com> Date: Wed, 13 Mar 2024 16:34:53 +0800 Subject: [PATCH] 20240313 --- RK3568/RKMPP库编译.md | 3 +- RK3568/移远/gst-rtsp-server-1.16.3编译.md | 7 ++-- RK3568/移远/系统环境配置(安装QT).md | 21 ++++-------- RK3568/移远/系统环境配置(编译FFmpeg).md | 12 ++----- RK3568/移远/系统环境配置(编译OpenCV).md | 2 +- Ubuntu/curl静态库编译.md | 40 +++++++++++++++++++++++ Ubuntu/scp.md | 13 ++++++++ Ubuntu/动态查看文件.md | 6 ++++ 8 files changed, 74 insertions(+), 30 deletions(-) create mode 100644 Ubuntu/curl静态库编译.md create mode 100644 Ubuntu/scp.md diff --git a/RK3568/RKMPP库编译.md b/RK3568/RKMPP库编译.md index c436282..13c4b08 100644 --- a/RK3568/RKMPP库编译.md +++ b/RK3568/RKMPP库编译.md @@ -26,6 +26,5 @@ SET(CMAKE_CXX_COMPILER "/usr/bin/g++") ``` ./make-Makefiles.bash -make -j4 -make install +make -j4 && make install ``` diff --git a/RK3568/移远/gst-rtsp-server-1.16.3编译.md b/RK3568/移远/gst-rtsp-server-1.16.3编译.md index 5891b22..044eabc 100644 --- a/RK3568/移远/gst-rtsp-server-1.16.3编译.md +++ b/RK3568/移远/gst-rtsp-server-1.16.3编译.md @@ -1,8 +1,6 @@ # gst-rtsp-server-1.16.3 编译 -apt-get install gtk-doc-tools libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio - -apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev +apt install gtk-doc-tools libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev -y tar xvf gst-rtsp-server-1.16.3.tar.xz @@ -12,4 +10,5 @@ cd gst-rtsp-server make -j4 && make install -gcc rtsp-server.c -o rtsp-server $(pkg-config --cflags --libs gstreamer-rtsp-server-1.0 gstreamer-1.0) \ No newline at end of file +gcc rtsp-server.c -o rtsp-server $(pkg-config --cflags --libs gstreamer-rtsp-server-1.0 gstreamer-1.0) +g++ rtsp-server.cpp -o rtsp-server $(pkg-config --cflags --libs gstreamer-rtsp-server-1.0 gstreamer-1.0) \ No newline at end of file diff --git a/RK3568/移远/系统环境配置(安装QT).md b/RK3568/移远/系统环境配置(安装QT).md index 8671c69..fadf802 100644 --- a/RK3568/移远/系统环境配置(安装QT).md +++ b/RK3568/移远/系统环境配置(安装QT).md @@ -2,22 +2,15 @@ ``` apt-get install qt5-default qtcreator -y -``` - -dpkg: error processing package *** (--configure)错误解决办法 - -粗暴方法一:删除所有信息之后update -``` +apt --fix-broken install -y +dpkg -i --force-overwrite /var/cache/apt/archives/dbus-x11_1.12.16-2ubuntu2.3_arm64.deb +dpkg -i --force-overwrite /var/cache/apt/archives/wpasupplicant_2%3a2.9-1ubuntu4.3_arm64.deb +dpkg -i --force-overwrite /var/cache/apt/archives/bluez_5.53-0ubuntu3.7_arm64.deb +apt --fix-broken install -y +apt-get install qt5-default qtcreator -y mv /var/lib/dpkg/info/ /var/lib/dpkg/info_old/ - mkdir /var/lib/dpkg/info/ - apt-get update - apt-get install qt5-default qtcreator -y - apt-get install qtmultimedia5-dev -y -``` - -apt install aptitude -aptitude install qtwayland5 qt5-default qtdeclarative5-dev qtmultimedia5-dev +``` \ No newline at end of file diff --git a/RK3568/移远/系统环境配置(编译FFmpeg).md b/RK3568/移远/系统环境配置(编译FFmpeg).md index 66b3fc6..bec8e88 100644 --- a/RK3568/移远/系统环境配置(编译FFmpeg).md +++ b/RK3568/移远/系统环境配置(编译FFmpeg).md @@ -9,19 +9,17 @@ apt upgrade apt -y install autoconf automake build-essential cmake git-core libass-dev libfreetype6-dev libsdl2-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo wget zlib1g-dev -apt -y install nasm yasm libx264-dev libx265-dev libnuma-dev libvpx-dev libfdk-aac-dev libmp3lame-dev libopus-dev +apt -y install nasm yasm libx264-dev libx265-dev libnuma-dev libvpx-dev libfdk-aac-dev libmp3lame-dev libopus-dev ``` #### 解压 ``` tar -xvf ffmpeg-4.2.9.tar.xz cd ffmpeg-4.2.9/ -./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-filter=delogo --enable-debug --disable-optimizations --enable-shared --enable-pthreads +./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-filter=delogo --enable-debug --disable-optimizations --enable-shared --enable-pthreads make -j4 && make install ``` -./configure --prefix=install --pkg-config-flags="--static" --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-filter=delogo --enable-debug --disable-optimizations --enable-pthreads - #### 添加环境变量 * 在 /etc/profile 文件最后一行添加 @@ -46,8 +44,4 @@ source /etc/profile ``` ldconfig -``` - -./configure --prefix=/usr/local/ffmpeg --enable-gpl --enable-nonfree --enable-libfdk-aac --enable-libx264 --enable-libx265 --enable-filter=delogo --enable-debug --disable-optimizations --enable-shared --enable-pthreads --enable-rkmpp --enable-libdrm - - +``` \ No newline at end of file diff --git a/RK3568/移远/系统环境配置(编译OpenCV).md b/RK3568/移远/系统环境配置(编译OpenCV).md index b84b480..48fe6f6 100644 --- a/RK3568/移远/系统环境配置(编译OpenCV).md +++ b/RK3568/移远/系统环境配置(编译OpenCV).md @@ -107,7 +107,7 @@ cmake -D CMAKE_BUILD_TYPE=RELEASE \ -D WITH_PNG=NO \ -D WITH_JASPER=NO \ -D WITH_TIFF=NO \ - -D WITH_GSTREAMER=OFF \ + -D WITH_GSTREAMER=ON \ -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules \ -D CMAKE_INSTALL_PREFIX=install .. ``` diff --git a/Ubuntu/curl静态库编译.md b/Ubuntu/curl静态库编译.md new file mode 100644 index 0000000..7aaebff --- /dev/null +++ b/Ubuntu/curl静态库编译.md @@ -0,0 +1,40 @@ +1、下载最新的libcurl源代码。 + +wget https://curl.se/download/curl-8.5.0.tar.gz + +tar -zxvf ./curl-8.5.0.tar.gz +cd curl-8.5.0/ +./configure --without-zlib --without-ssl --disable-shared +make -j4 + + +测试代码: +#include +#include "curl/curl.h" + +int main(void) +{ + CURL *curl; + CURLcode res; + + curl = curl_easy_init(); + if(curl) { + curl_easy_setopt(curl, CURLOPT_URL, "http://example.com"); + /* example.com is redirected, so we tell libcurl to follow redirection */ + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); + + /* Perform the request, res will get the return code */ + res = curl_easy_perform(curl); + /* Check for errors */ + if(res != CURLE_OK) + fprintf(stderr, "curl_easy_perform() failed: %s\n", + curl_easy_strerror(res)); + + /* always cleanup */ + curl_easy_cleanup(curl); + } + return 0; +} + +编译: +gcc test_curl.c libcurl.a -DCURL_STATICLIB -lpthread -o test_curl \ No newline at end of file diff --git a/Ubuntu/scp.md b/Ubuntu/scp.md new file mode 100644 index 0000000..0aca246 --- /dev/null +++ b/Ubuntu/scp.md @@ -0,0 +1,13 @@ +# SCP + +#### 将服务器上的文件传输到本地 + +``` +scp username@servername:/path/filename /var/www/local_dir(本地目录) +``` + +#### 将本地文件上传到服务器 + +``` +scp /path/filename username@servername:/path/(服务器目录) +``` diff --git a/Ubuntu/动态查看文件.md b/Ubuntu/动态查看文件.md index 9b20428..10db2a4 100644 --- a/Ubuntu/动态查看文件.md +++ b/Ubuntu/动态查看文件.md @@ -2,4 +2,10 @@ ``` tail -f 文件名 +``` + +查看特定服务(例如 app_service)的实时日志 + +``` +journalctl -u app_service -f ``` \ No newline at end of file