Error while running raspi function to connect to external Raspberry Pi 3.

8 次查看(过去 30 天)
How can I solve the following issue? Thanks :)
mypi = raspi('xxxx','xxxxx','xxxxx')
### Updating Raspberry Pi I/O server...
### Connecting to board...
### Connected to xxxxx...
### Installing nanomsg Library (this might take a while)...
### Creating server folder...
### Transferring source files...
### Building MATLAB I/O server...
Error using raspi.internal.updateServer (line 114)
Error executing command "make -C /opt/MATLAB/server_v18.1.0 -f Makefile".
Details:
STDERR: auth.c: In function âverifyHashâ:
auth.c:28:5: warning: ignoring return value of âftruncateâ, declared
with attribute warn_unused_result [-Wunused-result]
ftruncate(fileno(fp), 0);
^
server.c:14:24: fatal error: nanomsg/nn.h: No such file or directory
compilation terminated.
make: *** [obj/server.o] Error 1
STDOUT: make: Entering directory '/opt/MATLAB/server_v18.1.0'
[Compiling] auth.c
gcc -c -O2 -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_
-DNANOMSG_TRANSPORT=1 auth.c -o obj/auth.o
[Compiling] server.c
gcc -c -O2 -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_
-DNANOMSG_TRANSPORT=1 server.c -o obj/server.o
Makefile:53: recipe for target 'obj/server.o' failed
make: Leaving directory '/opt/MATLAB/server_v18.1.0'
Error in raspi.updateServer (line 1290)
raspi.internal.updateServer(varargin{:});
Error in raspi/launchServer (line 861)
raspi.updateServer(obj.DeviceAddress,...
Error in raspi (line 207)
launchServer(obj);

回答(5 个)

Carroll Guertin
Carroll Guertin 2018-7-11
编辑:Walter Roberson 2019-3-5
ssh or use command line in pi's desktop
Run these commands:
sudo apt-get update
sudo apt-get install libnanomsg-dev libasound2-dev
  3 个评论

请先登录,再进行评论。


afagh mohagheghi
afagh mohagheghi 2019-1-21
Same issue here, tried everything suggested, it did'nt work, any suggestions?

David
David 2019-3-3
Hi,
Did you solve the problem? I'm facing the same issue here. I have installed the required packages through MATLAB Support Package for Raspberry Pi Hardware. The set up seemed to be completed, but when I try to create de raspi object with raspi() I get the same error than you do.
  4 个评论

请先登录,再进行评论。


Osman Ertunc
Osman Ertunc 2019-6-27
Hello guys, Did anybody solve this I have been trying for ages. Please write something here if you found a solution. I don't even have to know the solution. It is enough for me to know that there is a solution for this.
  2 个评论
Carroll Guertin
Carroll Guertin 2019-6-27
Hi Osman, Have you tried the apt-get commands and/or the "Hardware Setup" app that I wrote about in other comments?
Osman Ertunc
Osman Ertunc 2019-6-27
Yes, I’ve tried it. It gives the same error. Is there any other solution that you could suggest. Genuinely, I am stuck. Also when I try with matlab raspbian image SD card keeps changing the partition. I can’t see what I wrote to SD card. I’ve formatted it in FAT32. But I can’t format it in FAT even with format applications. Currently, I am using 16gb raspberry manufactured SD Card. Any suggestion is fine please let me know!!

请先登录,再进行评论。


Omar Hadeed
Omar Hadeed 2020-4-18

类别

Help CenterFile Exchange 中查找有关 MATLAB Support Package for Raspberry Pi Hardware 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by