LinuxQuestions.org
Review your favorite Linux distribution.
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, 05:00 AM   #1
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Fedora, Mint, FreeBSD, Android
Posts: 348

Rep: Reputation: 31
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, 08:16 AM   #2
cynwulf
Senior Member
 
Registered: Apr 2005
Distribution: OpenBSD, DragonFly BSD
Posts: 1,409

Rep: Reputation: Disabled
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 08:17 AM.
 
Old 04-08-2014, 08:52 AM   #3
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Fedora, Mint, FreeBSD, Android
Posts: 348

Original Poster
Rep: Reputation: 31
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, 11:09 AM   #4
cynwulf
Senior Member
 
Registered: Apr 2005
Distribution: OpenBSD, DragonFly BSD
Posts: 1,409

Rep: Reputation: Disabled
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, 11:29 AM   #5
Kropotkin
Member
 
Registered: Oct 2004
Location: /usr/home
Distribution: Fedora, Mint, FreeBSD, Android
Posts: 348

Original Poster
Rep: Reputation: 31
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 11:31 AM.
 
Old 04-09-2014, 09:21 AM   #6
cynwulf
Senior Member
 
Registered: Apr 2005
Distribution: OpenBSD, DragonFly BSD
Posts: 1,409

Rep: Reputation: Disabled
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, 04:29 PM   #7
nickbeee
LQ Newbie
 
Registered: Aug 2012
Location: UK
Distribution: FreeBSD, NetBSD, OpenBSD, Fedora, CentOS
Posts: 9

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 09:42 AM
How can I uninstalled libiconv? libiconv.so.2: cannot open shared object file abefroman Linux - Software 2 11-03-2006 04:07 PM
Freebsd 6.1 / Install webmin fails (can not fetch file) fatum112 *BSD 1 10-04-2006 07:05 AM
install libiconv 1.8 on slackware 9.0? Iskander Linux - Software 3 06-28-2003 08:09 AM
make buildworld fails for FreeBSD 4.7-RELEASE llama_meme *BSD 2 11-21-2002 04:05 PM


All times are GMT -5. The time now is 11:03 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration