Linux平台软件安装配置笔记

MirrorYuChen
MirrorYuChen
发布于 2024-12-10 / 53 阅读
0
0

Linux平台软件安装配置笔记

1.Emsdk

# 1.源码下载
>> git clone git@github.com:emscripten-core/emsdk.git
# 2.可安装版本查询
>> cd emsdk && ./emsdk list
# 3.安装最新版本emsdk
>> ./emsdk install latest
# 4.激活当前版本emsdk
>> ./emsdk activate latest
# 5.添加系统环境变量
>> vim ~/.zshrc 
export EMSDK=/home/mirror/software/emsdk
export EMSCRIPTEN=/home/mirror/software/emsdk/upstream/emscripten
export EMSDK_NODE=/home/mirror/software/emsdk/node/16.20.0_64bit/bin
export PATH=$PATH:$EMSDK:$EMSCRIPTEN:$EMSDK_NODE
# 6.刷新系统环境变量
>> source ~/.zshrc

2.OpenCV

2.1 依赖项安装

>> sudo sudo apt-get install build-essential
>> sudo sudo apt-get install libgtk2.0-dev libavcodec-dev libavformat-dev libjpeg-dev libswscale-dev libtiff5-dev libgtk2.0-dev
# Ubuntu 20.04
>> sudo sudo apt-get install libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev
# Ubuntu 22.04
>> sudo sudo apt-get install libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-dev
# 查询Ubuntu版本
>> lsb_release -a 
# Ubuntu 20.04
>> sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
# Ubuntu 22.04
>> sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu jammy-security main"
>> sudo sudo apt update
# 修复签名
>> sudo sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
>> sudo sudo apt-get install libjasper1 libjasper-dev
>> sudo sudo apt-get install libavresample-dev ffmpeg 
# Ubuntu 22.04
>> sudo sudo apt-get install libswresample-dev ffmpeg

2.2 源码安装

>> mkdir build && cd build
>> cmake .. -DBuild_opencv_world=ON
>> make -j8 && sudo make install

2.3 环境配置

# 1.编辑配置文件
>> vim /etc/ld.so.conf
# 2.添加如下内容
>> /usr/local/lib
# 3.更新环境变量
>> sudo ldconfig
# 4.查看安装版本
>> opencv_version

3.Protobuf

# 1.源码下载
>> wget https://github.com/protocolbuffers/protobuf/releases/download/v3.18.0/protobuf-all-3.18.0.zip
# 2.源码解压并重命名
>> unzip protobuf-all-3.18.0.zip && move protobuf-all-3.18.0 protobuf
# 3.源码编译及安装
>> ./configure && make -j 8 && sudo make install
# 4.配置proto环境
>> vim ~/.zshrc
export COMMON_BIN=/usr/local/bin
export PATH=$PATH:$COMMON_BIN
>> source ~/.zshrc

4.dotnet

>> mkdir Dotnet && cp [path to place]dotnet-sdk-7.0.410-linux-x64.tar.gz ./
>> cd Dotnet && tar -zxvf dotnet-sdk-7.0.410-linux-x64.tar.gz 
>> rm dotnet-sdk-7.0.410-linux-x64.tar.gz && pwd
/root/software/Dotnet
  • (3) 添加环境变量
# 1.添加环境变量
>> vim ~/.bashrc
export DOTNET_ROOT=/root/software/Dotnet
export PATH:$PATH:$DOTNET_ROOT
# 2.刷新环境变量,使之生效
>> source ~/.bashrc
# 3.查看dotnet信息
>> dotnet --info
.NET SDK:
 Version:   7.0.410
 Commit:    8b4848c3b2

Runtime Environment:
 OS Name:     ubuntu
 OS Version:  22.04
 OS Platform: Linux
 RID:         ubuntu.22.04-x64
 Base Path:   /root/software/Dotnet/sdk/7.0.410/

Host:
  Version:      7.0.20
  Architecture: x64
  Commit:       0fb6ac59fb

.NET SDKs installed:
  7.0.410 [/root/software/Dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 7.0.20 [/root/software/Dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 7.0.20 [/root/software/Dotnet/shared/Microsoft.NETCore.App]

Other architectures found:
  None

Environment variables:
  DOTNET_ROOT       [/root/software/Dotnet]

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download 

5.glfwpack编译安装

# 1.下载meshoptimizer源码
>> git clone --recursive git@github.com:zeux/meshoptimizer.git
# 2.下载basis_universal源码
>> git clone -b gltfpack https://github.com/zeux/basis_universal
# 3.编译工具
>> set basis_universal=[basis_universal路径]
# 使用上面环境变量形式设置basis_universal或直接命令行中将这个替换成你下载basis_universal的路径
>> cmake . -DMESHOPT_BUILD_GLTFPACK=ON -DMESHOPT_BASISU_PATH=basis_universal -DCMAKE_BUILD_TYPE=Release
>> cmake --build . --target gltfpack --config Release

6.OpenMesh

>> wget https://www.graphics.rwth-aachen.de/media/openmesh_static/Releases/11.0/OpenMesh-11.0.0.tar.gz
>> tar -zxvf OpenMesh-11.0.0.tar.gz
>> mv OpenMesh-11.0.0 OpenMesh && cd OpenMesh
>> mkdir build && cd build
>> cmake .. -DCMAKE_BUILD_TYPE=Release
>> make -j 8
>> sudo make install

7.pymeshfix

7.1 源码下载

>> git clone https://github.com/pyvista/pymeshfix && cd pymeshfix

7.2 配置修改

  • (1) pyproject.toml"numpy>=2,<3",改为 "numpy>=1,<2",
  • (2) 当python版本为 3.8.*时,将 setup.py里面 python_requires=">=3.9",改成 python_requires=">=3.8"
  • (3) 安装:
>> pip install .

8.miniconda

>> curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
>> bash Miniconda3-latest-Linux-x86_64.sh

参考资料


评论