cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Apps and Installations

Have a question about a Dropbox app or installation? Reach out to the Dropbox Community and get solutions, help, and advice from members.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Error found when loading /etc/profile:

Error found when loading /etc/profile:

Tom_Morse
Helpful | Level 5
Go to solution

I get the following error message when I sign into my linux desktop (platform details below) after rebooting (doesn't appear if I lock the screen and sign back in again):

Error found when loading /etc/profile:
/usr/share/modules/init/sh: eval: line 42: synatx error near unexpected token `('
/usr/share/modules/init/sh: eval: line 42: ` Dropbox (groupname) set +x;_mlshdbg='x' ;;'
/usr/share/modules/init/sh: line 61 :export: module: not a function
As a result the session will not be configured correctly.
You should fix the problem as soon as feasible.

...

I replaced our dropbox business groupname with the text "groupname" in the above.  To get rid of the error message I wiggle my mouse until a cursor appears (sometimes takes a few seconds) and then click the OK button at which point the desktop appears. Here are some details about the platform:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
tmm46@cecil:~$
with this version of dropbox
tmm46@cecil:~$ dropbox version
Dropbox daemon version: 125.4.3474
Dropbox command-line interface version: 2020.03.04
tmm46@cecil:~$
The error message appears with a red exclamation mark (I typed in the error message, as was not copy-able; below screenshot taken with smartphone. I redacted our business dropbox groupname by drawing over it with the mouse. Note that the rest of the screen was black outside the error window:)

20210624_083826mid_res.jpg

1 Accepted Solution

Accepted Solutions

Tom_Morse
Helpful | Level 5
Go to solution

I did get the same error message on reboot without the Dropbox application.

After trying to see what package was involved in the offending file (where in the below I replaced our real dropbox groupname with "groupname"):

$ rpm -qf /usr/share/modules/init/sh
/usr/share/modules/init/bash: eval: line 42: syntax error near unexpected token `('
/usr/share/modules/init/bash: eval: line 42: ` Dropbox (groupname) set +x; _mlshdbg='x' ;;'
/usr/share/modules/init/bash: line 60: export: module: not a function
/usr/share/modules/init/bash: eval: line 42: syntax error near unexpected token `('
/usr/share/modules/init/bash: eval: line 42: ` Dropbox (groupname) set +x; _mlshdbg='x' ;;'
/usr/share/modules/init/bash: line 60: export: module: not a function
file /usr/share/modules/init/sh is not owned by any package
$

Regardless of /usr/share/modules/init/sh being reportedly not owned by any package, hunting around on the internet led me to believe an environment-modules package was involved, so risking corrupting other things I decided to try uninstalling it:

$ sudo apt-get remove environment-modules
[sudo] password for (username):
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
environment-modules
0 upgraded, 0 newly installed, 1 to remove and 4 not upgraded.
After this operation, 594 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 297080 files and directories currently installed.)
Removing environment-modules (4.1.1-1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
$

Now on reboot I received a different error message with red exclamation mark:

Error found when loading /etc/profile:

/etc/profile.d/modules.sh: line 6: /usr/share/modules/init.sh: No such file or
directory

As a result the session will not be configured correctly.
You should fix the problem as soon as feasible.

:

20210702_082229mid_res.jpg

It looked to me like the uninstall of the environment-modules package left a file behind so I moved the modules.sh away

sudo mv /etc/profile.d/modules.sh ~/away

And finally on reboot I was able to log in and be shown my desktop without any error message so I will mark this problem solved.

PS: thankfully my environment is OK as I was able to run other applications that are under development.

View solution in original post

5 Replies 5

Hannah
Dropbox Staff
Go to solution

Hey @Tom_Morse, welcome to the Dropbox Community!

Can you try uninstalling the Dropbox application, rebooting your computer and then reinstalling it, to see if that helps?

Let me know how it goes.


Hannah
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, give it a Like below to let us know.
:arrows_counterclockwise: Need help with something else? Ask me a question!
:pushpin: Find Tips & Tricks Discover more ways to use Dropbox here!
:arrows_counterclockwise: Interested in Community Groups? Click here to join!

Tom_Morse
Helpful | Level 5
Go to solution

Thanks Hannah! I found that after uninstalling dropbox and rebooting the error message persisted.  Although the dropbox application has been ruled out, the mention of dropbox in the error message may draw others experiencing the same error here, and there is always the chance that someone from outside the dropbox community will end up here and be able to solve it.  Thank you dropbox forum for the possibility of your broader community service.

Hannah
Dropbox Staff
Go to solution
Thanks for this update, Tom!

After you rebooted, does the error message mention another app instead of Dropbox? Or did you get the same error message?

Hannah
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, give it a Like below to let us know.
:arrows_counterclockwise: Need help with something else? Ask me a question!
:pushpin: Find Tips & Tricks Discover more ways to use Dropbox here!
:arrows_counterclockwise: Interested in Community Groups? Click here to join!

Tom_Morse
Helpful | Level 5
Go to solution

I did get the same error message on reboot without the Dropbox application.

After trying to see what package was involved in the offending file (where in the below I replaced our real dropbox groupname with "groupname"):

$ rpm -qf /usr/share/modules/init/sh
/usr/share/modules/init/bash: eval: line 42: syntax error near unexpected token `('
/usr/share/modules/init/bash: eval: line 42: ` Dropbox (groupname) set +x; _mlshdbg='x' ;;'
/usr/share/modules/init/bash: line 60: export: module: not a function
/usr/share/modules/init/bash: eval: line 42: syntax error near unexpected token `('
/usr/share/modules/init/bash: eval: line 42: ` Dropbox (groupname) set +x; _mlshdbg='x' ;;'
/usr/share/modules/init/bash: line 60: export: module: not a function
file /usr/share/modules/init/sh is not owned by any package
$

Regardless of /usr/share/modules/init/sh being reportedly not owned by any package, hunting around on the internet led me to believe an environment-modules package was involved, so risking corrupting other things I decided to try uninstalling it:

$ sudo apt-get remove environment-modules
[sudo] password for (username):
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
environment-modules
0 upgraded, 0 newly installed, 1 to remove and 4 not upgraded.
After this operation, 594 kB disk space will be freed.
Do you want to continue? [Y/n]
(Reading database ... 297080 files and directories currently installed.)
Removing environment-modules (4.1.1-1) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
$

Now on reboot I received a different error message with red exclamation mark:

Error found when loading /etc/profile:

/etc/profile.d/modules.sh: line 6: /usr/share/modules/init.sh: No such file or
directory

As a result the session will not be configured correctly.
You should fix the problem as soon as feasible.

:

20210702_082229mid_res.jpg

It looked to me like the uninstall of the environment-modules package left a file behind so I moved the modules.sh away

sudo mv /etc/profile.d/modules.sh ~/away

And finally on reboot I was able to log in and be shown my desktop without any error message so I will mark this problem solved.

PS: thankfully my environment is OK as I was able to run other applications that are under development.

Hannah
Dropbox Staff
Go to solution
That's great, thanks for all this info, Tom! 

This could prove useful for other users as well.

If you need anything else, make sure to give us a shout. 

Have a great week ahead!

Hannah
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, give it a Like below to let us know.
:arrows_counterclockwise: Need help with something else? Ask me a question!
:pushpin: Find Tips & Tricks Discover more ways to use Dropbox here!
:arrows_counterclockwise: Interested in Community Groups? Click here to join!

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Hannah Dropbox Staff
  • User avatar
    Tom_Morse Helpful | Level 5
What do Dropbox user levels mean?