/usr/bin/ld: cannot find -lrpm collect2: ld returned 1 exit status - centos

I installed the rpm package as well but have this issue while building my code.
I also see that the rmp -q command tells me I have rpm-4.8.0-37.el6.x86_64 installed as well.
Not sure if I am missing any configuration somewhere

Related

ld: cannot find -lc when linking as elf i386

I'm stumped on this.
I am using Ubuntu 18.04. I want link together an executable as a 32-bit program, for educational purposes.
My ld default search paths are all for the 64bit toolchain, so I think I need to invoke ld with additional library search paths since I want to link as 32bit. It can not find libc for some reason.
ld -mi386linux -L/lib/i386-linux-gnu/ -lc -o cc codechef.o -dynamic-linker /lib/i386-linux-gnu/ld-linux.so.2
This gives me the error ld: cannot find -lc
I have verified that libc.so.6 file does exist at /lib/i386-linux-gnu/libc.so.6
adding --verbose to my command reveals: attempt to open /lib/i386-linux-gnu//libc.a failed Why does my ubuntu installation not have this file but does have the .so?

Net::SSLeay::Handle compiling error in Ubuntu 16.04

I've a problem to install the aforementioned module via cpanm in my multi-threading version of Perl (not the original one).
I've Ubuntu 16.04.
When trying to compile and test this module it gives me the following error:
/usr/bin/ld: impossible to find -lz
collect2: error: ld returned 1 exit status
Makefile:494: instructions set for target "blib/arch/auto/Net/SSLeay/SSLeay.so" fail
make: *** [blib/arch/auto/Net/SSLeay/SSLeay.so] Error 1
-> FAIL Installing Net::SSLeay::Handle failed. See /home/my_name/.cpanm/work/1548275319.13675/build.log for details. Retry with --force to force install it.
openssl,ssllib-dev-perl,libnet-ssleay-perl, libcrypt-ssleay-perl already installed via apt-get.
I've also tried to compile manually this module, without success. I forced the installation too...no way.
The error seems linked with something missing in /usr/bin/ld: (impossible to find -lz collect2).
Is there anyone who can help me with this?
Cpanm has always worked pretty well. Up to now i've been able to get all my modules installed and well functioning, apart from Net::SSLeay::Handle.
Thanks in advace for your help
Ok, i solved by installing this packages (Ubuntu 16.04LTS):
-openssl
-libssl-dev
-libnet-ssleay-perl
-libcrypt-ssleay-perl
-zlib1g-dev as suggested above
Once you're done doing that, remember to avoid testing the module when gcc will be finishing compiling it, because in most cases it fails.
So the best incantation in doing this should be as follows:
-cpanm install -v --notest Net::SSLeay::Handle
Many thanks again to all Perl mates writing in this forum.
You saved the day
first log in cpan
sudo cpan
force intalling the module should work
force install Net::SSLeay::Handle
This should also install missing modules or notice it

Error with swift installation in ubuntu 14.04

I created a new project in ubuntu, with only the main.swift, with a simple print(hello world) and display this error.
guillermo#guillermo-Latitude-E6440:~/Descargas/Hola3$ swift build
Linking Executable: .build/debug/Hola3
/usr/bin/ld: cannot find crtbegin.o: No such file or directory
clang: error: linker command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): ["/home/guillermo/Descargas/swift-DEVELOPMENT-SNAPSHOT-2016-01-25-a-ubuntu14.04/usr/bin/swift-build-tool", "-f", "/home/guillermo/Descargas/Hola3/.build/debug/Hola3.o/llbuild.yaml"]
You need the libgcc-*-dev package that provides crtbegin.o and a few other important libraries and object files vital to building programs on Ubuntu. For example, on Ubuntu 14.04 it would be libgcc-4.8-dev. The package should be installed if you install the gcc package:
apt-get install gcc

Cannot install GD on centos 5.8

/usr/bin/ld: skipping incompatible /usr/lib/libgd.so when searching for -lgd
/usr/bin/ld: skipping incompatible /usr/lib/libgd.a when searching for -lgd
/usr/bin/ld: cannot find -lgd
collect2: ld returned 1 exit status
make: *** [blib/arch/auto/GD/GD.so] Error 1
/usr/bin/make -- NOT OK
Running make test
Can't test without successful make
Running make install
make had returned bad status, install seems impossible
I'm trying to install GD.pm on centos 5.8 and stuck on this problem. I have already installed all available graphic libraries with yum.
Have any ideas?
The GD module is just a thin layer around libgd. So you'll want to install that first.
$ sudo yum install gd
You'll probably need the development library too (for the C header files).
$ sudo yum install gd-devel
But, all in all, you're probably better off just installing the Centos package (which will handle all the dependencies for you).
$ sudo yum install perl-GD

pyephem: installation via pip fails

I am trying to install pyephem on an OSX 10.7.5 system using pip. The installation process starts well, with many successful calls to gcc. But the installation fails with the error message:
ld: library not found for -lbundle1.o
collect2: ld returned 1 exit status
error: command 'gcc' failed with exit status 1
This occurs after the command:
gcc -bundle -undefined dynamic_lookup -g -arch i386 build/temp.macosx-10.5-i386-2.7/extensions/_libastro.o build/... [a whole list of .o files]
I also have tried using easy_install and the installation failed with the same error message.
I'm not an expert at all and can't find out what "bundle1" is. Any help would be much appreciated.
Andrew Fletcher
(Update: The OP, as indicated in the comment below, has avoided the problem by using ActiveState Python on his Mac, which might be a possible solution for other people who run into this problem.)
Well, wow — I have never seen that error before! Until other Stack Overflow denizens can offer more specific answers, I'll just point you in the direction of an Apple Mailing List post that I just found in which someone got the error because some sort of SDK was missing from their system:
http://lists.apple.com/archives/darwin-dev/2011/Apr/msg00016.html
If you do further Googling for the library name you might be able to turn up further details.