installing hdf5, mattorch/matio for lua/torch - lua

I am configuring the packages for torch.I can't install these packages using luarocks.
for the matio, I followed the instruction on github, the matio is installed. But I cannot require it.
for the hdf5,see following.
Does anyone know what is the problem? I am new to Lua. Thanks very much!
$luarocks install hdf5
then I got the error information:
CMake Error at /usr/local/Cellar/cmake/3.5.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find HDF5: Found unsuitable version "", but required is at least
"1.8" (found HDF5_hdf5_LIBRARY-NOTFOUND)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.5.1/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:386 (_FPHSA_FAILURE_MESSAGE)
/usr/local/Cellar/cmake/3.5.1/share/cmake/Modules/FindHDF5.cmake:398 (find_package_handle_standard_args)
CMakeLists.txt:4 (FIND_PACKAGE)
-- Configuring incomplete, errors occurred!
See also "/tmp/luarocks_hdf5-20-0-5408/torch-hdf5/build/CMakeFiles/CMakeOutput.log".
make: *** No targets specified and no makefile found. Stop.
Error: Build error: Failed building.

I encountered the same problem on ubuntu >= 13.04, this command solves my problem:
sudo apt-get install libhdf5-serial-dev hdf5-tools
Then you can use luarocks to install hdf5
luarocks install hdf5
For other systems, you can reference this link for dependencies.

Related

Installing Avro in freebsd platform

I am facing the following error while installing avro-c package on freebsd platform.
CMake Error at CMakeLists.txt:39 (message):
Cannot determine Avro version number
-- Configuring incomplete, errors occurred!
I have downloaded the latest source code from https://github.com/confluentinc/avro-c-packaging. Have used the following step to install-
mkdir build
cd build
cmake ../
I was expecting the package to get installed.

building OpenCV as deb package: CPackDeb: file utility is not available

I'm building OpenCV 4.1 as a deb package on Ubuntu 18.04. After success in building libraries. I'm calling make package and getting the following error:
CPack: Create package
CMake Error at /usr/share/cmake-3.10/Modules/CPackDeb.cmake:622 (message):
CPackDeb: file utility is not available. CPACK_DEBIAN_PACKAGE_SHLIBDEPS
and CPACK_DEBIAN_PACKAGE_GENERATE_SHLIBS options are not available.
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/CPackDeb.cmake:1119 (cpack_deb_prepare_package_vars)
Does anybody have any ideas on how to fix it?
Just need to install file package: apt install file

Erlang installation giving erlang-mode is broken error

I am trying to install Elixir from the elixir website on Ubuntu 14.04. I get the following error when I execute $ sudo apt-get install esl-erlang. Can anyone help me out here ?
$ sudo apt-get install esl-erlang
Reading package lists... Done
Building dependency tree
Reading state information... Done
esl-erlang is already the newest version.
The following packages were automatically installed and are no longer required:
libgconf2-4 python-requests-whl python-setuptools-whl python-six-whl
python-urllib3-whl python-wheel
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 406 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up erlang-mode (1:21.0.5-1) ...
ERROR: erlang-mode is broken - called emacs-package-install as a new-style add-on, but has no compat file.
Install emacsen-common for emacs23
emacsen-common: Handling install of emacsen flavor emacs23
Wrote /etc/emacs23/site-start.d/00debian-vars.elc
Wrote /usr/share/emacs23/site-lisp/debian-startup.elc
Install emacsen-common for emacs24
emacsen-common: Handling install of emacsen flavor emacs24
Wrote /etc/emacs24/site-start.d/00debian-vars.elc
Wrote /usr/share/emacs24/site-lisp/debian-startup.elc
Install erlang-mode for emacs
Install erlang-mode for emacs23
install/erlang: Handling install for emacsen flavor emacs23
Wrote /usr/share/emacs23/site-lisp/erlang/erlang-edoc.elc
Wrote /usr/share/emacs23/site-lisp/erlang/erlang-eunit.elc
Wrote /usr/share/emacs23/site-lisp/erlang/erlang-flymake.elc
Wrote /usr/share/emacs23/site-lisp/erlang/erlang-skels-old.elc
Wrote /usr/share/emacs23/site-lisp/erlang/erlang-skels.elc
Wrote /usr/share/emacs23/site-lisp/erlang/erlang-start.elc
Wrote /usr/share/emacs23/site-lisp/erlang/erlang.elc
Wrote /usr/share/emacs23/site-lisp/erlang/erlang_appwiz.elc
In toplevel form:
erldoc.el:64:1:Error: Cannot open load file: cl-lib
Wrote /usr/share/emacs23/site-lisp/erlang/path.elc
ERROR: install script from erlang-mode package failed
dpkg: error processing package erlang-mode (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
erlang-mode
E: Sub-process /usr/bin/dpkg returned an error code (1)
Thanks
I don't know what is causing your errors, but you could try ASDF with the Elixir plugin. This allows you to install multiple versions of Elixir and its dependencies, and uses your user environment with shims instead of installing to system directories. This avoids many of the dependency and permission problems that comes with performing a single system-level installation.
It looks like you have both emacs23 and emacs24 installed. The failure is happening when trying to build for emacs23. Unless you really want emacs23 for some reason, remove it and then it should install fine:
sudo apt-get remove emacs23
It is possible you might have to delete some of the other emacs23-* packages by hand.
This problem only affects the erlang-mode package, which adds support for editing Erlang code in Emacs. If you're not using Emacs (or not developing Erlang in it), you can just uninstall that package:
sudo apt remove erlang-mode
As noted in Penguin Brian's answer, this happens when installing erlang-mode on a system using Emacs 23, as erlang-mode only supports Emacs 24 or newer. (Looks like this is a bug in the package: it shouldn't try to compile itself for unsupported Emacs versions.) If you do want to use erlang-mode in Emacs, I'd suggest running Emacs 24 and installing the Erlang mode from MELPA.

What CUDA version does torch/lua require?

I'm trying to install Torch/Lua version and am getting the build errors shown below. I see this discussion on Github encountering the same errors, but I don't see a resolution to it.
https://github.com/torch/torch7/issues/670
What version of CUDA does torch require? My best guess right now is that this is a CUDA version mismatch.
CMake Error at THC_generated_THCBlas.cu.o.cmake:267 (message):
Error generating file
~/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCBlas.cu.o
CMake Error at THC_generated_THCSleep.cu.o.cmake:267 (message):
Error generating file
~/torch/extra/cutorch/build/lib/THC/CMakeFiles/THC.dir//./THC_generated_THCSleep.cu.o
lib/THC/CMakeFiles/THC.dir/build.make:392: recipe for target 'lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o' failed
make[2]: *** [lib/THC/CMakeFiles/THC.dir/THC_generated_THCBlas.cu.o] Error 1
It appears that these issues were related to the g++ version I had (4.8). I installed the latest g++ version (5.2), then had to delete the torch directory, re-clone it, and the installation worked. Note that build artifacts will be left over so actually removing the whole torch directory was necessary.

Compilation project with Cmake . I'm getting an error

I'm trying to compile a project with CMake. I'm getting an error:
Found OpenCV Windows Pack but it has not binaries compatible with your
configuration.
You should manually point CMake variable OpenCV_DIR to your build of OpenCV
library.
Call Stack (most recent call first):
CMakeLists.txt:9 (FIND_PACKAGE)
CMake Error at CMakeLists.txt:9 (FIND_PACKAGE):
Found package configuration file:
C:/Users/Ghenja/AppData/Local/opencv/build/OpenCVConfig.cmake
but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
NOT FOUND.
I don't understand what is happening. Please help me to solve this problem.
Clean your project and remove CMakeCache.txt. OpenCV_FOUND is probably cached now.
If that doesn't work, then run your cmake command with additional flags just to be sure:
cmake -DOpenCV_FOUND:BOOL=ON -DOpenCV_DIR=/path/to/your/OpenCV

Resources