beremiz笔记chatgpt,部署在Ubuntu:20.04版本

要在 Ubuntu 20.04 上安装 Beremiz,您可以按照以下步骤进行:

  1. 安装系统依赖项

    打开终端,执行以下命令以安装所需的系统包:

    bash 复制代码
    sudo apt-get update
    sudo apt-get install build-essential automake flex bison mercurial \
     libgtk-3-dev libgl1-mesa-dev libglu1-mesa-dev \
     libpython3.8-dev libssl-dev \
     python3.8 virtualenv cmake git

    请注意,libpython3.8-devpython3.8 的版本可能需要根据您的系统环境进行调整。

  2. 获取源代码

    在您的主目录下创建一个名为 Beremiz 的目录,并进入该目录:

    bash 复制代码
    mkdir ~/Beremiz
    cd ~/Beremiz

    然后,使用 Mercurial 克隆 Beremiz 和 MATIEC 的源代码:

    bash 复制代码
    hg clone https://hg.beremiz.org/beremiz
    hg clone https://hg.beremiz.org/matiec
    #或者,最好有梯子
    cd ~/Beremiz
    git clone https://github.com/beremiz/beremiz
    git clone https://github.com/beremiz/matiec

    如果您的系统未安装 Mercurial,可以使用以下命令安装:

    bash 复制代码
    #不知道是干什么的,没有运行这条命令
    sudo apt-get install mercurial
  3. 设置 Python 环境

    创建一个虚拟环境并激活:

    bash 复制代码
    virtualenv ~/Beremiz/venv
    source ~/Beremiz/venv/bin/activate

    然后,安装所需的 Python 包:

    bash 复制代码
    pip install -r ~/Beremiz/beremiz/requirements.txt

使用ubuntu:20.04,部分工具的版本不支持






遇到下面这个问题,更新git,让后再运行一下

sudo apt-get update

sudo apt-get install build-essential libgtk-3-dev

pip install wxPython

pip install -r ~/Beremiz/beremiz/requirements.txt

复制代码
   aiofiles==24.1.0
   aiosqlite==0.20.0
   asyncua @ git+https://github.com/FreeOpcUa/opcua-asyncio.git@98a64897a2d171653353de2f36d33085aef65e82
   attrs==24.2.0
   autobahn==23.1.2
   Automat==24.8.1
   Brotli==1.1.0
   cffi==1.17.1
   click==8.1.7
  constantly==23.10.4
  contourpy==1.1.1
  cryptography==44.0.0
  cycler==0.12.1
  erpc @ git+https://[email protected]/beremiz/erpc.git@d8fff72b15274b5f2a8f7895d9bc5c91eef584ec#subdirectory=erpc_python
  fonttools==4.55.3
  hyperlink==21.0.0
  idna==3.10
  ifaddr==0.2.0
  incremental==24.7.2
  kiwisolver==1.4.7
  lxml==5.3.0
  matplotlib==3.7.5
  msgpack==1.1.0
  Nevow @ git+https://[email protected]/beremiz/nevow-py3.git@81c2eaeaaa20022540a98a3106f72e0199fbcc1b
  numpy==1.24.4
  packaging==24.2
  pillow==10.4.0
  pycountry==24.6.1
  pycparser==2.22
  pyparsing==3.1.4
  python-dateutil==2.9.0.post0
  pytz==2024.2
  setuptools==75.3.0
  six==1.17.0
  sortedcontainers==2.4.0
  sslpsk @ git+https://[email protected]/beremiz/sslpsk.git@9cb31986629b382f7427eec29ddc168ad21c7d7c
  Twisted==24.11.0
  txaio==23.1.1
  typing_extensions==4.12.2
  wxPython==4.2.2
  zeroconf==0.136.2
  zope.interface==7.2
  1. 构建 MATIEC 编译器
    进入 MATIEC 目录并构建:

    bash 复制代码
    cd ~/Beremiz/matiec
    autoreconf -i
    ./configure
    make

问题:

方法:apt-get install bison

apt-get install flex

make的结果

  1. (可选)构建其他库

    如果需要支持 CANopen、Modbus 或 BACnet,可以按照以下步骤构建相应的库:

    • 构建 CanFestival(仅需在需要 CANopen 支持时)

      bash 复制代码
      cd ~/Beremiz
      hg clone http://hg.beremiz.org/canfestival
      cd ~/Beremiz/canfestival
      ./configure --can=virtual
      make
    • 构建 Modbus 库(仅需在需要 Modbus 支持时)

      bash 复制代码
      cd ~/Beremiz
      hg clone http://hg.beremiz.org/Modbus
      cd ~/Beremiz/Modbus
      make
    • 构建 BACnet(仅需在需要 BACnet 支持时)

      bash 复制代码
      cd ~/Beremiz
      svn checkout https://svn.code.sf.net/p/bacnet/code/trunk/bacnet-stack/ BACnet
      cd BACnet
      make MAKE_DEFINE='-fPIC' MY_BACNET_DEFINES='-DPRINT_ENABLED=1 -DBACAPP_ALL -DBACFILE -DINTRINSIC_REPORTING -DBACNET_TIME_MASTER -DBACNET_PROPERTY_LISTS=1 -DBACNET_PROTOCOL_REVISION=16' library
  2. 启动 Beremiz IDE

    在虚拟环境中,运行以下命令启动 Beremiz IDE:

    bash 复制代码
    ~/Beremiz/venv/bin/python ~/Beremiz/beremiz/Beremiz.py
  3. (可选)运行独立的 Beremiz 运行时

    如果需要运行独立的 Beremiz 服务,可以按照以下步骤:

    bash 复制代码
    mkdir ~/beremiz_runtime_workdir
    ~/Beremiz/venv/bin/python ~/Beremiz/beremiz/Beremiz_service.py -p 61194 -i localhost -x 0 -a 1 ~/beremiz_runtime_workdir

    然后,在 IDE 的项目设置中,将 BeremizRoot/URI_location 设置为 PYRO://127.0.0.1:61194

请注意,Beremiz 的官方文档可能未完全覆盖 Ubuntu 20.04 的安装细节,您可能需要根据实际情况进行调整。 此外,Beremiz 的开发者邮件列表中有关于在 Ubuntu 20.04 上安装的讨论,您可以参考这些讨论以获取更多信息。 citeturn0search3

相关推荐
开发小能手-roy35 分钟前
ubuntu 安装mysql
mysql·ubuntu·adb
weixin_4284984935 分钟前
Linux系统perf命令使用介绍,如何用此命令进行程序热点诊断和性能优化
linux·运维·性能优化
V---scwantop---信1 小时前
热门索尼S-Log3电影感氛围旅拍LUTS调色预设 Christian Mate Grab - Sony S-Log3 Cinematic LUTs
笔记
Long_poem1 小时前
【自学笔记】PHP语言基础知识点总览-持续更新
android·笔记·php
lemon3106242 小时前
dockerfile制作镜像
linux·运维·服务器·学习
易保山3 小时前
MIT6.S081 - Lab5 Lazy(延迟分配)
linux·操作系统·c
大桶矿泉水3 小时前
RK3588使用笔记:debian/ubuntu/麒麟系统下基础功能配置(不定期更新)
ubuntu·rk3588·银河麒麟
YYYYYY020203 小时前
材质及制作笔记
笔记·材质
陈阳羽4 小时前
云服务器Ubuntu安装宝塔面板MongoDB修改配置文件本地连接
服务器·mongodb·ubuntu
想躺在地上晒成地瓜干4 小时前
树莓派超全系列文档--(14)无需交互使用raspi-config工具其一
linux·树莓派·raspberrypi·树莓派教程