We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here. 

Forum Discussion

Tom_Morse's avatar
Tom_Morse
Helpful | Level 5
4 years ago

Error found when loading /etc/profile:

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 /...
  • Tom_Morse's avatar
    Tom_Morse
    4 years ago

    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.

    :

    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.

About 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.

Need more support

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!