LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices


Reply
  Search this Thread
Old 04-08-2014, 04:00 AM   #1
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Rep: Reputation: 32
FreeBSD: libiconv update fails


Hi all,

Portupgrade is failing to upgrade a few packages on my FreeBSD v10-RELEASE server and I am trying to figure out how to fix this.

Here is where libiconv fails:
Code:
===>  Building package for libiconv-1.14_3
Creating package /usr/ports/converters/libiconv/work/pkg/libiconv-1.14_3.tbz
Registering depends:.
Creating bzip'd tar ball in '/usr/ports/converters/libiconv/work/pkg/libiconv-1.14_3.tbz'
tar: lib/libcharset.so: Cannot stat: No such file or directory
tar: lib/libcharset.so.1: Cannot stat: No such file or directory
tar: lib/libiconv.so: Cannot stat: No such file or directory
tar: lib/libiconv.so.3: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors.
pkg_create: make_dist: tar command failed with code 256
*** [do-package] Error code 1
In the past, when I encountered something like this, I had the habit of uninstalling a port and then reinstalling it. But if this fails then all kinds of stuff stops working.

What is the smart approach for solving this problem?

Thank you
 
Old 04-08-2014, 07:16 AM   #2
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Updated your ports tree? http://www.freebsd.org/doc/en/books/...rts-using.html

Then
Code:
# cd /usr/ports/converters/libiconv/
# make clean deinstall
Code:
# make clean install
Run portupgrade again

Last edited by cynwulf; 04-08-2014 at 07:17 AM.
 
Old 04-08-2014, 07:52 AM   #3
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Original Poster
Rep: Reputation: 32
Thanks. I run daily periodic job which updates the ports tree every night.

Just now I did this:
Code:
# cd /usr/ports/converters/libiconv/
# make clean deinstall
but now I can't log in as root to run make, as bash no long works:
Code:
]$ su
Password:
Shared object "libiconv.so.3" not found, required by "bash"
Do you know of a way of forcing 'sh' when logging in? Just took a look at the su manpage but didn't see anything.
 
Old 04-08-2014, 10:09 AM   #4
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Ouch, and this is why you don't ever change root's shell. The bash shell is not part of any *BSD system, it's built from ports, which is why you should never change root's shell to it. Use the bourne shell (sh) and if you want to do bash stuff just enter 'bash' and proceed from there.

To get a working shell you will need to boot in single user mode (at boot loader menu "Welcome to FreeBSD" option 4)

Then mount file systems:
Code:
# mount -u
# mount -a
Then
Code:
# vipw /etc/passwd
Change root's shell back to /bin/sh

Or this should work
Code:
# chsh -s /bin/sh root
Reboot and that should be it.
 
Old 04-08-2014, 10:29 AM   #5
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Mint, Ubuntu server, FreeBSD, Android
Posts: 362

Original Poster
Rep: Reputation: 32
OK, back in business, thanks.

Code:
# cd /usr/ports/converters/libiconv/
# make clean deinstall
# make clean install
This still produces the same error I mention above.

It seems to have a cascading effect on my system as now around 20 ports are skipped when I run portupgrade.

Any thoughts?

Last edited by Kropotkin; 04-08-2014 at 10:31 AM.
 
Old 04-09-2014, 08:21 AM   #6
cynwulf
Senior Member
 
Registered: Apr 2005
Posts: 2,727

Rep: Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367Reputation: 2367
Quote:
Originally Posted by Kropotkin View Post
Here is where libiconv fails:
Code:
===>  Building package for libiconv-1.14_3
Creating package /usr/ports/converters/libiconv/work/pkg/libiconv-1.14_3.tbz
Registering depends:.
Creating bzip'd tar ball in '/usr/ports/converters/libiconv/work/pkg/libiconv-1.14_3.tbz'
tar: lib/libcharset.so: Cannot stat: No such file or directory
tar: lib/libcharset.so.1: Cannot stat: No such file or directory
tar: lib/libiconv.so: Cannot stat: No such file or directory
tar: lib/libiconv.so.3: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors.
pkg_create: make_dist: tar command failed with code 256
*** [do-package] Error code 1
The build seems to go ok?

It looks like the package build which fails as it can't find the binaries which were built, so perhaps the paths are incorrect.

What happens if you "make clean" the port and rebuild it from a root login shell?

If it still fails I would next try moving your ports tree to a backup and fetch a new ports tree snapshot.

Also if possible switch to portmaster instead of portupgrade
 
Old 04-27-2014, 03:29 PM   #7
nickbeee
LQ Newbie
 
Registered: Aug 2012
Location: UK
Distribution: FreeBSD, NetBSD, Debian, Ubuntu
Posts: 13

Rep: Reputation: Disabled
Quote:
Originally Posted by cynwulf View Post
The build seems to go ok?

It looks like the package build which fails as it can't find the binaries which were built, so perhaps the paths are incorrect.

What happens if you "make clean" the port and rebuild it from a root login shell?

If it still fails I would next try moving your ports tree to a backup and fetch a new ports tree snapshot.

Also if possible switch to portmaster instead of portupgrade
I would echo your comments on portmaster, Since I started using it, updating ports became a whole lot easier. It is a shell script and doesn't rely on anything else from the ports tree. Occasionally it will fall over when building a port but it gives you clues where to look. Another important point to be aware of is when updating the ports tree, ALWAYS read /usr/ports/UPDATING.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: FreeBSD Shines While Apple Fails LXer Syndicated Linux News 0 12-02-2009 08:42 AM
How can I uninstalled libiconv? libiconv.so.2: cannot open shared object file abefroman Linux - Software 2 11-03-2006 03:07 PM
Freebsd 6.1 / Install webmin fails (can not fetch file) fatum112 *BSD 1 10-04-2006 06:05 AM
install libiconv 1.8 on slackware 9.0? Iskander Linux - Software 3 06-28-2003 07:09 AM
make buildworld fails for FreeBSD 4.7-RELEASE llama_meme *BSD 2 11-21-2002 03:05 PM

LinuxQuestions.org > Forums > Other *NIX Forums > *BSD

All times are GMT -5. The time now is 04:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration