今天開會同事說安裝Moxa的Nport driver 在Ubuntu 20.04上無法complier
所以我自己下載了一個ubuntu 20.04安裝看看 結果成功了
首先到moxa網站如下網址下載driver
解開這個檔案後裡面有一個readme.txt 打開會寫如何安裝driver 然後有一個system Requirement如下所示 所以就照順序每個套件安裝
System Requirement
To install this driver, you will need NPort Server and one of the
following system.
- kernel 3.0 or above and the kernel source package
- gcc-2.7.2.1 or above
- ld.so-1.7.14 or above
- libc.so-5 or above
- binutils-2.7.0 or above
- make-3.74 or above
- gunzip-1.2.4 or above
- gawk-3.1.1.9 or above
- openssl-1.0.0 or above (For Secure Real COM Mode only)
- libssl-dev-1.0.0 or above (For Secure Real COM Mode only)
Additional requirements for Raspbian
- gcc-4.8.3 or above
- ncurses-devel-5.9 or above
- rpi-source, read the instruction from it's website.
1.先安裝Ubuntu 20.04
2.然後安裝gcc 指令如下
sudo apt update
sudo apt install build-essential
3.安裝
libc.so
指令如下
sudo ln -s /lib64/x86_64-linux-gnu/libc.so.6 /lib64/libc.so.6
4.安裝binutils指令如下
sudo apt-get update -y
sudo apt-get install -y binutils-common
5.安裝make指令如下
sudo apt-add-repository ppa:ubuntu-desktop/ubuntu-make
sudo apt-get update
sudo apt-get install ubuntu-make
6.安裝gunzip指令如下
sudo apt-get update -y
sudo apt-get install -y gzip
7.安裝gawk 指令如下
sudo apt-get update -y
sudo apt-get install -y gawk
8.安裝openssl指令如下(nport 6系列才有用)
sudo apt update
sudo apt install openssl
9.安裝libssl指令如下(nport 6系列才有用)
sudo apt install libssl-dev
10.安裝ncurses-devel (樹莓派才需要)
Sudo apt install ncurses-devel
ncurses-devel
11.重新開機
reboot
12.安裝Nport Real TTY drivers for Linux 5.x.x
解壓縮到moxa目錄 cd到 moxa目錄執行
sudo ./mxinst
然後出現如下字串安裝成功
===============================================================================
Installation process is completed.
The all driver files are installed on /usr/lib/npreal2/driver.
Now you can cd /usr/lib/npreal2/driver and run ./mxaddsvr to add tty port.
===============================================================================
安裝過程截圖如下
沒有留言:
張貼留言