Cannot install OpenCV 4 with new compiler
See original GitHub issueTo help us debug your issue please explain:
- I’ve read the CONTRIBUTING guide.
- I’ve specified the Conan version, operating system version and any tool that can be relevant.
- I’ve explained the steps to reproduce the error or the motivation/use case of the question/suggestion.
I’m trying to install OpenCV 4.1 on Ubuntu 18.04 with GCC 8.3 on Windows Subsystem for Linux. I execute the following line:
conan install opencv/4.1.1@conan/stable -s compiler.version=8.3 --build missing
But the install always fails with the following error:
$ conan install opencv/4.1.1@conan/stable -s compiler.version=8.3 --build missing
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=8.3
os=Linux
os_build=Linux
[options]
[build_requires]
[env]
opencv/4.1.1@conan/stable: Not found in local cache, looking in remotes...
opencv/4.1.1@conan/stable: Trying with 'conan-center'...
Downloading conanmanifest.txt: 100%|##########| 370/370 [00:00<00:00, 243kB/s]
Downloading conanfile.py: 100%|##########| 23.7k/23.7k [00:00<00:00, 715kB/s]
Downloading conan_export.tgz: 100%|##########| 766/766 [00:00<00:00, 504kB/s]
Decompressing conan_export.tgz: 100%|##########| 766/766 [00:00<00:00, 318kB/s]
opencv/4.1.1@conan/stable: Downloaded recipe revision 0
Installing package: opencv/4.1.1@conan/stable
Requirements
eigen/3.3.7@conan/stable from 'conan-center' - Cache
jasper/2.0.14@conan/stable from 'conan-center' - Cache
libjpeg/9c@bincrafters/stable from 'conan-center' - Cache
libpng/1.6.37@bincrafters/stable from 'conan-center' - Cache
libtiff/4.0.9@bincrafters/stable from 'conan-center' - Cache
libwebp/1.0.3@bincrafters/stable from 'conan-center' - Cache
opencv/4.1.1@conan/stable from 'conan-center' - Downloaded
openexr/2.3.0@conan/stable from 'conan-center' - Cache
protobuf/3.5.2@bincrafters/stable from 'conan-center' - Cache
zlib/1.2.11@conan/stable from 'conan-center' - Cache
Packages
eigen/3.3.7@conan/stable:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
jasper/2.0.14@conan/stable:29bbcf4118b4f761868d6e72f92f5d0289052cfe - Cache
libjpeg/9c@bincrafters/stable:9f5d845a9acd4104ba44865c80f5b042812f136e - Cache
libpng/1.6.37@bincrafters/stable:59225615bf8775a59518ed192a7cec51ffbe310b - Cache
libtiff/4.0.9@bincrafters/stable:59225615bf8775a59518ed192a7cec51ffbe310b - Cache
libwebp/1.0.3@bincrafters/stable:4f7fdaf7ecd182f1bc32b35513734e57dafe119a - Cache
opencv/4.1.1@conan/stable:305905e249917d1592f9d00e11473fbe0e953797 - Build
openexr/2.3.0@conan/stable:09936227089d63c9f88c288e4bd6226487595e15 - Cache
protobuf/3.5.2@bincrafters/stable:aac840738b8fdeb0f2a9c4cf135f5833e6b75656 - Cache
zlib/1.2.11@conan/stable:9f5d845a9acd4104ba44865c80f5b042812f136e - Cache
eigen/3.3.7@conan/stable: Already installed!
libjpeg/9c@bincrafters/stable: Already installed!
libwebp/1.0.3@bincrafters/stable: Already installed!
protobuf/3.5.2@bincrafters/stable: Already installed!
zlib/1.2.11@conan/stable: Already installed!
jasper/2.0.14@conan/stable: Already installed!
libpng/1.6.37@bincrafters/stable: Already installed!
libtiff/4.0.9@bincrafters/stable: Already installed!
openexr/2.3.0@conan/stable: Already installed!
Downloading conan_sources.tgz: 100%|##########| 1.77k/1.77k [00:00<00:00, 1.54MB/s]
Decompressing conan_sources.tgz: 100%|##########| 1.77k/1.77k [00:00<00:00, 446kB/s]
opencv/4.1.1@conan/stable: Configuring sources in /home/ruipacheco/.conan/data/opencv/4.1.1/conan/stable/source
Downloading 4.1.1.tar.gz: 100%|##########| 84.3M/84.3M [00:55<00:00, 1.59MB/s]
ERROR: opencv/4.1.1@conan/stable: Error in source() method, line 96
os.rename('opencv-%s' % self.version, self._source_subfolder)
PermissionError: [Errno 13] Permission denied: 'opencv-4.1.1' -> 'source_subfolder'
Same problem happens with OpenCV 3.4.3:
conan install opencv/3.4.3@conan/stable -s compiler.version=8.3 --build missing
[…]
Downloading conan_sources.tgz: 100%|##########| 253/253 [00:00<00:00, 163kB/s]
Decompressing conan_sources.tgz: 100%|##########| 253/253 [00:00<00:00, 111kB/s]
opencv/3.4.3@conan/stable: Configuring sources in /home/ruipacheco/.conan/data/opencv/3.4.3/conan/stable/source
Downloading 3.4.3.zip: 100%|##########| 87.5M/87.5M [01:18<00:00, 1.17MB/s]
Unzipping 174.4MB, this can take a while
Unzipping 100 %
ERROR: opencv/3.4.3@conan/stable: Error in source() method, line 43
os.rename('opencv-%s' % self.version, self._source_subfolder)
PermissionError: [Errno 13] Permission denied: 'opencv-3.4.3' -> 'source_subfolder'
Installing OpenCV without specifying the compiler works well:
conan install opencv/4.1.1@conan/stable
[…]
opencv/4.1.1@conan/stable: Package installed ed7220deebf74e5287fa0580079af7b5f570f1aa
opencv/4.1.1@conan/stable: Downloaded package revision 0
Issue Analytics
- State:
- Created 4 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Not able to build openCV from source
Error occurs when building files using make command. System information (version) OpenCV => 4.5.1 Operating System / Platform => Virtual ...
Read more >Installation of OpenCV 4.1.0 in Windows 10 from source
After providing the path, click on the Configure button. If the build directory doesn't exist then CMake will ask you to give permission...
Read more >Failed to build opencv-python - Stack Overflow
I believe your issue is happening because Cmake cannot find the cl compiler in your system's path. Try to locate it ...
Read more >How to install OpenCV 4 on Ubuntu - PyImageSearch
A. There are a number of pip-installable versions of OpenCV available depending on your operating system and architecture. The problem you may ...
Read more >Install OpenCV 4.5 on Raspberry Pi 4 - Q-engineering
The Python3 installation script is incorrectly modified. It will put all libraries in the wrong directory and Python will not find them. By ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I got the exact same error message but for a different package. After sinking a lot of time into debugging the issue, it turned out that the virusscanner was responsible for this error. After turning off virus scanning everything worked fine…
Then maybe you could try to change the
CONAN_USER_HOME
(https://docs.conan.io/en/latest/reference/env_vars.html#conan-user-home) to see if the permissions issues persist.