Zotero won't start; it returns "...profile cannot be loaded..."

I am running Ubuntu MATE 16.04.3 32-bit.
After downloading, I moved the "Zotero_linux-i686" file to /opt and ran the "set_launcher_icon" script.
I then tried to start zotero from /opt/Zotero_linux-i686/, as a user, first by running "sh zotero" in a terminal and second, by double clicking the desktop file. In both cases it failed to start and returned:
"Your Zotero profile cannot be loaded. It may be missing or inaccessible."
What am i missing?
Thanks for your help.

  • .zotero is in /home/david

    I used chown and chmod to get to the following for the user david:
    drwxrwxr-x 3 david david 4096 Sep 12 14:37 .zotero

    in .zotero there is another directory called zotero:
    drwxrwxr-x 2 david david 4096 Sep 12 14:37 zotero


    Running sh zotero from /opt/Zotero_linux-i686:
    david@david-MATE:/opt/Zotero_linux-i686$ sh zotero
    Error: Access was denied while trying to open files in your profile directory.

    Below are the permissions for the files in /opt/Zotero_linux-i686.
    I cannot see a permissions problem, but I'm not sure what I should be looking for.

    Thanks for your help.

    david@david-MATE:/opt/Zotero_linux-i686$ ls -l
    total 109712
    -rw-rw-r-- 1 501 501 237 Sep 11 12:42 application.ini
    drwxr-xr-x 3 501 501 4096 Sep 11 12:42 chrome
    -rw-r--r-- 1 501 501 6832 Sep 11 12:42 chrome.manifest
    drwxr-xr-x 2 501 501 4096 Sep 11 12:42 components
    drwxr-xr-x 3 501 501 4096 Sep 11 12:42 defaults
    -rw-r--r-- 1 501 501 157 Sep 11 12:42 dependentlibs.list
    drwxr-xr-x 2 501 501 4096 Sep 11 12:42 dictionaries
    drwxrwxr-x 3 501 501 4096 Sep 11 12:42 extensions
    drwxr-xr-x 2 501 501 4096 Sep 11 12:42 fonts
    drwxr-xr-x 3 501 501 4096 Sep 11 12:42 gmp-clearkey
    drwxr-xr-x 2 501 501 4096 Sep 11 12:42 gtk2
    drwxr-xr-x 2 501 501 4096 Sep 11 12:42 icons
    -rw-r--r-- 1 501 501 10911568 Sep 11 12:42 icudt58l.dat
    -rw-r--r-- 1 501 501 899 Sep 11 12:42 libfreeblpriv3.chk
    -rwxr-xr-x 1 501 501 515696 Sep 11 12:42 libfreeblpriv3.so
    -rwxr-xr-x 1 501 501 35560 Sep 11 12:42 liblgpllibs.so
    -rwxr-xr-x 1 501 501 2011732 Sep 11 12:42 libmozavcodec.so
    -rwxr-xr-x 1 501 501 261688 Sep 11 12:42 libmozavutil.so
    -rwxr-xr-x 1 501 501 4784 Sep 11 12:42 libmozgtk.so
    -rwxr-xr-x 1 501 501 88624 Sep 11 12:42 libmozsandbox.so
    -rwxr-xr-x 1 501 501 1218556 Sep 11 12:42 libmozsqlite3.so
    -rwxr-xr-x 1 501 501 255168 Sep 11 12:42 libnspr4.so
    -rwxr-xr-x 1 501 501 694760 Sep 11 12:42 libnss3.so
    -rwxr-xr-x 1 501 501 491384 Sep 11 12:42 libnssckbi.so
    -rw-r--r-- 1 501 501 899 Sep 11 12:42 libnssdbm3.chk
    -rwxr-xr-x 1 501 501 178888 Sep 11 12:42 libnssdbm3.so
    -rwxr-xr-x 1 501 501 178616 Sep 11 12:42 libnssutil3.so
    -rwxr-xr-x 1 501 501 17348 Sep 11 12:42 libplc4.so
    -rwxr-xr-x 1 501 501 14148 Sep 11 12:42 libplds4.so
    -rwxr-xr-x 1 501 501 171256 Sep 11 12:42 libsmime3.so
    -rw-r--r-- 1 501 501 899 Sep 11 12:42 libsoftokn3.chk
    -rwxr-xr-x 1 501 501 278480 Sep 11 12:42 libsoftokn3.so
    -rwxr-xr-x 1 501 501 329984 Sep 11 12:42 libssl3.so
    -rwxr-xr-x 1 501 501 75966448 Sep 11 12:42 libxul.so
    -rwxr-xr-x 1 501 501 1001792 Sep 11 12:42 minidump-analyzer
    -rw-rw-r-- 1 501 501 9773623 Sep 11 12:42 omni.ja
    -rwxr-xr-x 1 501 501 108800 Sep 11 12:42 pingsender
    -rw-r--r-- 1 501 501 166 Sep 11 12:42 platform.ini
    -rwxr-xr-x 1 501 501 162040 Sep 11 12:42 plugin-container
    -rwxrwxr-x 1 501 501 368 Sep 11 12:42 set_launcher_icon
    -rw-r--r-- 1 501 501 825 Sep 11 12:42 Throbber-small.gif
    -rwxrwxr-x 1 501 501 92164 Sep 11 12:42 updater
    -rw-rw-r-- 1 501 501 140 Sep 11 12:42 updater.ini
    -rwxrwxr-x 1 501 501 543 Sep 11 12:42 zotero
    -rwxr-xr-x 1 501 501 166588 Sep 11 12:42 zotero-bin
    -rwxrwxr-x 1 501 501 203 Sep 12 14:46 zotero.desktop
    -rw-rw-r-- 1 501 501 7275981 Sep 11 12:42 zotero.jar
  • The profile directory is in ~/.zotero, so that's where you need to look.
  • There is nothing in ~/.zotero except another directory called zotero (that is ~/.zotero/zotero). /zotero contains nothing.
    The two errors I have received indicate that there is an access problem, but I don't seem to be able to do anything about it. That is, I am unable to see where permissions might be the problem.
    Anyway, thanks for your interest.

  • Are you able to create a file within ~/.zotero/zotero manually?

    If not permissions, this could also be due to SELinux/AppArmor or similar. But something on your system seems to be preventing Zotero from creating a profiles.ini and a profile folder within ~/.zotero/zotero.
  • You can also try deleting ~/.zotero altogether and seeing if it's recreated.
  • I can create a file and save it to ~/.zotero/zotero manually.

    I deleted ~/.zotero, then ran sh zotero in /opt as user 'david.'
    ~/.zotero/zotero was replaced in the /home/david. In addition the following two errors were returned.
    1. in the terminal from which I ran sh zotero:
    " Access was denied while trying to open files in your profile directory."
    2. then after a pause of about 1 second, in a GUI:
    " Your Zotero profile cannot be loaded. It may be missing or inaccessible."

    The newly created ~/.zotero/zotero was empty.


  • edited September 13, 2017
    I deleted Zotero from /opt and ~/.zotero/zotero from /home/david.
    I deleted the downloaded tarball of Zotero
    I downloaded a new copy of Zotero from zotero.org and extracted it to /opt.

    I ran the set_launcher_icon and zotero scripts as the instructions suggest:
    Here are the returns:

    1. david@david-MATE:/opt/Zotero_linux-i686$ sh set_launcher_icon
    set_launcher_icon: 7: set_launcher_icon: Bad substitution
    /opt/Zotero_linux-i686/zotero.desktop is not writable

    2. david@david-MATE:/opt/Zotero_linux-i686$ sudo sh set_launcher_icon
    set_launcher_icon: 7: set_launcher_icon: Bad substitution

    3. david@david-MATE:/opt/Zotero_linux-i686$ sh zotero
    Error: Access was denied while trying to open files in your profile
    directory.
    The GUI also returned: " Your Zotero profile cannot be loaded. It may be missing or inaccessible."
    As before, an empty ~/.zotero/zotero had been created.
  • I started over...
    I extracted a copy of Zotero to /home/david
    I ran the two scripts from /home/david/Zotero_linux-i686.

    The results were the same as before.
  • It shouldn't matter, but since this doesn't make any sense, try running this without sh, i.e. simply cd into the Zotero_linux-i686 directory and run ./zotero
  • I tried ./; here is what happened:

    david@david-MATE:/opt/Zotero_linux-i686$ ./set_launcher_icon
    /opt/Zotero_linux-i686/zotero.desktop is not writable

    david@david-MATE:/opt/Zotero_linux-i686$ sudo ./set_launcher_icon
    [sudo] password for david:
    {Note: the line that followed returned cleanly, indicating that set_launcher_icon ran correctly. I added ./zotero directly on to it.

    The contents of zotero.desktop are:
    [Desktop Entry]
    Name=Zotero
    Exec=bash -c "$(dirname $(readlink -f %k))/zotero -url %U"
    Icon=/opt/Zotero_linux-i686/chrome/icons/default/default256.png
    Type=Application
    Terminal=false
    MimeType=text/plain
    }

    david@david-MATE:/opt/Zotero_linux-i686$ ./zotero
    Error: Access was denied while trying to open files in your profile directory.
    And from the GUI: Your Zotero profile cannot be loaded. It may be missing or inaccessible.
    ~/.zotero/zotero were created.

    Clicking on the newly modified zotero.desktop returns:
    "Your Zotero profile cannot be loaded. It may be missing or inaccessible."

    Running zotero as root:
    david@david-MATE:/opt/Zotero_linux-i686$ sudo ./zotero
    [sudo] password for david:
    The return is a GUI warning:
    "You appear to be running Zotero as root. This is insecure and may prevent Zotero from functioning when launched from your user account.
    If you wish to install an automatic update, modify the Zotero program directory to be writable by your user account."

    That caused a freeze, finally this was returned in the terminal:
    "1505312840871 addons.update-checker WARN Update manifest for zoteroOpenOfficeIntegration@zotero.org did not contain an updates property
    Segmentation fault (core dumped)"

    Go figure: I have done nothing whatsoever with OpenOffice Integration.

    As regards the GUI admonishment to "modify the Zotero program directory to be writable by your user account": As noted above, I tried installing and running the whole enchilada from /home/david. It made no difference.

    Meanwhile, and just FYI, the permissions for /opt/Zotero_linux-i686 are:
    Owner 501 - user#501 Folder Access (grayed)Create and delete files
    Group 501 Folder Access (grayed)Create and delete files
    Others Folder Access (grayed) Access files
    Execute: (grayed)
    SELinux context: unknown
    or
    drwxrwxr-x 11 501 501 4096 Sep 13 08:05 Zotero_linux-i686

    As Charlie Brown would say: Good Grief!
  • Have you tried (temporarily) disabling SELinux? I'm a little surprised you'd have that in an Ubuntu 16.04 version, but if that's either a customized choice or something peculiar to the MATE build, it'd explain why you're getting different results from other people running Ubuntu (as it's quite rare with Ubuntu defaulting to app armor).
    http://www.revsys.com/writings/quicktips/turn-off-selinux.html should work (obviously if you get "The program 'selinuxenabled' is currently not installed" message right at the beginning, don't proceed. But vanilla Ubuntu says "Security context" not "SELinux context" in the permissions.)
  • Not an issue, I guess:

    david@david-MATE:~$ selinuxenabled
    The program 'selinuxenabled' is currently not installed. You can install it by typing:
    sudo apt install selinux-utils
    david@david-MATE:~$
    david@david-MATE:~$ && echo enabled || echo disabled
  • I don't know. Some general ideas:

    If this is your personal computer with a single user, I'd focus on running this in your home profile (e.g. ~/.local/share/applications or so) rather than opt (I know you're already tried this, but you're doing all troubleshooting in /opt and I'd focus on home). Installing Zotero globally is rather inconvenient since you'll always have to run as sudo to update, which is annoying.

    You could also see if the unofficial PPA works better, though I'm not quite sure why it would: https://launchpad.net/~smathot/+archive/ubuntu/cogscinl

    Finally, if this were me, I'd extract to somewhere hidden on home, then run sudo ./zotero, then on successful installation and first run transfer ownership of both the profile and the program directory to the regular user. (i.e. sudo chown -R $USER ~/.local/share/applications and sudo chown -R $USER ~/.zotero
    This last one is probably not good practice, so don't take as official advice & use at your own risk.
  • I tried the PPA route, and as you foresaw, it failed.

    I will try your other suggestions soon.

    Thanks very much for your help and interest.
  • For what it's worth, I asked for help on the Ubuntu forum...

    Here's a link:

    https://ubuntuforums.org/showthread.php?t=2371344&p=13686436#post13686436
  • Are you running AppArmor? I believe that's more common than SELinux these days.

    @adamsmith's sudo/chown suggestion might work, but I'd be surprised if whatever on your system is blocking write access to ~/.zotero/zotero started allowing it to deeper directories later.

    There shouldn't be any need to run Zotero as root, and you shouldn't really do so.

    And just to clarify this, this is just the standard Mozilla profile creation process, since Zotero is based on a build of Firefox — it's the same thing that happens in ~/.mozilla/firefox when you run Firefox. It's possible that something on your system is misidentifying Zotero as Firefox and preventing the write to ~/.zotero/zotero for that reason (though I don't know why it's allowing ~/.zotero/zotero to be created in the first place if that's the case).
  • Apparmor is in use on my computer:

    david@david-MATE:~$ sudo apparmor_status
    [sudo] password for david:
    apparmor module is loaded.
    18 profiles are loaded.
    18 profiles are in enforce mode.
    /sbin/dhclient
    /usr/lib/NetworkManager/nm-dhcp-client.action
    /usr/lib/NetworkManager/nm-dhcp-helper
    /usr/lib/connman/scripts/dhclient-script
    /usr/lib/cups/backend/cups-pdf
    /usr/lib/lightdm/lightdm-guest-session
    /usr/lib/lightdm/lightdm-guest-session//chromium
    /usr/lib/snapd/snap-confine
    /usr/lib/snapd/snap-confine//mount-namespace-capture-helper
    /usr/sbin/cups-browsed
    /usr/sbin/cupsd
    /usr/sbin/cupsd//third_party
    /usr/sbin/ntpd
    /usr/sbin/tcpdump
    libreoffice-oopslash
    libreoffice-senddoc
    libreoffice-soffice
    libreoffice-xpdfimport
    0 profiles are in complain mode.
    4 processes have profiles defined.
    4 processes are in enforce mode.
    /sbin/dhclient (1036)
    /usr/sbin/cups-browsed (853)
    /usr/sbin/cupsd (785)
    /usr/sbin/ntpd (1136)
    0 processes are in complain mode.
    0 processes are unconfined but have a profile defined.
    david@david-MATE:~$

    Also,

    david@david-MATE:~$ sudo /etc/init.d/apparmor status -l
    ● apparmor.service - LSB: AppArmor initialization
    Loaded: loaded (/etc/init.d/apparmor; bad; vendor preset: enabled)
    Active: active (exited) since Wed 2017-09-13 15:32:30 MDT; 25min ago
    Docs: man:systemd-sysv-generator(8)
    Process: 303 ExecStart=/etc/init.d/apparmor start (code=exited, status=0/SUCCESS)

    Sep 13 15:32:30 david-MATE systemd[1]: Starting LSB: AppArmor initialization...
    Sep 13 15:32:30 david-MATE apparmor[303]: * Starting AppArmor profiles
    Sep 13 15:32:30 david-MATE apparmor[303]: Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
    Sep 13 15:32:30 david-MATE apparmor[303]: Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
    Sep 13 15:32:30 david-MATE apparmor[303]: ...done.
    Sep 13 15:32:30 david-MATE systemd[1]: Started LSB: AppArmor initialization.


    I don't know what any of this means. There is a mention of firefox in the second of the two queries.

    Is any of this germane?

    Thanks again for your kind interest.
  • We can't help with AppArmor, but that's quite likely what's causing it. Zotero needs to be able to write to its profile directory and data directory.
  • That's odd though. The only profiles david12 has that aren't running on my (16.04 Ubuntu with Zotero working) machine are
    /usr/sbin/ntpd
    /usr/sbin/tcpdump
    libreoffice-oopslash
    libreoffice-senddoc
    libreoffice-soffice
    libreoffice-xpdfimport

    and none of these seem like remotely plausible candidates.
  • edited September 14, 2017
    That's true. I'd still try disabling that temporarily, though. I don't really have any other suggestions, beyond checking system/security/kernel logs. Generally when things are blocked, they're logged somewhere.
  • Zotero is now in /home/david/.local/share/applications.

    I attempted to get things going as you suggested above.

    It did not work.

    I stopped apparmor... it made no difference.

    Now here is something very strange (to me.) Out of frustration I did this: ./zotero-bin. The result was a new instance of Firefox opening.
  • david12: have you had any success in your struggle, since September?
    I seem to be experiencing the same issue.
  • One thing that I don't think we've had people try is to just wipe ~/.zotero -- i.e. copy all contents of that folder somewhere else just to be safe and then remove ~/.zotero entirely.
    That'd be my next try.
  • folquet: I stopped trying to install it; I have not made an attempt since the one referred to in my 14/Sept/2017 post. I have a Windows machine. I do my Zotero stuff on it. I will try again to install it on Linux, but I was waiting for some time to pass. There is no telling what or where the impediment is. I hope it will just go away eventually. Sorry... I wish I had something to contribute, but I don't.
Sign In or Register to comment.