LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-02-2010, 01:02 AM   #76
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297

Hi,

I'm in need of a good long vacation I think . I'm not sure if it has to do with the way apt-get works but when I run the script it only processes the first line and then exits. I don't know however get the error you're getting, so I'm a bit lost there. But playing around here at work I found an easier solution.

Code:
sudo apt-get install `cat p2install.txt`
(cat p2install.txt is between back-ticks so that command gets executed and replaces it with the contents of the file).

That one command should process the entire list in p2install.txt file, including any dependencies if needed.

Kind regards,

Eric

Last edited by EricTRA; 03-02-2010 at 01:08 AM.
 
Old 03-02-2010, 03:16 AM   #77
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,299
Blog Entries: 61

Rep: Reputation: Disabled
Quote:
Originally Posted by EricTRA View Post
I'm in need of a good long vacation I think .
You deserve a medal for your patience, I'm sure.
 
Old 03-02-2010, 03:16 AM   #78
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
Hello,
the output to this command was :
"E: could not lock /var/lib/dpkg/lock - open (11:resource temporarily unavailable)
E: unable to lock tha dminsitration directory (/var/lib/dpkg), is another process using it?"
 
Old 03-02-2010, 03:25 AM   #79
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by elishac View Post
E: unable to lock tha dminsitration directory (/var/lib/dpkg), is another process using it?"
Can you answer that question? Ie are you using apt-get, aptitude or dpkg in another terminal at the same time?

If you are not sure please post the output of:
Code:
ps aux | grep -E 'apt|dpkg'
Edit: And
Code:
sudo fuser -vk /var/lib/dpkg/lock

Evo2.

Last edited by evo2; 03-02-2010 at 03:27 AM.
 
Old 03-02-2010, 03:29 AM   #80
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
Hello evo2, thanks for trying to helping again.
the output of ps aux | grep -E 'apt|dpkg' is :

root 8803 99.8 0.8 21080 17308 ? R Mar01 723:33 apt-get -y install sun-java6-bin
root 8825 0.0 2.9 62424 59608 ? S Mar01 0:00 /usr/bin/dpkg --status-fd 20 --unpack --auto-deconfigure /var/cache/apt/archives/sun-java6-jre_6-15-1_all.deb /var/cache/apt/archives/sun-java6-bin_6-15-1_i386.deb
root 8831 0.0 0.4 10732 7976 ? S Mar01 0:00 /usr/bin/perl -w /usr/share/debconf/frontend /var/lib/dpkg/tmp.ci/preinst install
root 8838 0.0 0.0 1752 536 ? S Mar01 0:00 /bin/sh -e /var/lib/dpkg/tmp.ci/preinst install
elishac 9980 0.0 0.0 3040 828 pts/1 R+ 10:26 0:00 grep --color=auto -E apt|dpkg

About your edit :
sudo fuser -vk /var/lib/dpkg/lock
result
user pid access command
/var/lib/dpkg/lock root 8825 F.... dpkg

Last edited by elishac; 03-02-2010 at 03:45 AM.
 
Old 03-02-2010, 03:32 AM   #81
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

I guess that apt-get process is running in a terminal somewhere waiting for some input from you. Can you find that terminal?

Evo2.
 
Old 03-02-2010, 03:43 AM   #82
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
There is only 1 opened terminal, and there's no process being used. Shall I kill all the mentioned processes using kill 8803,8825 8831 and 8838 ?
 
Old 03-02-2010, 03:46 AM   #83
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Quote:
Originally Posted by elishac View Post
There is only 1 opened terminal, and there's no process being used. Shall I kill all the mentioned processes using kill 8803,8825 8831 and 8838 ?
Did you check in the consoles? Ie Ctrl-Alt-F1 ... F2, F3, ... F7

Evo2.
 
Old 03-02-2010, 03:50 AM   #84
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
I've never used that feature, but nothing there either.
 
Old 03-02-2010, 03:52 AM   #85
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Sorry, I just realized that I asked you to use '-k' with fuser: that will have automatically killed the processes. So now you should be able to run:
Code:
sudo apt-get install `cat p2install.txt`

Evo2.
 
Old 03-02-2010, 04:02 AM   #86
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
okay, now the output is :
E: dpkg was interrupted, you must manually run 'sudo dpkg --configre -a' to correct the problem.
Shall I use this command ?
 
Old 03-02-2010, 04:05 AM   #87
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Yes, please do.

Evo2.
 
Old 03-02-2010, 04:09 AM   #88
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
I did. There was no output. Should I run sudo apt-get install `cat p2install.txt` again ?
 
Old 03-02-2010, 04:11 AM   #89
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Strange that there was no output. But yes, please try to run
Code:
sudo apt-get install `cat p2install.txt`
again.
 
Old 03-02-2010, 04:46 AM   #90
elishac
Member
 
Registered: Nov 2009
Posts: 522

Original Poster
Rep: Reputation: 33
Not so many lines appeared. The last one was E:Couldn't find package avast4workstation-1.3.0
 
  


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
reinstallation changd Linux - Newbie 1 07-07-2006 04:13 PM
Win98 reinstallation michaelc187 General 2 11-05-2004 11:43 AM
Reinstallation! Jmcatch742 Linux - Newbie 3 10-02-2004 06:44 PM
Reinstallation: Doin' it right! mattp Linux - Newbie 40 03-08-2004 10:20 PM
reinstallation Nay Linux - Newbie 10 12-21-2003 08:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:06 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