ラズベリーパイに接続時のエラー ( Error connecting to raspberry pi. )

ラズベリーパイに接続時にエラーが発生します。
この解決方法を私は知りたいです。
I get an error when connecting to the Raspberry Pi.
I would like to know this solution.
===============================================================================
>> mypi = raspi('aaa,bbb,ccc,ddd,'pi',eee'')
### Updating Raspberry Pi I/O server...
### Connecting to board...
### Connected to 192.168.2.119...
### Installing nanomsg Library (this might take a while)...
### Creating server folder...
### Transferring source files...
### Building MATLAB I/O server...
Error executing command "make ONLY_MATLAB_IO=0 -C /opt/MATLAB/mw_server_v21.1.0 -f Makefile". Details:
STDERR: In file included from sharedServer.c:3:0:
sharedServer.h:28:24: fatal error: nanomsg/nn.h: そのようなファイルやディレクトリはありません
#include <nanomsg/nn.h>
^
compilation terminated.
make: *** [obj/sharedServer.o] エラー 1
STDOUT: make: ディレクトリ '/opt/MATLAB/mw_server_v21.1.0' に入ります
[Compiling] IO_wrapperv4l2.c
gcc -c -g -O0 -D_DEBUG -Wall -I/opt/userland -I/opt/userland/host_applications/linux/libs/bcm_host/include -I/opt/userland/interface/vcos
-I/opt/userland/interface/vcos/pthreads -I/opt/userland/interface/vmcs_host/linux -I/opt/userland/host_applications/linux/apps/raspicam
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DMW_WEBSOC_INUSE -DMW_ENCODER_INUSE IO_wrapperv4l2.c -o obj/IO_wrapperv4l2.o
[Compiling] MW_PWM.c
gcc -c -g -O0 -D_DEBUG -Wall -I/opt/userland -I/opt/userland/host_applications/linux/libs/bcm_host/include -I/opt/userland/interface/vcos
-I/opt/userland/interface/vcos/pthreads -I/opt/userland/interface/vmcs_host/linux -I/opt/userland/host_applications/linux/apps/raspicam
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DMW_WEBSOC_INUSE -DMW_ENCODER_INUSE MW_PWM.c -o obj/MW_PWM.o
[Compiling] MW_pigs.c
gcc -c -g -O0 -D_DEBUG -Wall -I/opt/userland -I/opt/userland/host_applications/linux/libs/bcm_host/include -I/opt/userland/interface/vcos
-I/opt/userland/interface/vcos/pthreads -I/opt/userland/interface/vmcs_host/linux -I/opt/userland/host_applications/linux/apps/raspicam
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DMW_WEBSOC_INUSE -DMW_ENCODER_INUSE MW_pigs.c -o obj/MW_pigs.o
[Compiling] sharedServer.c
gcc -c -g -O0 -D_DEBUG -Wall -I/opt/userland -I/opt/userland/host_applications/linux/libs/bcm_host/include -I/opt/userland/interface/vcos
-I/opt/userland/interface/vcos/pthreads -I/opt/userland/interface/vmcs_host/linux -I/opt/userland/host_applications/linux/apps/raspicam
-I/opt/nanomsg/include -Winline -pipe -D_DEBUG -D_MATLABIO_ -DMW_WEBSOC_INUSE -DMW_ENCODER_INUSE sharedServer.c -o obj/sharedServer.o
Makefile:77: ターゲット 'obj/sharedServer.o' のレシピで失敗しました
make: ディレクトリ '/opt/MATLAB/mw_server_v21.1.0' から出ます
==========================================================================

 Accepted Answer

こちらのAnswerと同様のエラーのようです。
libnanomsgのパッケージがインストールされていないのかもしれません。
sudo apt-get install libnanomsg-dev libasound2-dev
でパッケージをインストールしてみてはいかがでしょうか。

1 Comment

素早い対応ありがとうございます。
感謝します。
この後もエラーが発生しましたが、
sudo apt-get install libjson-c-dev
を行うことによりクリアしました。

Sign in to comment.

More Answers (0)

Products

Release

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!