Skip to content

Commit

Permalink
add alpine镜像编译libmodbus
Browse files Browse the repository at this point in the history
  • Loading branch information
kaisawind committed Oct 12, 2024
1 parent 71bb145 commit c8b3ac1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions content/post/2024-10-12-libmodbus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
layout: post
title: "alpine镜像编译libmodbus"
date: 2024-10-12 10:02:54
categories: [linux,alpine]
tags: [alpine]
draft: false
excerpt_separator: <!--more-->
---
alpine镜像编译libmodbus
<!--more-->

命令
```bash
docker run --rm --platform linux/arm/v7 -it -v $PWD:/mnt alpine sh

sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
apk update && apk add linux-headers libtool autoconf automake git bash build-base

cd /mnt/ && git config --global --add safe.directory /mnt && git clean -d -x -f

./autogen.sh && mkdir build && ./configure --prefix=/mnt/build --enable-static && make install
```

0 comments on commit c8b3ac1

Please sign in to comment.