This is my first post to this forum so I will try to follow the accepted procedure.
I recently upgraded my lenovo t420 laptop to Tumbleweed and while everything seems ok I keep getting the following multiple errors whenever I do a zypper dup.
**/etc/profile: line 185: syntax error near unexpected token /usr/X11R6/bin' /etc/profile: line 185: /usr/X11R6/bin’
**I have searched the net high and low for an answer to this error but as I am pretty much a noob about bash scripts and /etc/profile I’m not sure what the error is. It dosen’t seem to negatively affect my system yet though I have noticed a few other errors like when I open a su terminal I get this at the prompt
-bash: /etc/profile: line 185: syntax error near unexpected token /usr/X11R6/bin' -bash: /etc/profile: line 185: /usr/X11R6/bin’
Any help or advice would be greatly appreciated
I thought that I better supply the relevant section of /etc/profile…
# Make path more comfortable
# save current path setting, we might want to restore it
if test -z "$PROFILEREAD" ; then
if test "$HOME" != "/" ; then
for dir in $HOME/bin/$CPU $HOME/bin ; do
test -d $dir && PATH=$dir:$PATH
if test "$UID" = 0 ; then
test -d /opt/kde3/sbin && PATH=/opt/kde3/sbin:$PATH
for dir in /usr/X11/bin
test -d $dir && PATH=$PATH:$dir
Using YaST > Software > Software Management and then searching for prifile with the item File list checked only, I find that /etc/profile is part of product aaa_base.
So you do a forced install of aaa_base. But it contains 73 files in total. I assume that you did not made any changes there (but OTOH your /etc/profile apparently is changed), but you have a quick look at that list before you overwrite all of them (I guess that they are all files that should not have been changed at all because the change that they are overwritten at a re-install/update is there).
/etc/profile is marked as config file though, so rpm will not replace it if it has been modified when updating the package (not even when using “zypper dup”… ).
So check whether you have an /etc/profile.rpmnew file and rename that to /etc/profile.
Or delete your /etc/profile and force a reinstallation of aaa_base to get the original file.
It seems to have worked because I’m no longer getting error messages when I login to the root terminal. The etc/profile looks very different now.
The real test will be when I do the next zypper dup because that’s where I was seeing all the syntax errors.
Oh and I dup’d from 42.3 Leap but it was pretty schetchy and didn’t really go as planned, the usb disc installation became a net install?
Make sure that you do not have any Leap repositories active.
When I migrated from Leap to Tumbleweed, I manually added the “tumbleweed/repo/oss/” and
“packman/suse/openSUSE_Tumbleweed/” (I have a Broadcom wireless chip that uses the kernel module from Packman) repositories and disabled all the others. Because the dup downloads are always pretty large, I use the “zypper dup -d” parameter to download everything before I start the dup proper.
You guys might be interested that I found the cause of the corruption to /etc/profile.
I have been trying to get PacketTracer7 to work with Tumbleweed and after trying again I found the /etc/profile was damaged again.
At least I know how to repair it now. Oh well no PacketTracer in Tumbleweed for now, It’s annoying because it worked ok in Leap.
Don’t do that. It would undo all vendor changes made to a system, f.e. to Packman. The proper way is definitely not to dup --from, but to ‘zypper dup’. Nothing else unless you want to apply a vendor change to some repo.
It’s not clear to me whether you edited /etc/profile to support your PacketTracer app.
If you did, that’s not what you’re supposed to do…
Following the comments in /etc/profile, you’re supposed to create a /etc/profile.local and place your customizations in that file.
An alternative is to create your customizations as a script, and place the script in /etc/profile.d/
It’s my understanding that whenever you do a zypper dup, /etc/profile is supposed to be over-written, erasing your edits.
Obviously, this would become a persistent problem in TW while only being a rare, occasional issue in LEAP.