How to unpack and install .tar.bz2 library ? | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

How to unpack and install .tar.bz2 library ?

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 03-21-2009
jack2 jack2 is offline
Banned
 
Join Date: Mar 2009
Last Activity: 17 April 2009, 7:05 PM EDT
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
How to unpack and install .tar.bz2 library ?

Hi,

I am trying to unpack and install .tar.bz2 library.
I was told to cd /
and than tar -jxvf /source-of-library-file?...tar.bz2

to get files unpacked and installed into /

Darius



[admin@oo /]$ pwd
/
[admin@oo /]$
[admin@oo /]$ tar -jxvf /tmp/local/root/ncurses-dev-addon.tar.bz2
ncurses-dev-addon/
ncurses-dev-addon: Cannot mkdir: Read-only file system
ncurses-dev-addon/include/
ncurses-dev-addon/include: Cannot mkdir: No such file or directory
ncurses-dev-addon/include/ncurses/
ncurses-dev-addon/include/ncurses: Cannot mkdir: No such file or directory
ncurses-dev-addon/include/ncurses/curses.h
ncurses-dev-addon/include/ncurses/curses.h: Cannot open: No such file or directory
ncurses-dev-addon/include/ncurses/eti.h
ncurses-dev-addon/include/ncurses/eti.h: Cannot open: No such file or directory
ncurses-dev-addon/include/ncurses/form.h
ncurses-dev-addon/include/ncurses/form.h: Cannot open: No such file or directory
ncurses-dev-addon/include/ncurses/menu.h
ncurses-dev-addon/include/ncurses/menu.h: Cannot open: No such file or directory
ncurses-dev-addon/include/ncurses/nc_tparm.h
ncurses-dev-addon/include/ncurses/nc_tparm.h: Cannot open: No such file or directory
ncurses-dev-addon/include/ncurses/ncurses.h
ncurses-dev-addon/include/ncurses/ncurses.h: Cannot open: No such file or directory
ncurses-dev-addon/include/ncurses/ncurses_dll.h
ncurses-dev-addon/include/ncurses/ncurses_dll.h: Cannot open: No such file or directory
ncurses-dev-addon/include/ncurses/panel.h
ncurses-dev-addon/include/ncurses/panel.h: Cannot open: No such file or directory
ncurses-dev-addon/include/ncurses/term.h
ncurses-dev-addon/include/ncurses/term.h: Cannot open: No such file or directory
ncurses-dev-addon/include/ncurses/term_entry.h
ncurses-dev-addon/include/ncurses/term_entry.h: Cannot open: No such file or directory
ncurses-dev-addon/include/ncurses/termcap.h
ncurses-dev-addon/include/ncurses/termcap.h: Cannot open: No such file or directory
ncurses-dev-addon/include/ncurses/tic.h
ncurses-dev-addon/include/ncurses/tic.h: Cannot open: No such file or directory
ncurses-dev-addon/include/ncurses/unctrl.h
ncurses-dev-addon/include/ncurses/unctrl.h: Cannot open: No such file or directory
ncurses-dev-addon/include/ncurses.h
ncurses-dev-addon/include/ncurses.h: Cannot create symlink to `ncurses/ncurses.h': No such file or directory
ncurses-dev-addon/lib/
ncurses-dev-addon/lib: Cannot mkdir: No such file or directory
ncurses-dev-addon/lib/libform.a
ncurses-dev-addon/lib/libform.a: Cannot open: No such file or directory
ncurses-dev-addon/lib/libmenu.a
ncurses-dev-addon/lib/libmenu.a: Cannot open: No such file or directory
ncurses-dev-addon/lib/libncurses.a
ncurses-dev-addon/lib/libncurses.a: Cannot open: No such file or directory
ncurses-dev-addon/lib/libpanel.a
ncurses-dev-addon/lib/libpanel.a: Cannot open: No such file or directory
Exiting with failure status due to previous errors
[admin@oo /]$
Sponsored Links
    #2  
Old 03-21-2009
TonyFullerMalv's Avatar
TonyFullerMalv TonyFullerMalv is offline Forum Advisor  
Registered User
 
Join Date: Sep 2008
Last Activity: 1 July 2013, 6:45 PM EDT
Location: Malvern, Worcs. U.K.
Posts: 1,033
Thanks: 0
Thanked 8 Times in 8 Posts
"Read-only file system" is the clue, if the .tar.bz2 library is on a cdrom then copy it to somewhere writeable (e.g. /) first then do the extraction, also you may need to uncompress it with bunzip2 if tar -z does not support that format although what you show looks promising on that matter.
You will also need to be the root user in oder to write to /.
Sponsored Links
    #3  
Old 03-21-2009
jack2 jack2 is offline
Banned
 
Join Date: Mar 2009
Last Activity: 17 April 2009, 7:05 PM EDT
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by TonyFullerMalv View Post
"Read-only file system" is the clue, if the .tar.bz2 library is on a cdrom then copy it to somewhere writeable (e.g. /) first then do the extraction, also you may need to uncompress it with bunzip2 if tar -z does not support that format although what you show looks promising on that matter.
You will also need to be the root user in oder to write to /.
Thanks for your kind help.
In my case, Linux embedded device, / is read-only file system
/opt is writeable
so I copied .tar.bz2 into /opt
than run tar
and finished.

Thanks my friend.

Jack


[admin@oo root]$ tar -jxvf /opt/ncurses-dev-addon.tar.bz2
ncurses-dev-addon/
ncurses-dev-addon/include/
ncurses-dev-addon/include/ncurses/
ncurses-dev-addon/include/ncurses/curses.h
ncurses-dev-addon/include/ncurses/curses.h: time stamp 2009-03-13 08:13:20 is 1236923988.764503 s in the future
ncurses-dev-addon/include/ncurses/eti.h
ncurses-dev-addon/include/ncurses/eti.h: time stamp 2009-03-13 08:13:20 is 1236923988.762421 s in the future
ncurses-dev-addon/include/ncurses/form.h
ncurses-dev-addon/include/ncurses/form.h: time stamp 2009-03-13 08:13:20 is 1236923988.748008 s in the future
ncurses-dev-addon/include/ncurses/menu.h
ncurses-dev-addon/include/ncurses/menu.h: time stamp 2009-03-13 08:13:20 is 1236923988.740242 s in the future
ncurses-dev-addon/include/ncurses/nc_tparm.h
ncurses-dev-addon/include/ncurses/nc_tparm.h: time stamp 2009-03-13 08:13:20 is 1236923988.732191 s in the future
ncurses-dev-addon/include/ncurses/ncurses.h
ncurses-dev-addon/include/ncurses/ncurses.h: time stamp 2009-03-13 08:13:20 is 1236923988.690578 s in the future
ncurses-dev-addon/include/ncurses/ncurses_dll.h
ncurses-dev-addon/include/ncurses/ncurses_dll.h: time stamp 2009-03-13 08:13:20 is 1236923988.683104 s in the future
ncurses-dev-addon/include/ncurses/panel.h
ncurses-dev-addon/include/ncurses/panel.h: time stamp 2009-03-13 08:13:20 is 1236923988.682004 s in the future
ncurses-dev-addon/include/ncurses/term.h
ncurses-dev-addon/include/ncurses/term.h: time stamp 2009-03-13 08:13:20 is 1236923988.654569 s in the future
ncurses-dev-addon/include/ncurses/term_entry.h
ncurses-dev-addon/include/ncurses/term_entry.h: time stamp 2009-03-13 08:13:20 is 1236923988.646341 s in the future
ncurses-dev-addon/include/ncurses/termcap.h
ncurses-dev-addon/include/ncurses/termcap.h: time stamp 2009-03-13 08:13:20 is 1236923988.645087 s in the future
ncurses-dev-addon/include/ncurses/tic.h
ncurses-dev-addon/include/ncurses/tic.h: time stamp 2009-03-13 08:13:20 is 1236923988.637417 s in the future
ncurses-dev-addon/include/ncurses/unctrl.h
ncurses-dev-addon/include/ncurses/unctrl.h: time stamp 2009-03-13 08:13:20 is 1236923988.629317 s in the future
ncurses-dev-addon/include/ncurses.h
ncurses-dev-addon/include/ncurses: time stamp 2009-03-13 08:14:10 is 1236924038.628492 s in the future
ncurses-dev-addon/lib/
ncurses-dev-addon/include: time stamp 2009-03-13 08:56:11 is 1236926559.62732 s in the future
ncurses-dev-addon/lib/libform.a
ncurses-dev-addon/lib/libform.a: time stamp 2009-03-13 08:19:31 is 1236924359.574651 s in the future
ncurses-dev-addon/lib/libmenu.a
ncurses-dev-addon/lib/libmenu.a: time stamp 2009-03-13 08:19:44 is 1236924372.548226 s in the future
ncurses-dev-addon/lib/libncurses.a
ncurses-dev-addon/lib/libncurses.a: time stamp 2009-03-13 08:19:53 is 1236924381.311783 s in the future
ncurses-dev-addon/lib/libpanel.a
ncurses-dev-addon/lib/libpanel.a: time stamp 2009-03-13 08:20:01 is 1236924389.297006 s in the future
ncurses-dev-addon/lib: time stamp 2009-03-13 08:55:45 is 1236926533.29278 s in the future
ncurses-dev-addon: time stamp 2009-03-13 08:54:33 is 1236926461.292273 s in the future
[admin@oo root]$

follow-up

ops
installed library into wrong /root directory

copied library into /opt
and no chance
the same with /

Jack

[admin@oo root]$ cd /
[admin@oo /]$ tar -jxvf /opt/ncurses-dev-addon.tar.bz2
ncurses-dev-addon/
ncurses-dev-addon: Cannot mkdir: Read-only file system
ncurses-dev-addon/include/
ncurses-dev-addon/include: Cannot mkdir: No such file or directory
ncurses-dev-addon/include/ncurses/
ncurses-dev-addon/include/ncurses: Cannot mkdir: No such file or directory
ncurses-dev-addon/include/ncurses/curses.h
ncurses-dev-addon/include/ncurses/curses.h: Cannot open: No such file or directory

Last edited by jack2; 03-21-2009 at 08:02 PM..
    #4  
Old 03-23-2009
jack2 jack2 is offline
Banned
 
Join Date: Mar 2009
Last Activity: 17 April 2009, 7:05 PM EDT
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by TonyFullerMalv View Post
"Read-only file system" is the clue, if the .tar.bz2 library is on a cdrom then copy it to somewhere writeable (e.g. /) first then do the extraction, also you may need to uncompress it with bunzip2 if tar -z does not support that format although what you show looks promising on that matter.
You will also need to be the root user in oder to write to /.
folloow-up 2
\
Ok. I am root user.
The problem is /lib and /include archives have been placed into
/ncurses-dev-addon directory
and that directory has been archived

[admin@oo root]$ tar -jxvf /opt/ncurses-dev-addon.tar.bz2

so running any tar to unpack and install archives
/ncurses-dev-addon directory is first created
in /opt
so /lib and /include from archives don't go into
/opt/lib and /opt/include
as they go into
/opt/ncurses-dev-addon
/opt/ncurses-dev-addon

Visited fsf and gnu for tar man pages
http://www.gnu.org/software/tar/manual/tar.txt

and there is no way not to have /ncurses-dev-addon directory
to be created on unpacking of the archives.

So, do I need to unpack archives and pack them again, not using
/ncurses-dev--addon directory
to install library finally ?

If you are aware of any other solution, please let me know.

Plain copy doesn't work as
/lib is read-only file system

Darius
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Method to Unpack cpio files William1482 Red Hat 2 01-29-2009 12:18 PM
perl pack and unpack commands max_payne1234 UNIX for Dummies Questions & Answers 1 11-12-2008 11:11 PM
simple unpack script jboss UNIX for Dummies Questions & Answers 18 04-06-2008 02:45 AM
Problem With Makefiles, how do I install gandalf vision library? justinh UNIX for Dummies Questions & Answers 1 02-16-2005 02:21 PM
does any body know how to unpack this file????? amicrawler2000 UNIX for Dummies Questions & Answers 1 08-12-2003 04:38 PM



All times are GMT -4. The time now is 08:09 AM.