make的时候出现/bin/sh: 1: convert: not found

问题描述

在编译mjpg-streamer-code时,出现如下报错

goahead@Ubuntu20~/Desktop/mjpj/install/mjpg-streamer-code/mjpg-streamer$ make
make -C plugins/input_testpicture all
make[1]: Entering directory '/home/goahead/Desktop/mjpj/install/mjpg-streamer-code/mjpg-streamer/plugins/input_testpicture'
convert pictures/960x720_1.jpg -resize 640x480! pictures/640x480_1.jpg
/bin/sh: 1: convert: not found
make[1]: *** [Makefile:64: pictures/640x480_1.jpg] Error 127
make[1]: Leaving directory '/home/goahead/Desktop/mjpj/install/mjpg-streamer-code/mjpg-streamer/plugins/input_testpicture'
make: *** [Makefile:70: input_testpicture.so] Error 2

分析问题

从报错中可读性语句 /bin/sh: 1: convert: not found 来看,错误原因为系统中找不到名为 “convert” 的命令

注:"convert"是Imagemagick软件包中的一个工具,用于图像处理和转换。

解决方案

在Ubuntu系统上,可以通过运行以下命令来安装Imagemagick:

sudo apt-get install imagemagick

测试

安装完成后执行make:

goahead@Ubuntu20~/Desktop/mjpj/install/mjpg-streamer-code/mjpg-streamer</b></font>$ make
make -C plugins/input_testpicture all
make[1]: Entering directory &apos;/home/goahead/Desktop/mjpj/install/mjpg-streamer-code/mjpg-streamer/plugins/input_testpicture&apos;
convert pictures/960x720_1.jpg -resize 640x480! pictures/640x480_1.jpg
convert pictures/960x720_1.jpg -resize 320x240! pictures/320x240_1.jpg
convert pictures/960x720_1.jpg -resize 160x120! pictures/160x120_1.jpg
convert pictures/960x720_2.jpg -resize 160x120! pictures/160x120_2.jpg
convert pictures/960x720_2.jpg -resize 320x240! pictures/320x240_2.jpg
convert pictures/960x720_2.jpg -resize 640x480! pictures/640x480_2.jpg
converting file: 160x120_1.jpg
converting file: 320x240_1.jpg
converting file: 640x480_1.jpg
converting file: 960x720_1.jpg
converting file: 160x120_2.jpg
converting file: 320x240_2.jpg
converting file: 640x480_2.jpg
converting file: 960x720_2.jpg
arm-linux-gnueabihf-gcc -O2 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC -o input_testpicture.so input_testpicture.c
make[1]: Leaving directory &apos;/home/goahead/Desktop/mjpj/install/mjpg-streamer-code/mjpg-streamer/plugins/input_testpicture&apos;
cp plugins/input_testpicture/input_testpicture.so .
make -C plugins/input_file all
make[1]: Entering directory &apos;/home/goahead/Desktop/mjpj/install/mjpg-streamer-code/mjpg-streamer/plugins/input_file&apos;
arm-linux-gnueabihf-gcc -O2 -DLINUX -D_GNU_SOURCE -Wall -shared -fPIC  -o input_file.so input_file.c
make[1]: Leaving directory &apos;/home/goahead/Desktop/mjpj/install/mjpg-streamer-code/mjpg-streamer/plugins/input_file&apos;
cp plugins/input_file/input_file.so .

**运行成功!
**

  • 17
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值