This is my first stack overflow question. Normally I don't have to ask because it's already been addressed elsewhere, but I've been trying to figure this out for nearly a week and can't do it.
I have maven.
Since the guide on the mahout website basically say "Installing mahout: step 1 - you should install mahout", I had to look elsewhere for a guide. I followed the guide here because it seemed simple enough and made sense:
http:// harish11g.blogspot.co.uk/2012/02/configuring-mahout-clustering-hadoop.html
However, if I don't run
svn co http://svn.apache.org/repos/asf/mahout/trunk as sudo, it won't work.
Similarly, if I don't use sudo for
mvn install
It won't work, failing at the mahout-core stage of the build.
Using sudo, the build succeeds, but because my useraccount did not do the build (root did it) when I import the project to eclipse there are errors. Here is a screenshot:
http://i.imgur.com/MEp3lA0.png
Can I proceed with using mahout despite these errors, or how can I fix them? If I have done something wrong and should reinstall mahout in a different way, I'm happy to but I need to know exactly what I've done wrong.
I tried using maven to install mahout in my home directory and it didn't work there either. My thinking was that I wouldn't need superuser permissions to use the directory, so I didn't use sudo. I also tried changing the permissions of /opt to allow my useraccount to make changes. It still failed, and I've had to use sudo again and the eclipse errors are still showing.
I don't understand why in every guide I've seen online this hasn't been a problem. What could be so different about my user account that means I can't simply use
mvn install
to get mahout downloaded and installed?
If anyone could explain this is in a simple step-by-step way that would be amazing, because I really don't know why I'm having such trouble with this. Also, I've only been using Ubuntu in earnest for the past few weeks (although I had some experience with it over the past year, never really used it for anything serious) for this project, so you'll understand if I'm not immediately aware of some terminal commands or other linux tricks that to others may seem obvious.
Thanks for reading.
Do a ls -l on that directory in the terminal. Does the listed username match the one you are logged in (and running eclipse), or even the username in the terminal prompt?
This is bad: I am logged in as jj and I am trying to edit files owned by hduser:
jj#jj-ThinkPad-T420 ~/dev/crap $ ls -l
total 0
-rw-rw-r-- 1 hduser audio 0 Jun 16 23:37 afile
So we change the ownership of directory to jj:
jj#jj-ThinkPad-T420 ~/dev $ sudo chown -R jj:jj crap
All-clear to compile into this directory:
jj#jj-ThinkPad-T420 ~/dev/crap $ ls -l
total 0
-rw-rw-r-- 1 jj jj 0 Jun 16 23:37 afile
Image depicts Eclipse unable to write compiled classes to a directory owned by somebody else; while Eclipse (and rest of desktop) is owned by you. Root user can do anything on any directory, hence sudo works.
Related
Yesterday, after Ubuntu (or maybe Dell) installed some updates and I restarted, my snap applications were not showing on my sidebar, nor are they present in "show applications" or a normal search.
They are still installed and snap list still shows them, and they will still run via snap run <application>.
I've tried uninstalling them all (although I did not use --purge when I ran snap remove <application>), followed by uninstalling snap itself, then re-installing everything. They are still present but not showing up.
More searching has brought me to sites referencing the XDG_DATA_DIRS environment variable (explained HERE). If I understand correctly this should link all the folders where applications are stored, and the paths within should be separated by colons, not spaces. Thus I ran echo $XDG_DATA_DIRS and was rewarded with:
/usr/local/share/:/usr/share/:/var/lib/snapd/desktop /var/lib/snapd/desktop /var/lib/snapd/desktop
So I suspect my issue is the facts that the snapd directory is listed three times, and it is separated by spaces.
Does anyone have any ideas how I could fix this? I suspect, but am not certain that this is the issue.
I'm on Ubuntu 20.04, using fish shell.
I've found THIS post showing a possible solution, and upon running sudo ag "XDG_DATA_DIRS=" / 2>/dev/null | grep -v snap (and waiting a while) I got the following output (minus a few auth.log references which I've removed) Apologies for the big, possibly irreverent, "data dump"
/etc/profile.d/xdg_dirs_desktop_session.sh:4:DEFAULT_XDG_DATA_DIRS='/usr/local/share/:/usr/share/'
/etc/profile.d/xdg_dirs_desktop_session.sh:18: XDG_DATA_DIRS="$DEFAULT_XDG_DATA_DIRS"
/etc/profile.d/xdg_dirs_desktop_session.sh:21: XDG_DATA_DIRS=/usr/share/"$DESKTOP_SESSION":"$XDG_DATA_DIRS"
/etc/profile.d/apps-bin-path.sh:12: export XDG_DATA_DIRS="/usr/local/share:/usr/share"
/etc/X11/Xsession.d/55gnome-session_gnomerc:17: XDG_DATA_DIRS=/usr/share/gnome:/usr/local/share/:/usr/share/
/etc/X11/Xsession.d/55gnome-session_gnomerc:19: XDG_DATA_DIRS=/usr/share/gnome:"$XDG_DATA_DIRS"
/etc/X11/Xsession.d/60x11-common_xdg_path:5:DEFAULT_XDG_DATA_DIRS='/usr/local/share/:/usr/share/'
/etc/X11/Xsession.d/60x11-common_xdg_path:17: XDG_DATA_DIRS="$DEFAULT_XDG_DATA_DIRS"
/etc/X11/Xsession.d/60x11-common_xdg_path:20: XDG_DATA_DIRS=/usr/share/"$DESKTOP_SESSION":"$XDG_DATA_DIRS"
/usr/share/doc/gnome-software/README.md:24:$ XDG_DATA_DIRS=install/share:$XDG_DATA_DIRS ./install/bin/gnome-software
I'm not certain I have found the correct places to think about updating the environment variable, as none of these referenced /var/lib/snaped/desktop...And this might not be the issue causing the problem at all! Any help would be welcome!
You are running into https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1957948 which will require a fix in snapd.
Using a different shell as your login shell, and then executing fish once it has started, is the right workaround.
I am also having the same problem (suddenly Firefox disappeared in Gnome Shell) and I'm using Ubuntu 21.10 with fish shell. And just like you I could not figure out what caused this XDG_DATA_DIRS modification with the separation by spaces. Because you apparently also use fish I tried switching back to bash as login shell (chsh -s /bin/bash), rebooted and voila, the desktop files are loaded again. After that I set fish as the command to start with in gnome-terminal.
TLDR: My quickfix/workaround was chsh -s /bin/bash to switch to bash as login shell (instead of fish) and reboot.
After following Zanchy's links and reading around the issue I found the solution here!!!
I needed to replace
set XDG_DATA_DIRS $XDG_DATA_DIRS $snap_xdg_path
with
set XDG_DATA_DIRS $XDG_DATA_DIRS:$snap_xdg_path
in /usr/share/fish/vendor_conf.d/snapd.fish
Update: After another update I found my snaped.fish file had reverted, and I needed to edit it again - so this solution may need to be re-applied until fish updates it's snap?
I had the same problem on Linux Lite 6.0 (basically same as Ubuntu 22.04). Snap applications (Spotify, Prospect Mail) would not show up our could not even be found when searching for them. Just logging out and back in again put the application shortcuts in the Menu and all worked fine.
I have a development class Linux server which has been used for a great deal of Perl code creation and testing. On this machine is a /root folder, part of the / partition, and in there is a .cpan folder - which is currently consuming almost 1TB of disk space. We have been having issues with free space on the / partition and I'd like to 'clean up' this .cpan folder. The build sub-directory has 100's of sub-folders, which appear to be already installed CPAN modules. Is it safe to delete those? Is there an option/command I can use inside of cpan to check or assist in the clean up?
I've checked several man pages and on-line searches, but I'm not certain what could be removed without impacting the system. Are there setting I could change that would keep this folder clean in the future?
Thanks.
Short answer: Yes, you can delete that ~root/.cpan/build folder without affecting your system.
On the other hand: It's not recommended that user root has a .cpan folder at all. Usually you would install modules as some other (non-root) user. cpan then complains about not being able to install the modules in question and asks what to do. sudo is one option, I usually choose that. cpan will then compile and test new modules in that user's $HOME/.cpan and when it comes to installation it'll ask you for root's (or your) password (depends on settings in /etc/sudoers).
There's also a setting for the maximum size of the ~/.cpan/build directory. Run:
$ cpan
$ o conf build_cache
and see what the current setting is. For me it's [100] which means 100 MB. Type (e.g.)
$ o conf build_cache 50
$ o conf commit
to set it to 50 MB. The cpan shell will instruct you further.
I'm not perfectly sure but I think you need to run the clean command afterwards to actually reduce the size of ~/.cpan/build, i.e. (in the cpan shell):
$ clean
Just delete it.
All of the files in that directory are temporary files generated while installing or upgrading modules from CPAN. They are not required after the install is complete.
You may want to teach your system administrator about the cpanm tool, which is a bit easier to use, and does some automatic cleanup of its temporary files.
there is a process that will have high cpu usage if you delete the cpan folder. I forgot what process it is, but it scans files
I want to help develop a personal web server project and I'm running into an issue with the project lead.
I thought I finally figured out the problem of the project needing root privileges by adding 'gksu' to every shell command I encountered.
However, the project lead has explained to me that the personal web server project needs heaps more root privileges than just the couple I altered, so that it's best I simply run the project(s) as root.
But I have read time and time again here that running eclipse in root is ill advised.
I've tried running the PyDev project as an external tool, putting gksu in front of the python command, but it immediately stops at the first import that references to one of the sub projects.
So my question is what my best option is.
Starting eclipse in root? I've had problems with that. It's been a while, but I think the problem was something like if you would add files it would be owned by root and thus inaccessible or unuploadable to the repo or something, though if this really is the only option, I'm willing to try again and will come back with the real issue again.
I think one option would be just making the interpreter run as root, while not actually running Eclipse as root.
The trick here is that the Python interpreter can be any shell script, not only the actual Python executable, so, you can create a bash script as:
#!/bin/bash
source $HOME/.config_pydev.bash
python "$#"
and specify that bash script as the Python interpreter (and create a $HOME/.config_pydev.bash to make whatever you need to be able to run your service, such as becoming root).
Note that this requires you to become root without any prompt at .config_pydev.bash -- or you can put gksu before the python "$#" call.
As for running eclipse as root, it should also be possible, but then, you have to do everything as root (including setting your git user credentials in the root account -- and I'd suggest re-cloning all the repositories under that account too, the problems arise when you mix things with your account and the root account).
Still, as noted, being root all the time isn't really advised, but sometimes, practicality beats purity (I'd say that running a webserver as root is much more dangerous than running Eclipse as root, so, I think in your use case, you already have something worse anyways).
I have been playing with my raspberry pi 2 for about a week now. I am a beginner at it so I am learning as i go. I have been watching youtube videos of people doing projects and following there step by step guides but I keep running into the same problems.
I have been using rasbian as the OS, and I am having several problems with root access being denied. I am logged in as the basic user= pi , password = raspberry. So from my reading I have done I should be able to (using sudo), make root commands or accessing the root folder.
I have been trying to edit files using commands like
sudo vim /root/.asoundrc
Whenever i do this i get a page that looks like this-
~
~
~
~
~
~
~
~
"~/.asoundrc" [New File] 0,0-1 All
and nothing will come up for me to edit
My other problem is using the command yaourt
Example:
yaourt -S jasper-tts-google
i get back
-bash: yaourt: command not found
You can't use yaourt unless you install it first. And it cannot be found in the standard repository. You have to install it manually.
As for the editing files. Try using a simpler editor like nano.
To be honest you seem way to newbish to be here. You need to have at least some basic understanding of how a Linux distro works. Vi is an commandline editor and very convenient when you don't have a Desktop Environment.
We can't help you much on this forum since you simply know too little and we can't hold your hand every step of the way if you can't do simple commands/things such as:
Changing directory
Editing files
Change ownerships of files
Sudo
SSH
(un)Installing software using the commandline(aptitude)
Install software without using aptitude.
At least read about what you're trying to do. You should know what yaourt i before installing it. And with every installation of some software from yaourt - you need to have some kind of basic knowledge of PKGBUILD.
So, as far as the first problem, you are opening a file that doesn't exist, so naturally it is an empty file.
yaourt is not installed by default, so naturally you must install it.
I am using Ubuntu 12.04. I have installed doxygen 1.8.3.1 using make install.
I would like to uninstall the doxygen built by make, but I don't find any way to do it using make (uninstall or clean...).
In the Makefile there is no reference to uninstall it the software. :(
Unfortunately I can't use the sudo apt-get remove doxygen because it wasn't an installed. :(
I don't find anything related on the internet.
Can anyone help me, please?
Thank you in advance,
Fabiola
There is no "uninstall" target. You need to do a "rm" be hand. If you used the standard prefix path "/usr/local" then
rm /usr/local/bin/doxygen
rm /usr/local/man/man.1/doxygen.1
(more if you install the docs are wizard). Depend on the user used for install, you need sudo to do it.
I know this question is old, but since it is the first result in google I would like to share another way of uninstalling Doxygen built from source. In the build directory where you've ran make there should by a file name install_manifest.txt. That file contains paths to files that were installed using make install command. All you need to do is to run the following command:
sudo xargs rm < install_manifest.txt
Of course this assumes that you've kept the build directory or at least the install_manifest.txt file. If not you need to remove the files by hand as somebody already suggested.