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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
|
07-07-2008, 10:01 AM
|
#1
|
|
LQ Newbie
Registered: Nov 2004
Posts: 15
Rep:
|
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
|
|
|
|
07-07-2008, 10:34 AM
|
#2
|
|
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530
Rep:
|
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.
|
|
|
|
07-07-2008, 10:47 AM
|
#3
|
|
LQ Newbie
Registered: Nov 2004
Posts: 15
Original Poster
Rep:
|
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
|
|
|
|
07-07-2008, 11:12 AM
|
#4
|
|
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530
Rep:
|
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
|
|
|
|
07-07-2008, 11:18 AM
|
#5
|
|
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530
Rep:
|
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.
|
|
|
|
07-07-2008, 11:34 AM
|
#6
|
|
LQ Newbie
Registered: Nov 2004
Posts: 15
Original Poster
Rep:
|
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.
|
|
|
|
07-07-2008, 12:16 PM
|
#7
|
|
LQ Newbie
Registered: Nov 2004
Posts: 15
Original Poster
Rep:
|
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
|
|
|
|
07-07-2008, 12:49 PM
|
#8
|
|
Moderator
Registered: Aug 2002
Posts: 10,759
|
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.
|
|
|
|
07-07-2008, 01:56 PM
|
#9
|
|
LQ Newbie
Registered: Nov 2004
Posts: 15
Original Poster
Rep:
|
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.
|
|
|
|
07-07-2008, 02:21 PM
|
#10
|
|
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530
Rep:
|
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.
|
|
|
|
07-07-2008, 02:44 PM
|
#11
|
|
LQ Newbie
Registered: Nov 2004
Posts: 15
Original Poster
Rep:
|
Thanks. It was self inflicted, I think, since I was making the change to profile.
|
|
|
|
07-07-2008, 04:02 PM
|
#12
|
|
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530
Rep:
|
What did you do exactly?
|
|
|
|
07-07-2008, 04:25 PM
|
#13
|
|
Senior Member
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079
Rep:
|
Quote:
Originally Posted by peteHelgren
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
|
|
|
|
07-07-2008, 04:43 PM
|
#14
|
|
LQ Newbie
Registered: Nov 2004
Posts: 15
Original Poster
Rep:
|
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?
|
|
|
|
07-07-2008, 06:27 PM
|
#15
|
|
Moderator
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
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".
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:53 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|