Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

errors while installing graphviz from source

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
EdBoran
Posts: 10
Joined: 2006-03-07 21:35

errors while installing graphviz from source

#1 Post by EdBoran »

I am running latest sarge - stable, kernel 2.6.8-2-686-smp.
I am attempting to compile and install graphviz.2.8 from source but I’m getting the following error while running make install:
“ ./dot: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory”
The file is located in /usr/local/lib.

All my searches are pointing back to glibc and libc6.

I have tried to load graphviz package from unstable but that requires tlc8.4 and tk8.4.
I already have them both installed from the source code and don’t need the deb packages.
tcl8.4 package is compiled with multi-thread option on and I need single-thread.

Can someone suggest what should I do?


Ed

PS: I’m relatively new to this

User avatar
domecq
Moderator Team Member
Moderator Team Member
Posts: 549
Joined: 2005-10-18 00:53
Location: Montréal, Canada

libiconv package missing

#2 Post by domecq »

It seems that, prior to compile and install graphviz.2.8, you need to install in your system one or more of these packages:
libiconv-hook1
libiconv-ruby
libiconv-ruby1.6

I hope that helps.

Harold
Posts: 1482
Joined: 2005-01-07 00:15
Been thanked: 3 times

#3 Post by Harold »

I don't see a file named libiconv.so.2 or libiconv.so in any Debian package. The packages that domecq suggested you install contain libiconv. I just downloaded the graphviz-2.8 tarball, and successfully did ./configure, make, and make install without ever receiving the error message you received.

Are you saying that you do have a copy of libiconv.so.2 in your /usr/local/lib/? If so, what package put it there?

Let's assume for a moment that the file does exist on your computer. For reasons that I don't understand, Debian doesn't look in /usr/local/lib/ by default. You have two choices: (1) copy the contents of /usr/local/lib/ to /usr/lib/ and run ldconfig, or (2) add a line containing /usr/local to /etc/ld.so.conf, and then run ldconfig.

User avatar
domecq
Moderator Team Member
Moderator Team Member
Posts: 549
Joined: 2005-10-18 00:53
Location: Montréal, Canada

#4 Post by domecq »

I don't see a file named libiconv.so.2 or libiconv.so in any Debian package. The packages that domecq suggested you install contain libiconv.
I'm sorry. I thought the file libiconv.so.2 would be in one of those packages.

Anyways, if we are talking about this program, I think things could be easier... it can be installed by apt-get or Synaptic since it's part of Debian repositories.

EdBoran
Posts: 10
Joined: 2006-03-07 21:35

#5 Post by EdBoran »

Guys, thank you for your suggestions.

The reason I’ve got libiconv.so.2 on my /usr/local/lib is because I have compiled libiconv1.9.1 from the source code.
All these packages are necessary to get ntop3.2 fully functional.
The system is running nessus and snort and they’re working (so far).
I am afraid to start getting packages from testing or unstable.

I have done the same steps on a test system and I ran into the same issue. I couldn’t pass it until I have downloaded latest glibc and libc deb packages from debian/pool/main/.
Obviously, I needed more dependencies to get these 2 packages installed (kernel-headers if I’m not mistaken).

During graphviz make install the program called dot is calling libiconv.so.2 and it complains that it cannot be found. There are no permissions issues.
libiconv.so.2 is a soft link to libiconv.so.2.2.0. I have also tried to remove and re-create the link.
Nothing helped so far and I have no more ideas.

User avatar
domecq
Moderator Team Member
Moderator Team Member
Posts: 549
Joined: 2005-10-18 00:53
Location: Montréal, Canada

#6 Post by domecq »

I am afraid to start getting packages from testing or unstable.
There is graphviz for stable.

EdBoran
Posts: 10
Joined: 2006-03-07 21:35

#7 Post by EdBoran »

Let's assume for a moment that the file does exist on your computer. For reasons that I don't understand, Debian doesn't look in /usr/local/lib/ by default. You have two choices: (1) copy the contents of /usr/local/lib/ to /usr/lib/ and run ldconfig, or (2) add a line containing /usr/local to /etc/ld.so.conf, and then run ldconfig.[/quote]

ld.so.conf contains /usr/local/lib
if i do whereis libiconv.so.2 it shows the right place.
are you suggesting to add one more line in ld.so.conf for /usr/local ?

User avatar
domecq
Moderator Team Member
Moderator Team Member
Posts: 549
Joined: 2005-10-18 00:53
Location: Montréal, Canada

#8 Post by domecq »

No, I'm suggesting you to fetch and install the program by apt-get or Synaptic since any possible dependency issue will automatically be dealt by one of them. And it's a package "tailored" for the Debian version you have, i.e. no need to have a hard time with tar files or compilations.

EdBoran
Posts: 10
Joined: 2006-03-07 21:35

#9 Post by EdBoran »

domecq wrote:
I am afraid to start getting packages from testing or unstable.
There is graphviz for stable.
This package wants tcl8.4 and tk 8.4 from the stable repository.
I don't need them as they will break the reporting interface for snort.
However, I’ve installed them from the source code.

EdBoran
Posts: 10
Joined: 2006-03-07 21:35

#10 Post by EdBoran »

Any way I can tell apt and/or synaptic that I’ve got the packages that I need and don’t have to install them from the repository?

User avatar
domecq
Moderator Team Member
Moderator Team Member
Posts: 549
Joined: 2005-10-18 00:53
Location: Montréal, Canada

#11 Post by domecq »

Snort and nessus are also in stable repository and they should not conflict with any other package also in the same repository.

EdBoran
Posts: 10
Joined: 2006-03-07 21:35

#12 Post by EdBoran »

The ones from stable are at least 2 or 3 releases behind the current ones:
nessus - 2.2.3 versus 3.0
snort 2.3.2 versus 2.4.3
The reason for using the latest builds for those 2 is because they fix issues regarding its own security and gives me more functionality.

Anyway, the idea was to find some advice on how to get graphviz installed without breaking the system.
I appreciate your advice, but I'm not going back and pull the other packages from the repository because it might fix graphviz.

User avatar
domecq
Moderator Team Member
Moderator Team Member
Posts: 549
Joined: 2005-10-18 00:53
Location: Montréal, Canada

#13 Post by domecq »

The reason for using the latest builds for those 2 is because they fix issues regarding its own security and gives me more functionality.
I'm sorry to say but that's a misconception and if that's the reason, you should stick with the versions in stable as they do not have a security vunerability and, when they appear, Debian team always put an effort to backport the patches and fixes of newer versions in the versions that Debian offers.

For an example about snort read this page.

EdBoran
Posts: 10
Joined: 2006-03-07 21:35

#14 Post by EdBoran »

You’ve got me! I should have done more research before going into production.
Going back to the initial issue, are there ways to tell apt that some packages are being installed and don’t need them from the repository?

User avatar
domecq
Moderator Team Member
Moderator Team Member
Posts: 549
Joined: 2005-10-18 00:53
Location: Montréal, Canada

#15 Post by domecq »

Going back to the initial issue, are there ways to tell apt that some packages are being installed and don’t need them from the repository?
Yes, you can have apt to force an installation. Check its man page for details, what options. But know what you're doing because sometimes this can break a system real bad.

EdBoran
Posts: 10
Joined: 2006-03-07 21:35

#16 Post by EdBoran »

You are so right! I have forgot about this.
I think it’s worth a try. I hope it’s not going to break since its dependencies are already installed.

Harold
Posts: 1482
Joined: 2005-01-07 00:15
Been thanked: 3 times

#17 Post by Harold »

Ed> I am afraid to start getting packages from testing or unstable... The [packages] from stable are at least 2 or 3 releases behind the current ones:
nessus - 2.2.3 versus 3.0
snort 2.3.2 versus 2.4.3


My preference is to install packages from Testing, and if Testing isn't recent enough, then I build from source rather than install from Unstable. YMMV.

Ed> The reason I've got libiconv.so.2 on my /usr/local/lib is because I have compiled libiconv1.9.1 from the source code.

Debian packages are configured to install libraries in /usr/lib/ and to run ldconfig as part of the installation process (in order to "register" the libraries with the OS). Libraries installed from source almost always go into /usr/local/lib/, and the person doing the install has to remember to do ldconfig step himself -- and to config ldconfig so that it knows to look inside /usr/local/lib/. It sounds as though you already know all this. I don't know why adding /usr/local/ to /etc/ld.so.conf forces Debian to look for libraries in /usr/local/lib/. But I am wondering if adding /usr/local/lib/ to /etc/ld.so.conf forces Debian to look for libraries in the non-existent directory /usr/local/lib/lib/. I don't claim to be a computer wizard.

Ed> Any way I can tell apt and/or synaptic that I've got the packages that I need and don't have to install them from the repository?

dpkg, apt, et al. know nothing about resources or applications built from source. All they know is what was installed from Debian packages.

Ed> During graphviz make install the program called dot is calling libiconv.so.2 and it complains that it cannot be found. There are no permissions issues.

I find it interesting (?) that you make it through ./configure and make with no problems, then the whole process goes south during make install. I went back to my make install log, and I don't see anything unusual in there. I do see that Graphviz generates lots of "dot" files.

EdBoran
Posts: 10
Joined: 2006-03-07 21:35

#18 Post by EdBoran »

I have came across while googleling for some other issues that sometimes you have to skip the ending folder (like lib from /usr/local/lib) because the install adds the /lib at the end of the path. Why? There were no explanations. However, since I’m not pulling the package from the repository, I should be aware that strange things can happen.

The reason I decided to compile the source code is because is have implemented sguil (real-time monitor for snort) that requires snort and barnyard to be patched and recompiled. Also, sguil doesn't support tcl compiled with multi-thread option on.
I have no idea if a deb package can have patches injected in it so I did what the author said in the install instructions.

I’ll give it a try today and get back to you.

Thanks for your help.

EdBoran
Posts: 10
Joined: 2006-03-07 21:35

#19 Post by EdBoran »

Modifying ld.so.cong solved the problem!
Thank you guys!

User avatar
domecq
Moderator Team Member
Moderator Team Member
Posts: 549
Joined: 2005-10-18 00:53
Location: Montréal, Canada

#20 Post by domecq »

I don't claim to be a computer wizard.
No? Watch this...
Modifying ld.so.cong solved the problem!
Now you are! ;) That was awesome! Watch my picture... I'm smiling!

Post Reply