il" "-ldl" "-lutil" "-ldl" "-lrt" "-lpthread" "-lgcc_s" "-lc" "-lm" "-lrt" "-lpthread" "-lutil" "-lutil"
= note: /usr/bin/ld: cannot find -lpq
collect2: error: ld returned 1 exit status
error: aborting due to previous error
error: could not compile actix-todo.
To learn more, run the command again with --verbose.
It looks like you are missing the postgresql-libs package. Install it using your systems package manager.
For me I needed to install libpq-dev. You can install it on linux like this:
sudo apt install libpq-dev
Related
I work on Linux Mint and I install lex and yacc with the commands
sudo apt-get update
sudo apt-get install flex
sudo apt-get install bison
Then I create a file with .l extension and when I try to compile it with the commands :
lex ex1.l
gcc lex.yy.c -ll
After that I receive the error: /usr/bin/ld: cannot find -ll
collect2: error: ld returned 1 exit status
The library that comes with flex is called libfl, not libl, so the corresponding flag would be -lfl.
If you define your own main function and disable yywrap, you can also just not link against the library at all.
I have been working on OpenCV installation from the last 4 days but still can't find a way to install it without errors.
collect2: error: ld returned 1 exit status
apps/visualisation/CMakeFiles/opencv_visualisation.dir/build.make:104: recipe for target 'bin/opencv_visualisation' failed
make[2]: *** [bin/opencv_visualisation] Error 1
CMakeFiles/Makefile2:7461: recipe for target 'apps/visualisation/CMakeFiles/opencv_visualisation.dir/all' failed
make[1]: *** [apps/visualisation/CMakeFiles/opencv_visualisation.dir/all] Error 2
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
It shouldn't be too difficult:
# Get all the up-to-date tools you'll need
sudo apt-get update
sudo apt-get install git cmake build-essential
# Get latest greatest OpenCV from GitHub
cd
git clone https://github.com/opencv/opencv.git
# Go build and install that puppy
cd opencv
mkdir build
cd build
cmake ..
make -j 8
sudo make install
Maybe try running the file from this link. The good thing about this is that it abstracts so many things from you. You need not manually run all the commands. Run it on the ubuntu terminal as bash install-opencv.sh.
Just let me know incase of any errors.
I would like to install Circos. I followed the instructions on Circos website. In particular, I checked for missing perl modules. I'm missing several of them:
missing Font::TTF::Font
missing GD
missing GD::Polyline
missing SVG
missing Statistics::Basic
missing Text::Format
So I followed again the instructions about Installing Perl Modules on Mac OS X on Circos website. Specifically, I followed the detailed instructions in Paulo Nuin's blog post. Freetype and Fontconfig were missing and I installed them.
Now, when I run the configuration for libgd-2.2.1, I get this configuration summary:
Support for Zlib: yes
Support for PNG library: yes
Support for JPEG library: yes
Support for WebP library: no
Support for TIFF library: no
Support for Freetype 2.x library: yes
Support for Fontconfig library: yes
Support for Xpm library: no
Support for liq library: no
Support for pthreads: yes
It looks good enough to me. But when I run the make, I get errors:
clang: warning: argument unused during compilation: '-pthread'
ld: malformed 64-bit a.b.c.d.e version number: 4.20201
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [libgd.la] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
Since it was not working, I followed this recommendation on Stackoverflow and I ran
brew install gd
(I had to update brew by doing
cd /usr/local/Library
git pull origin master
following this answer on Stackoverflow.)
But I get an error:
Error: You must `brew link libpng freetype` before gd can be installed
And when I run 'brew link libpng freetype', I get another error:
Linking /usr/local/Cellar/libpng/1.6.21...
Error: Could not symlink bin/libpng-config
Target /usr/local/bin/libpng-config
already exists. You may want to remove it:
rm '/usr/local/bin/libpng-config'
To force the link and overwrite all conflicting files:
brew link --overwrite libpng
To list all files that would be deleted:
brew link --overwrite --dry-run libpng
Any solution to finally be able to run Circos?
Thanks in advance for your help!
Finally, I solved the problem by changing the permissions in /usr/local:
sudo chown -R $(whoami) /usr/local
Following the recommendations on brew webpage.
Once this was solved, I just installed GD in Perl, as described in the last step in Paulo Nuin's post.
I'm using Luarocks 2.2.0beta1 to install luafilesystem on windows 7 with lua 5.2 and mingw. I got this error:
>luarocks install luafilesystem
Installing http://rocks.moonscript.org/luafilesystem-1.6.2-2.src.rock...
Using http://rocks.moonscript.org/luafilesystem-1.6.2-2.src.rock... switching to 'build' mode
mingw32-gcc -O2 -c -o src/lfs.o -IC:/lua/include/src/lfs.c
mingw32-gcc -shared -o lfs.dll src/lfs.o C:/lua/bin/lua52.dll -lm
C:\lua\bin\lua52.dll: file not recognized: File format not recognized
collect2.exe: error: Id returned 1 exit status
Error: Build error: Failed compiling module lfs.dll
any idea how to fix this?
note: until now, I have no problem installing other module with luarocks that have no dependency with luafilesystem.
Solved, this problem arise because actually I'm not using the same MinGW compiler when building lua52.dll. I don't know which compiler I use at the first time. Thanks to #siffiejoe
After running sudo pip3.4 install gdal from terminal (Mac OS X Mavericks) I obtain an error message saying that the 'col_port.h' file was not found and displaying the following error: command '/user/bin/clang/ failed with exit status 1 (the full message is below).
I have gdal 1.11 (the complete framework version downloaded from kingchaos.com) and the most recent version of the Xcode command line tools -Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Here is the error that I get after running the sudo pip3.4 install gdal command:
/usr/bin/clang -fno-strict-aliasing -Werror=declaration-after-statement -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -arch i386 -arch x86_64 -g -I../../port -I../../gcore -I../../alg -I../../ogr/ -I/Library/Frameworks/Python.framework/Versions/3.4/include/python3.4m -I/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/numpy/core/include -I/Library/Frameworks/GDAL.framework/Versions/1.11/include -c extensions/gdal_wrap.cpp -o build/temp.macosx-10.6-intel-3.4/extensions/gdal_wrap.o
extensions/gdal_wrap.cpp:2230:11: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
res = SWIG_AddCast(res);
~~~ ^ ~~~
extensions/gdal_wrap.cpp:2233:11: warning: explicitly assigning a variable of type 'int' to itself [-Wself-assign]
res = SWIG_AddCast(res);
~~~ ^ ~~~
extensions/gdal_wrap.cpp:2535:22: warning: unused variable 'swig_empty_runtime_method_table' [-Wunused-variable]
static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} };/* Sentinel */
^
extensions/gdal_wrap.cpp:2855:10: fatal error: 'cpl_port.h' file not found
#include "cpl_port.h"
^
3 warnings and 1 error generated.
error: command '/usr/bin/clang' failed with exit status 1
The solution was to use homebrew and, after that, run pip3.4
brew install GDAL
and, once installed,
pip3.4 install gdal
Had this problem today. Installed GDAL with brew and it failed with pip3. The solution was to make sure that the version you try to install with pip is the same as homebrew has installed.
So first install gdal with homebrew using
brew install gdal
You should be able to see the version that is being installed during installation. If you have already installed gdal before you can check the version with:
brew info gdal
For me this showed that the version of gdal brew installed for me was: 2.4.4
So then you can install the correct version with pip using
pip3 install gdal==2.4.4
This finally worked for me.