LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 07-07-2008, 10:01 AM   #1
peteHelgren
LQ Newbie
 
Registered: Nov 2004
Posts: 15

Rep: Reputation: 0
Argument List Too Long - For ALL Commands


I am not sure what I did but I was installing some new packages over the weekend to update my subversion server and after rebooting, I couldn't get a desktop to display. When I logged in using SSH I get the following:
-bash: /usr/bin/grep: Argument list too long
-bash: /bin/ls: Argument list too long
-bash: /usr/bin/manpath: Argument list too long
-bash: /usr/bin/grep: Argument list too long
-bash: /bin/ls: Argument list too long
-bash: /usr/bin/manpath: Argument list too long
-bash: /usr/bin/grep: Argument list too long
....endlessly repeating

CTRL-C stopped the execution of whatever was running but every command I run at the command line (EVERY ONE) returns the "Argument list too long" message. It is possible I changed the path (I can't remember).

Running SUSE 10.2 and I am relatively inexperienced with Linux.

Suggestions ?

Thanks
Pete
 
Old 07-07-2008, 10:34 AM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Are any of these files updated since you installed the new software:
  • /etc/profile
  • /etc/bash.bashrc
  • ~/.bash_profile
  • ~/.bashrc

Last edited by matthewg42; 07-07-2008 at 10:35 AM.
 
Old 07-07-2008, 10:47 AM   #3
peteHelgren
LQ Newbie
 
Registered: Nov 2004
Posts: 15

Original Poster
Rep: Reputation: 0
If I recall correctly, the /etc/profile was updated. I think that is where I changed the path statement.

I was going to use an editor like vi to take a look at and change the file if necessary but when I use the vi command I get:

/usr/bin/vi: Argument list too long

Kind of stuck... echo $PATH displays the following:

/home/pete/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:
/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:
/opt/gnome/lib:/usr/lib/jvm/jre/bin:/usr/lib/mit/bin:
/usr/lib/mit/sbin

Pete
 
Old 07-07-2008, 11:12 AM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Can you get any shell commands to execute? If so, you don't need to rely on your memory - look at the time stamp on the files to see if they were updated:
Code:
ls -ltr /etc/profile /etc/bash.bashrc ~/.bashrc ~/.bash_profile
 
Old 07-07-2008, 11:18 AM   #5
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
Just saw that the vi command didn't work, so I guess ls will not either. Then I thought, "ok, starta shell with a clean environment", but that would mean executing
Code:
/usr/bin/env -i /bin/bash
...and I'm guessing that won't work either.

How are you logging in - at the console, or in a windowed environment?

If the worst comes to the worst, you can always boot from a live CD and get a shell that way and example the files like that.
 
Old 07-07-2008, 11:34 AM   #6
peteHelgren
LQ Newbie
 
Registered: Nov 2004
Posts: 15

Original Poster
Rep: Reputation: 0
Those commands didn't work. Same "Argument list too long" error.

When I try to log in at the console or use VNC I get prompted for userid and password and then I get a grey screen instead of a desktop. I am guessing whatever is affecting the command line is also hosing up the GUI.

I am using PuTTY (SSH) to get to the command line.

I could try to boot to "safe" mode but it looks like I fundamentally hosed up the OS and probably it won't boot there either.

Is there another folder/directory that would have properly executable commands? I could change the path to include only the one dir that had functional commands in it (maybe?)

Don't know what is causing the "Argument list" error in the first place. I am not passing any arguments that I know of.
 
Old 07-07-2008, 12:16 PM   #7
peteHelgren
LQ Newbie
 
Registered: Nov 2004
Posts: 15

Original Poster
Rep: Reputation: 0
OK. I fixed it, although I am not sure what was broken. When I booted to "failsafe" mode, I saw the actual path of the file that was executing and it was profile.local. Something must have been hosed up in that file.

So, I booted to the CD and chose to Rescue the system. I logged in, manually mounted the drive and then went to the etc folder and deleted the profile.local file and rebooted. The system came up and I no longer have the problem.

I guess I could have renamed the file so I could go back to see what it looked like but I am just glad to have the server back up. It is my Asterisk server and I wasn't getting any phone calls!

So I learned something: Don't mess with profiles.....

Thanks

Pete
 
Old 07-07-2008, 12:49 PM   #8
michaelk
Moderator
 
Registered: Aug 2002
Posts: 11,850

Rep: Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736Reputation: 736
Basically the default space is 131k which equals arguments (128k) + environment (3k). This is defined in limits.h.

So what did you install? Did you update the kernel?

Last edited by michaelk; 07-07-2008 at 01:03 PM.
 
Old 07-07-2008, 01:56 PM   #9
peteHelgren
LQ Newbie
 
Registered: Nov 2004
Posts: 15

Original Poster
Rep: Reputation: 0
No. No update to the kernel. It all started with a subversion installation. It seemed simple enough. The one thing that is irritating about Linux is that in many cases the installation of applications and components can be a nightmare. Anyway, turns out I already had subversion installed because the latest version wouldn't install indicating that binary files already existed (it would have been nice to have the installer automatically run an "upgrade") Next I needed to find a GUI for the subversion I had installed and that lead me to rapidsvn that needed a handful of other dependent programs. Here is where I get a little "fuzzy" on Linux installs. When I have a dependency, I go to Yast and see what packages I have installed and if they meet the minimums I go ahead and install. In this case Rapidsvn complained about not having apr, apr-util, glib, gtk+, neon, pango and then some of those had dependencies as well. Yast showed those packages were installed showing that they were installed in /usr/lib and one other folder I can't recall. Anyway, I got frustrated that the compiler would tell me that it needed certain packages installed that seemed to be already installed (according to Yast) so I started to play around with the PATH variable to see if I could get the compiler to start finding the stuff that was already installed and I eventually broke the installation.

So I started down the slippery slope because I really don't understand all the nuances of having to compile stuff in Linux (SUSE 10.2 in this case). Someday, there will be an installer that will be smart enough to find everything it needs, and download the missing stuff, so that installing an application won't be such a pain. If you have ever worked with Ruby on Rails and experienced the joy of using the gem command with the --install-dependencies switch, you will know what I am looking for.

Thanks for the pointers.
 
Old 07-07-2008, 02:21 PM   #10
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
All your installation woes go away if you stick to installing things from the distribution's repositories. SuSE must have subversion in it's repositories.

Building from source should really only be necessary in very rare cases, and certainly not for common things like subversion, which surely exists in the repos.

Anyhow, what exactly did it do to the /etc/profile?

There are lots of mischievous things which can be done in there, since it is executed for all login shells. You should be cautious when editing it, but don't rule it out entirely. Having said that, it really shouldn't necessary for a simple software installation.
 
Old 07-07-2008, 02:44 PM   #11
peteHelgren
LQ Newbie
 
Registered: Nov 2004
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks. It was self inflicted, I think, since I was making the change to profile.
 
Old 07-07-2008, 04:02 PM   #12
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
What did you do exactly?
 
Old 07-07-2008, 04:25 PM   #13
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 57
Quote:
Originally Posted by peteHelgren View Post
No. No update to the kernel. It all started with a subversion installation. It seemed simple enough. The one thing that is irritating about Linux is that in many cases the installation of applications and components can be a nightmare. Anyway, turns out I already had subversion installed because the latest version wouldn't install indicating that binary files already existed (it would have been nice to have the installer automatically run an "upgrade") Next I needed to find a GUI for the subversion I had installed and that lead me to rapidsvn that needed a handful of other dependent programs. Here is where I get a little "fuzzy" on Linux installs. When I have a dependency, I go to Yast and see what packages I have installed and if they meet the minimums I go ahead and install. In this case Rapidsvn complained about not having apr, apr-util, glib, gtk+, neon, pango and then some of those had dependencies as well. Yast showed those packages were installed showing that they were installed in /usr/lib and one other folder I can't recall. Anyway, I got frustrated that the compiler would tell me that it needed certain packages installed that seemed to be already installed (according to Yast) so I started to play around with the PATH variable to see if I could get the compiler to start finding the stuff that was already installed and I eventually broke the installation.

So I started down the slippery slope because I really don't understand all the nuances of having to compile stuff in Linux (SUSE 10.2 in this case). Someday, there will be an installer that will be smart enough to find everything it needs, and download the missing stuff, so that installing an application won't be such a pain. If you have ever worked with Ruby on Rails and experienced the joy of using the gem command with the --install-dependencies switch, you will know what I am looking for.

Thanks for the pointers.
just about all package managers install dependencies for you, yast should be able to do that as well
 
Old 07-07-2008, 04:43 PM   #14
peteHelgren
LQ Newbie
 
Registered: Nov 2004
Posts: 15

Original Poster
Rep: Reputation: 0
Well, I'd think so but this is what is causing me grief:

Right now I am trying to install cairo because the cairo version that I have in SUSE 10.2 is downlevel. The ./configure in cairo is complaining because libpng isn't installed, or so it thinks. So I went to Yast, checked for the package and it IS installed, in /usr/lib.

So I go back to the command line and make sure that /usr/lib is in the path (which is what I assume has to be done). No joy. Still can't find libpng.

So the Yast package manager says it is installed, cairo says no. So, how do I tell ./configure in cairo how to find the packages that Yast says are installed?
 
Old 07-07-2008, 06:27 PM   #15
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Check the version numbers of the libpng files. You could also try validating the libpng package.
Code:
jschiwal@hpamd64:~> rpm -ql libpng
/usr/lib64/libpng.so.3
/usr/lib64/libpng.so.3.18.0
/usr/lib64/libpng12.so.0
/usr/lib64/libpng12.so.0.18.0
You won't see anything if the package validates OK. I also listed the packages on my SuSE10.3 version.
Try "rpm -q --depends cairo"
For me it shows these libraries from the libpng package:
libpng12.so.0()(64bit)
libpng12.so.0(PNG12_0)(64bit)

Check that the files actually exist. Check that the symbolic links are present.
Code:
ls /usr/lib64/libpng* -l
-rw-r--r-- 1 root root 252408 2008-04-15 11:25 /usr/lib64/libpng12.a
-rw-r--r-- 1 root root    806 2008-04-15 11:25 /usr/lib64/libpng12.la
lrwxrwxrwx 1 root root     18 2008-04-22 03:22 /usr/lib64/libpng12.so -> libpng12.so.0.18.0
lrwxrwxrwx 1 root root     18 2008-04-22 03:22 /usr/lib64/libpng12.so.0 -> libpng12.so.0.18.0
-rwxr-xr-x 1 root root 155136 2008-04-15 11:25 /usr/lib64/libpng12.so.0.18.0
lrwxrwxrwx 1 root root     10 2008-04-22 03:22 /usr/lib64/libpng.a -> libpng12.a
lrwxrwxrwx 1 root root     11 2008-04-22 03:22 /usr/lib64/libpng.la -> libpng12.la
lrwxrwxrwx 1 root root     11 2008-04-22 03:22 /usr/lib64/libpng.so -> libpng12.so
lrwxrwxrwx 1 root root     16 2008-04-22 03:22 /usr/lib64/libpng.so.3 -> libpng.so.3.18.0
-rwxr-xr-x 1 root root 168336 2008-04-15 11:25 /usr/lib64/libpng.so.3.18.0
For some reason, kdar wasn't available in SuSE 10.3. I installed it with "rpm -Uhv --nodeps kdar-..." and then copied the libdar.so.3 version file from a backup.

If you add a library manually like that, you need to rerun ldconfig as root:
Code:
hpmedia:/home/jschiwal # ldconfig -p | grep libdar
        libdar.so.4 (libc6,x86-64) => /usr/lib64/libdar.so.4
hpmedia:/home/jschiwal # ldconfig
hpmedia:/home/jschiwal # ldconfig -p | grep libdar
        libdar.so.4 (libc6,x86-64) => /usr/lib64/libdar.so.4
        libdar.so.3 (libc6,x86-64) => /usr/lib64/libdar.so.3
You might try "sudo /sbin/ldconfig -p | grep libpng" and see if the library in the directory shows up. If not, run "sudo /sbin/ldconfig".
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Argument list too long ust Linux - Software 11 10-26-2009 10:16 AM
Help: tar = argument list too long k2merlinsix Linux - General 13 03-26-2008 01:41 PM
argument list to long for linux commands supersucker Linux - Newbie 1 05-10-2005 07:36 AM
Argument list too long trutnev Linux - General 3 04-22-2004 04:32 PM
/bin/rm: Argument list too long dragon49 Linux - Software 1 09-02-2003 12:27 PM


All times are GMT -5. The time now is 12:12 PM.

Main Menu
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