opencv 无法找到软件包libjasper-dev

o7jaxewo  于 2022-11-15  发布在  其他
关注(0)|答案(5)|浏览(220)

我想在ubuntu 17.04中安装opencv,并且我知道碧玉库已从ubuntu 17.04中删除
我应该怎么做才能正确安装opencv?2?3?
我尝试使用以下两个显示here的命令,但它不起作用
sudo apt-获取安装opencv-数据
sudo apt-get安装libopencv-dev

eivnm1vs

eivnm1vs1#

使用以下命令:

sudo add-apt-repository 'deb http://security.ubuntu.com/ubuntu xenial-security main'
sudo apt update
sudo apt install libjasper1 libjasper-dev

在我的Ubuntu 18.04中,我用单引号代替了双引号,但我得到了这个错误:

Error: need a single repository as argument
44u64gxh

44u64gxh2#

尝试this answer
您将能够从以前的发行版安装libjasper-dev

gev0vcfq

gev0vcfq3#

在Ubuntu 18.04下,如果你直接add-apt-repository会遇到另一个GPG错误。

$ sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"

W: An error occurred during the signature verification. The repository is not updated and the previous index files will be used. GPG error: https://dl.yarnpkg.com/debian stable InRelease: The following signatures were invalid: ...EXPKEYSIGhttps://dl.yarnpkg.com/debian/dists/stable/InRelease  The following signatures were invalid: EXPKEYSIG ...

您必须更新密钥

sudo apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com

现在可以安全地安装libjasper-dev了。

sudo apt-get install libjasper-dev

参考文献

zbq4xfa0

zbq4xfa04#

要将最新版本的libjasper构建为Ubuntu的软件包,请执行以下操作:
从以下位置下载碧玉源代码:https://github.com/jasper-software/jasper/tree/version-2.0.25
运行以下脚本:

#!/bin/bash

VERSION=2.0.25

unzip jasper-version-$VERSION.zip
cd jasper-version-$VERSION
mkdir compile

SOURCE_DIR=`pwd`
BUILD_DIR=compile
INSTALL_DIR=/usr
OPTIONS=

cmake -G "Unix Makefiles" -H$SOURCE_DIR -B$BUILD_DIR -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR $OPTIONS

cd compile
make clean all

cat >description-pak <<EOF
JasPer Image Processing/Coding Tool Kit
EOF

fakeroot checkinstall --fstrans --install=no --pkgname=libjasper --pkgversion=$VERSION --pkgrelease 1 --pkglicense="JasPer 2.0" \
         bash -c "make install" </dev/null

mv libjasper_$VERSION-1_amd64.deb ../..
cd ../..
rm -rf jasper-version-$VERSION

结果是一个可以使用dpkg或apt安装的Debian软件包。

4c8rllxm

4c8rllxm5#

此解决方案在mendel(debian)arm 64架构上进行了测试。是否适用于Ubuntu尚不清楚。
打开终端并运行以下命令:

cd /etc/apt/sources.list.d
sudo nano multistrap-main.list

添加以下两行:

deb http://ports.ubuntu.com/ubuntu-ports xenial-security main
deb http://ports.ubuntu.com/ubuntu-ports impish main

保存并退出。然后运行:

sudo apt update

如果缺少密钥,请使用以下命令并再次运行更新:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <key>

然后安装碧玉:

sudo apt-get install libjasper-dev

最后,从multistrap-main. list中删除或注解掉添加的存储库。

相关问题