Installing GCC? - linux

I am trying to install GCC (most importantly, the g++ compiler) on an Ubuntu machine where I don't have 1) sudo permissions or 2) apt access (any apt command gives the error Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)).
I was able to successfully make the uncompressed archive that I downloaded from an official GNU GCC mirror site, but make install failed with the following error:
mkdir: cannot create directory ‘/usr/libexec’: Permission denied
Makefile:181: recipe for target 'install' failed
Any ideas for how to get a copy of g++ 6.0 or higher? Is there a pre-compiled binary I can download from anywhere?. I also don't have a user interface (this is a remote machine I am SSHing into), so a direct link to a file would be greatly appreciated.

Related

RAD SERVER 10.4.1 " E2597(SystemPath)\ld-linux.exe: error: cannot find -lz " deploying to Linux 64

I am trying to re-compiling some API in the 10.4.1 for Ubutun 18.04.4 LTS ( builded in RAD SERVER 10.3), but ever API who has this lib "REST.Response.Adapter" the compiler fails and i get this error :
[DCC Error] E2597 C:\Program Files (x86)\Embarcadero\Studio\21.0\bin\ld-linux.exe: error: cannot find -lz
[DCC Fatal Error] F2588 Linker error code: 1 ($00000001).
I already installed some linux patch for 10.4.
I tried to reinstall the linux SDK, nothing....
Someone know anything about it ?
Firstly, you need to install zlib1g-dev in your Linux system by the following command in a terminal.
sudo apt-get install zlib1g-dev
To ensure you have installed all the required libraries, you can also use this command:
sudo apt-get install joe wget p7zip-full curl build-essential zlib1g-dev libcurl4-gnutls-dev
Secondly, reboot the Linux system and/or restart at least the PAServer.
Afterward, go to your SDK manager in the Delphi IDE within Linux 64-Bit and press the button Update Local File Cache below the remote path list under Properties.
BTW: If you had followed these instructions http://docwiki.embarcadero.com/RADStudio/Sydney/en/Linux_Application_Development properly in all points, this would not have happened to you ;).

Cannot make kernel .config

I'm setting up RTLinux on a Siemens machine. I cannot seem to generate the config file for the kernel.
I have been following this guide: Install RT Linux patch for Ubuntu and I get stuck at Step 4
I started by installing ubuntu 16.10. Then I installed the linux kernel (linux-5.2.19.tar.gz) and also the RTLinux patch (patch-5.2.19-rt10.patch.gz). I created a working irectory ~/kernel. I unzipped the kernel into this directory and successfully patched the kernel.
I now need to install ncurses:
sudo apt-get install libncurses-dev libssl-dev
When I do this I get a bunch of 404 errors like it cannot reach the archives.
Because of this I went and installed ncurses manually. I went to https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.1.tar.gz, downloaded the tar and performed the following steps.
cd ncurses-6.1
./configure --prefix=/opt/ncurses
make
sudo make install
ls -la /opt/ncurses
The final line verified the install was correct.
Now I navigate back to my ~/kernel/linux-5.2.19 directory and perform a make menuconfig
and receive the following errors:
*
* Unable to find the ncurses package.
* Install ncurses (ncurses-devel or libncurses-dev
* depending on your distribution).
*
scripts/kconfig/Makefile:206: recipe for target 'scripts/kconfig/mconf-cfg' failed
make[1]: *** [scripts/kconfig/mconf-cfg] Error 1
Makefile:559: recipe for target 'menuconfig' failed
make: *** [menuconfig] Error 2
I appreciate any responses/advice.

How to install sshfs without sudo?

I'm trying to build sshfs on a cluster where I don't have root access.
Following these instructions I did:
1) Built and installed ninja and meson
2) Built libfuse with meson --prefix=/cluster/home/user/fuse
The problem comes when trying to install libfuse (ninja install), which requires root credentials. I get the following error:
Running custom install script
'/cluster/home/user/fuse/libfuse/util/install_helper.sh
/cluster/home/user/fuse/etc /cluster/home/user/fuse/bin
/usr/lib/udev/rules.d' chown: changing ownership of
‘/cluster/home/user/fuse/cluster/home/user/fuse/bin/fusermount3’:
Operation not permitted
How can I install libfuse to build sshfs?
fuse simply requires suid. You can't avoid it.
In my case the problem is that fusermount is available but the installed sshfs requires fusermount3. So basically once I compile if I execute ./sshfs remote#remote.com:folder ./mount_here I get the error: fuse: failed to exec fusermount3: No such file or directory
What I have done is (in any folder in your $PATH) create a symbolic link as:
ln -s /usr/bin/fusermount fusermount3
and now my installed sshfs works. By time March 2022.
My problem is the same as the person asking in this post. I run on a cluster and I am not root so no able to install sshfs via apt-get

unable to run newly compiled openssl

I have a new Linux install (Ubuntu Mini Remix 16.04) and I did the following:
sudo apt-get install build-essential
sudo apt-get install git
git clone https://github.com/openssl/openssl.git
cd openssl
./config --openssldir=/usr/local/ssl
make
make test
sudo make install
I then typed in openssl in the CLI and got this message:
openssl: error while loading shared libraries: libssl.so.1.1: cannot open shared object file: No such file or directory
Maybe /usr/local/lib is not in /etc/ld.so.conf?? If it is just try to run 'ldconfig' as root with no params, if it's not just add it and run 'ldconfig'.
try this:
do "which openssl" to confirm you're looking at the correct copy. do "ldd openssl" to get a list of what dynamic libraries it's expecting. Given the error you got there should be an error in the LDD output showing it can't find libssl.so.
Your "make install" may have simply left out "ldconfig". Do "ldconfig" to get the system to refresh it's information on where shared libraries are (it gets that from /etc/ld.so.conf and /etc/ld.so.conf.d/.
You can use the LD_LIBRARY_PATH environment variable to force it to use a certain directory to search for shared libraries, that often fixes this error.

Permission denied - Static Lxml Build Failed - Plone - CentOS

I am using the Unified Installer for Plone 5.0 on CentOS server.
./install.sh zeo --target="${HOME}/plone" --static-lxml --build-python
CentOS has an older version of lxml2 library so I have to build static lxml & Python. Error is as follows:
lxml: Static build requested.
Installing lxml.
lxml: CMMI libxml2 ...
lxml: Using libxml2 download url ftp://xmlsoft.org/libxml2/libxml2-2.9.2.tar.gz
libxml2: Downloading ftp://xmlsoft.org/libxml2/libxml2-2.9.2.tar.gz
libxml2: Unpacking and configuring
sh: ./configure: Permission denied
libxml2: cmmi failed: /tmp/tmpAyLWxdbuildout-libxml2
While:
Installing lxml.
Error says "Permission denied", so I tried installing with sudo and logging in as root. Also changed permissions of /tmp to 777. Any suggestions are appreciated.
You are trying to reach read/write permission for root user. You can simply change your user to root.
$ su -
Or if your user is in sudoers group you can use;
$ sudo ./install.sh ....
You can check if your user is in sudoers group or not with
root$ cat /etc/sudoers
Figured it out. The installer was running a script in /tmp which was set to non-executable. Remount /tmp as executable and it works fine.

Resources