wine can only find libs with sudo - linux

I have installed wine recently, but I can only run programs with wine using sudo.
/opt/wine-devel/bin/wine: error while loading shared libraries: libwine.so.1: cannot open shared object file: No such file or directory
It gives this error, I checked to see if wine was trying find the libs in the wrong dir, but isn't the case since if I use:
sudo wine program.exe
it runs correctly.

I solved the problem just doing a chown <user> /opt/wine-<branch>. But doesn't do it after has used the wine with sudo and installing some packages or programs, they will be yet unreachable locked by the permissions, use chown just after download wine from the winehq page.

winecfg
/opt/wine-stable/bin/wine: error while loading shared libraries: libwine.so.1: cannot open shared object file: No such file or directory
wine-5.0.1 *
Mate 1.24.0 *
Linux Mint-20 *
Kernel 5.4.0-40
After changing to Mint 19 wine didn't work any longer. What shall I do?

Related

CMake: Fail to install symlink on ssh-mounted filesystem

I am cross-compiling a project on my desktop, and installing it on a device which is mounted via ssh, using sshfs, like so:
sudo sshfs -o allow_other -o follow_symlinks user#192.168.12.100:/ /mnt/remote
The build is successful, but when I try to "sudo make install", I receive the following message:
-- Installing: /mnt/remote/usr/lib/libprop.so.5.1.5
-- Installing: /mnt/remote/usr/lib/libprop.so.5
CMake Error: failed to create symbolic link '/mnt/remote/usr/lib/libprop.so.5': i/o error
CMake Error at cmake_install.cmake:176 (file):file INSTALL cannot duplicate symlink
"/home/ubuntu/libprop/build/lib/libprop.so.5" at
"/mnt/remote/usr/lib/libprop.so.5".
The library and the symlink are copied and created. That is, it seems that the installation actually succeeds, but CMake thinks otherwise.
The filesystem is not ro, as can be seen in mount output:
user#192.168.12.100:/ on /mnt/remote type fuse.sshfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
And I can see the entry under /mnt/ (I chown'd and chmod'd it for user access, thinking it might solve the problem):
drwxrwxr-x 1 ubuntu ubuntu 4096 Mar 11 13:43 remote
and I can access it event without root permissions, copying and deleting files without a problem.
This process has been working for me. I have no idea what was changed that it stopped. Could be something in my environment or maybe in the destination platform.
I would be grateful for any assistance.
OK, I have found the problem... I shouldn't be using -o follow_symlinks. I guess this can cause other problems (I used it for a reason), but for the purpose of compiling and installing, it works.

What's the safe, easy way to install noweb on Windows 10?

Apparently there's only one person that managed to do it. I'm following his installations step by step precisely, but I do not have the iconc compiler. Following the instructions of the Makefile, I'm using icont (which I do have), but then Jim's instructions do not work at all.
$ make install
[...]
cp totex disambiguate noidx tohtml elide l2h docs2comments autodefs.tex autodefs.icon autodefs.yacc autodefs.sml autodefs.pascal autodefs.promela autodefs.lrtl autodefs.asdl autodefs.mmix xchunks pipedocs /c/nowebFiles/usr/local/noweb/lib
cp: cannot stat `totex': No such file or directory
cp: cannot stat `disambiguate': No such file or directory
cp: cannot stat `noidx': No such file or directory
cp: cannot stat `tohtml': No such file or directory
cp: cannot stat `elide': No such file or directory
cp: cannot stat `l2h': No such file or directory
cp: cannot stat `docs2comments': No such file or directory
cp: cannot stat `xchunks': No such file or directory
cp: cannot stat `pipedocs': No such file or directory
make[1]: *** [install] Error 1
make[1]: Leaving directory `/home/Melba/noweb-2.11b/src/icon'
make: *** [install-code] Error 2
The problem here is that icont creates totex.icx and not totex. Is this due to my not having iconc and am using icont instead? I installed icont from its homepage and it did not seem to come with iconc. What should I do?
Just so you know: I've changed the lib/Makefile to call these programs as totex.icx and so I'm able to get the whole thing to build, but noweave doesn't work then, so I did it all from scratch and stopping to this point above to ask this question here because the only I thing I have different from Jim is that he might have had the iconc compiler and I don't. (He's also on Windows 7 apparently, but I don't think that makes any difference at all here.) Thank you!
I've just started using Windows 10 and I've installed the Debian linux environment from the Microsoft Store (weird to type that). This is under the Windows SubsystemforLinux (WSL). I first updated the default software, as they recommend:
sudo apt-get update
sudo apt-get upgrade
Following that, I installed aptitude, the Debian package manager I prefer (apt-get install aptitude), then emacs and noweb. (I use both for almost all my work.) Installing noweb, pulls in tex and other supporting programs into the WSL .
I just created a simple noweb file and noweave produced compilable tex, which worked fine with pdflatex. Thus, it appears to be much easier now to get noweb to work on Windows 10.
A potential caveat is that I don't yet fully understand how the two systems (native Windows 10 and WSL linux subsystem) interact together. Earlier today, I found that I couldn't not save a file from Emacs running in the native Windows 10 environment to the WSL Debian linux environment. But I can save a file to the native Windows 10 file system from WSL linux Emacs. So while one can now relatively easily install noweb on Windows 10, it may be too cumbersome a workflow.

How can I solve stdarg.h No such file or directory while compiling out-of-tree Linux kernel module?

I have an out-of-tree Linux kernel module that I need to compile. When I execute "make" in the kernel module directory I am getting:
"fatal error: stdarg.h: No such file or directory"
Before starting the build I installed the header file based on my Linux distribution.
$sudo apt-get install kernel-headers-$(uname -r)
How can I solve this compilation error? (my distribution is Ubuntu 16.04 with linux-headers-4.15.0-42-generic)
I ran a search of stdarg.h with the "locate" command to see if I can sport the file on the system.
I got:
/usr/include/c++/5/tr1/stdarg.h
/usr/lib/gcc/i686-linux-gnu/5/include/cross-stdarg.h
/usr/lib/gcc/i686-linux-gnu/5/include/stdarg.h
...
It tells me there is at least one stdarg.h provided by the compiler.
I tried to include the path "/usr/lib/gcc/i686-linux-gnu/5/include" in the kernel module Makefile so stdarg.h can be picked up. It did not work (while building, another reference to stdarg.h in the official kernel header was not being resolved).
I finally created a symlink directly under:
/usr/src/linux-headers-4.15.0-42-generic/include
$sudo ln -s /usr/lib/gcc/i686-linux-gnu/5/include/stdarg.h stdarg.h
This was just enough to solve the compilation issue.
I am wondering if the kernel headers should come with an implementation of stdarg.h by default (that is the first time I encounter this issue). I have also read that the compiler provide one implementation and most of the time it is better to use the compiler version.
Updated note: if the above solution still does not solve the problem:
Before running make again, do a make clean. Do a ls -la in the folder and look for a ".cache.mk" file. If this is still there, remove it and run "make" again. It should solve the problem.
I had the same issue with CentOS 9, and the other answers didn't work for me. Apparently the problem is that in more recent kernels, it shouldn't be <stdarg.h> but <linux/stdarg.h>. With virtualbox guest additions 6.1.34, it correctly checks for kernel with a version of 5.15.0 or more. But my kernel is the 5.14.xx, meaning the include for stdarg.h is wrong.
Solving the issue
Dependencies
Install all the dependencies for the guest edition
gcc make perl kernel-devel kernel-headers bzip2 dkms
Installation
Run the Guest Addition installation like you would normally. It will fail by saying it is unable to compile the kernel modules. That's expected. It will copy all the file we need to the VM disk.
Editing
We now need to edit the erroneous files.
/opt/VBoxGuestAdditions-6.1.34/src/vboxguest-6.1.34/vboxguest/include/iprt/stdarg.h
/opt/VBoxGuestAdditions-6.1.34/src/vboxguest-6.1.34/vboxsf/include/iprt/stdarg.h
On line 48 (may change for different versions), it check for a version of Linux and select the correct header depending on the version. We need to replace if RTLNX_VER_MIN(5,15,0) with if RTLNX_VER_MIN(5,14,0) in both files.
Compile the kernel modules
We can now compile the kernel modules, and the error should be gone.
sudo rcvboxadd quicksetup all
I personally got an error the first time, but then I recompiled without changing anything and it worked.
Remember that it's just a workaround, it may not work with different versions.
If you using Arch Linux with zen-kernel:
sudo CPATH=/usr/src/linux-zen/include/linux vmware-modconfig --console --install-all
I had the same problem with VirtualBox 6.1.0 running archlinux with kernel 6.1.9.
I downloaded VirtualBoxGuestAdditions_7.2.0.iso file from https://download.virtualbox.org/virtualbox/7.0.2/ link(you may select more appropriate to your VirtualBox version) and assigned as an optical drive to virtualbox machine. After start of the system running blkid command on terminal showed the name of CD rom device which was /dev/sr0. then I created iso folder on
/mnt folder
mkdir /mnt/iso
and mounted cd drive to that folder
mount -o loop /dev/sr0 /mnt/iso
after I cd'ed to /mnt/iso
cd /mnt/iso
and manually run VirtualBoxGuestAdditions.run script
sh ./VirtualBoxGuestAdditions.run
which successfully compiled and istalled required virtualbox guest modules.
Now everytime I update kernel version I redo the same procedure. And it work fine.
It also remove old 6.1.0 guest additons folder.

Installation Pymol error

I am trying to install pymol on Centos 6.5. After running setup.sh it looks everything is fine. But when I launch pymol I obtain this error:
/opt/pymol/pymol.exe: error while loading shared libraries: libGLU.so.1: cannot open shared object file: No such file or directory
Any help,please?
I am quite new in linux as you may notice...
Follow te instrucctions here and also check that you have installed libGLU, on Ubuntu this library is called libglu1-mesa.

Cannot run Code::Blocks: libwx_gtk2u-2.8.so.0 not found

I am trying to install Code::Blocks 10.05 from (non-SVN) sources (codeblocks-10.05-src.tar.bz2). My OS is Ubuntu 11.04. I needed to download and install wxWidgets first (I now have wxGTK-2.8.12), which seemed to work. I compiled it according to these instructions:
http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Linux
Then I configured C::B with
./configure --with-wx-config=/opt/wx/2.8/bin/wx-config
and ran
export LDFLAGS="-Wl,-R /opt/wx/2.8/lib"
make
sudo -i
make install
When trying to run C::B, I get the following error:
codeblocks: error while loading shared libraries: libwx_gtk2u-2.8.so.0: cannot open shared object file: No such file or directory
The same question was asked here: error while loading shared libraries, but the suggested solution (namely adding the wxWidgets config to the options passed to configure) didn't work for me.
The output of wx-config --prefix is /opt/wx/2.8,
The output of wx-config --libs is -L/opt/wx/2.8/lib -pthread -lwx_gtk2u-2.8,
and that of which wx-config is /opt/wx/2.8/bin/wx-config.
I looked for the library and found /opt/wx/lib/libwx_gtk2u-2.8.so.0 to be a link to libwx_gtk2u-2.8.so.0.8.0 in the same folder.
What might be wrong here?
The problem is that the program cannot find the WX widgets libraries at run time. You will need to set your LD_LIBRARY_PATH variable to include the location of wxWidgets like this:
LD_LIBRARY_PATH=/opt/wx/2.8/lib ./codeblocks
The reason why its failing is because you compiled codeblocks against wxWidgets found in /opt/ and not the one installed in /usr/; the program doesn't know to look in /opt for the wx libraries.
Probably the easiest way to get code::blocks up and running on Ubuntu is to just install it via the Synaptic Package Manager. Just type in codeblocks into 'Quick search'. Find codeblocks on the list and just right-click to mark for install. Any dependencies and missing libraries needed will automatically be handled and installed by Synaptic as necessary.
If you're interested in trying the C::B nightly builds on Ubuntu then you'll want to checkout Jens' unofficial debian-repository here.
You can visit Why do I have to define LD_LIBRARY_PATH with an export every time I run my application? for a more generic case. For a particular case like yours you can follow the below given steps
If you had installed wxGTK then you would see the file in /usr/local/lib. You would get this error when the the above path is not as part of the makefile. I received this error while starting wxFormBuilder after building from source on CentOS. There are 2 approaches.
Approach 1: Putting the path in .bashrc
gedit /home/{your-username}/.bashrc
Then after the line # User specific aliases and functions paste the following
export $LD_LIBRARY_PATH=/usr/local/lib.
This would work for fine but for the current login, but for other users like root you might have to do the same in the respective .bashrc files.
Approach 2: Creating your own conf files
cd /etc/ld.so.conf.d
gedit wxformbuilder.conf
Give the path /usr/local/lib and save the file.
ldconfig (To update the library path).

Resources