Installing lib without sudo (13: Permission denied) - railstutorial.org

I am trying to follow the HARTL tutorial on nitrous.io, trying to install libraries I get the error....
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
When I try to enter...
apt-get install libxslt-dev libxml2-dev libsqlite3-dev
How can I run this command without root? I saw some reference to this issue here... Install libraries on nitrous.io however, I don't understand how prefixing works. I tried to run....
/home/action apt-get install libxslt-dev libxml2-dev libsqlite3-dev
But, get the error...
-bash: /home/action: Is a directory
Thank you.

If you chose the Rails box template, you can skip this. You can probably start right out on Section 1.2.3 of Chapter 1.

apt (or dpkg, in general) cannot install packages into some user-provided path; packages installed into system paths specified within them.
Link you referred to addresses configure, as it accepts --prefix argument. It have nothing to do with apt. configure usually used to build software from sources.

Related

Error while running 'make install' command to install Apache AGE

After successfully installing postgresql from source code, I got an error while installing Apache AGE. I have attached a screenshot of the error below. It would be great if someone can help out.Terminal view of command and error
I am searching online to find a solution but haven't been able to found yet.
From the image, it looks like you are using postgres 12.13.
For postgres 12, you should checkout to age for pg12 branch by doing git checkout release/PG12/1.1.1 and then make install.
I was also getting errors in a configuration which were resolved by using this command first.
sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison
Try this and this will solve your problem too
In addition to installing the essential libraries before the actual installation using:
sudo apt-get install build-essential libreadline-dev zlib1g-dev flex bison (Note: The above command is for Ubuntu only. If you are not on Ubuntu, See here)
It is also recommended to install the postgreSQL development files using:
sudo apt install postgresql-server-dev-xx
This is not the exact command to be typed in the terminal. Check out the link
here to see the exact compatible command to execute according to the version of Linux you are currently using.

Installing Vivado ML 2021.2 in CentOs but process is hang in 'Generating installed device list'

anybody can help me figure out why the installation is hanging on 'Generating installed device list' and how to solve it without starting the process all over. I am working on CentOs.
Thanks in advance
I think this happens due to following missing packages:
libstdc++6:i386
libgtk2.0-0:i386
dpkg-dev:i386
ncurses5-compat-libs
python3-pip
libtinfo5
libncurses5
As BKN mentioned, you need to install the missing packages.
To avoid starting all over again, you can do the following:
Check the log: cat ~/.Xilinx/xinstall/*.log
Locate the error message. It should look something like:
2022-01-09 10:53:11,458 DEBUG: n.t:? - Executing script Generating installed device list: /tools/Xilinx/Vivado/2021.2/bin/vivado [-nolog, -nojournal, -mode, batch, -source, /tools/Xilinx/Vivado/2021.2/scripts/sysgen/tcl/xlpartinfo.tcl, -tclargs, /tools/Xilinx/Vivado/2021.2/data/parts/installed_devices.txt]
2022-01-09 12:05:35,319 DEBUG: n.t:? - Unable to run GenerateDevListFileLin, exit code: 130, stdout: , stderr: application-specific initialization failed: couldn't load file "librdi_commontasks.so": libtinfo.so.5: cannot open shared object file: No such file or directory failure msg:
application-specific initialization failed: couldn't load file "librdi_commontasks.so": libtinfo.so.5: cannot open shared object file: No such file or directory
2022-01-09 12:05:35,319 DEBUG: n.t:? - Executing script Generating installed device list for Model Composer: /tools/Xilinx/Vivado/2021.2/bin/vivado [-nolog, -nojournal, -mode, batch, -source, /tools/Xilinx/Model_Composer/2021.2/data/xmcGenBoardParts.tcl, -tclargs, /tools/Xilinx/Model_Composer/2021.2/../../Vivado/2021.2, librdi_dsp_tcltasks.so, /tools/Xilinx/Model_Composer/2021.2/data]
The log informs you exactly what the missing package is (in this case it was libtinfo), and also provides you with the script to run after you install the package:
/tools/Xilinx/Vivado/2021.2/bin/vivado -nolog -nojournal -mode batch -source /tools/Xilinx/Vivado/2021.2/scripts/sysgen/tcl/xlpartinfo.tcl -tclargs /tools/Xilinx/Vivado/2021.2/data/parts/installed_devices.txt
Notes:
Make sure to use the Vivado version (here it was 2021.2) and location (here it was /tools/Xilinx) according to your system.
You may need to run the script in sudo if the the permissions for writing are not available in user mode.
I also encounterd this problem on Archlinux with Vivado 2018.3.
But I just installed the library ncurses5-compat-libs, then the problem is solved.
Perhaps you can solve this by checking the library ncurses5-compat-libs.
Download the tar package instead of the self-extracting bin package
Update the java and python version
sudo apt-get install -y python3-pip
Install Dependencies
sudo apt-get install -y libstdc++6
sudo apt-get install -y libgtk2.0-0
sudo apt-get install -y dpkg-dev
NOTE: Without ibtinfo5 the application will not start and without libncurses5 the simulation will fail
`sudo apt-get install -y libtinfo5 libncurses5`
Restart the system
Untar that Vivado package
tar -xzvf Xilinx_Unified_2021.2_1021_0703.tar.gz
Locate the xsetup file in the package
Install the package in batch mode
./xsetup --agree 3rdPartyEULA,XilinxEULA --batch Install --product "Vivado" --edition "Vivado ML Enterprise" --location "/home/USER"
Once the installation has been successfully completed
Locate the settings64.sh file
./settings64.sh
Locate the cable drivers
cd Vivado/2021.2/data/xicom/cable_drivers/lin64/install_scripts/install_drivers
./install_drivers
Installing Vivado Board Files
Get the board package from the git https://github.com/Digilent/vivado-boards.git
From the vivado-board-master package copy the folder board_files undert /vivado-board-master/new/board_files
Paste the board files to Vivado/2021.2/data/boards
From the vivado-board-master package copy the file Vivado_init.tcl under /vivado-board-master/utility
Paste the file Vivado_init.tcl to the Vivado installation
That's it!! You might not need to do all these steps but that is what I ended up doing and it worked for the two machines where I installed Vivado. The installation took less than one hour.
This was originally edited into the question itself by the OP.

Cpplint could not find executable

I am trying to activate cpplint within vs code. I have installed it in Anacanda environment where executable
/home/ubuntu/anaconda3/bin/cpplint
I have a link to it
ls -l /home/ubuntu/anaconda3/bin/cpplint
Unfortunately per visual code cpplint extension still getting error of "Cpplint could not find executable"
Please, advice to configure it correctly.
Download and install
sudo apt-get install python-pip
pip install --user cpplint
Verify install result
ls -l /usr/local/bin/cpplint
If you still have issues check cpplint.cpplintPath and verify the execution path is set correctly.
Also, if you installed cpplint into ~/.local/ directories, by default ~/.local/bin is not included in PATH. So to fix just that add:
export PATH=$PATH:~/.local/bin/
to your ~/.bashrc

Where is libpq-fe.h on a Travis-CI instance?

I'm trying to build a postgres database adapter (luapgsql) as part of my setup:
install:
- sudo luarocks install --server=http://rocks.moonscript.org/dev luapgsql
But the build can't find libpq-fe.h:
Error: Could not find expected file libpq-fe.h, or libpq-fe.h for PQ --
you may have to install PQ in your system and/or pass PQ_DIR or
PQ_INCDIR to the luarocks command. Example: luarocks install luapgsql
PQ_DIR=/usr/local
I've tried what's suggested above, apt-get install libpq-dev and just find \ -name libpq-fe.h. No luck so far. Any ideas where it might be?
So it turns out that running pg_config as part of the install: was the answer. I could read the output in the log.
In the end, the line that worked for me for installing luapgsql on travis is:
sudo luarocks install --server=http://rocks.moonscript.org/dev luapgsql PQ_INCDIR=/usr/include/postgresql PQ_LIBDIR=/usr/lib/x86_64-linux-gnu

Raspberry Pi crosscompile on Ubuntu 13.10 "libstdc++.so.6" not found

I've followed the tutorial on SE as well as trying the extra steps from Hertaville and bootc but I still get the error that prompted the original SE question. I'm stumped.
I get five steps into the process before I get the error:
sudo apt-get install git rsync cmake lib32z1 lib32ncurses5 lib32bz2-1.0
git clone git://github.com/raspberrypi/tools.git
export PATH=$PATH:$HOME/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin
. ~/.bashrc
arm-linux-gnueabihf-gcc -v
Error:
arm-linux-gnueabihf-gcc: error while loading shared libraries:
libstdc++.so.6: cannot open shared object file: No such file or directory
libstdc++.so.6 is present in all three directory trees mentioned in the tutorials as well as ./lib/x86_64-linux-gnu/libstdc++.so.6, but adding the relevant one to the path doesn't help (see below). I suspect there's a library path not being set, but I have no idea what that is.
I'm doing this in a virtual machine running Ubuntu 13.10 with netbeans and other tools, plus a LAMP stack installed. netbeans will build and run C/C++ executables just fine (and obviously IO can do the same from the command line).
Other things I've tried without success
export PATH=$PATH:$HOME/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/arm-linux-gnueabihf/lib
Hertaville suggest adding 32 bit architecture:
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6-i386 lib32stdc++6 zlib1g:i386
And the "build-essential" package:
sudo apt-get install build-essential git
Which also didn't help. I've also rebooted just in case.
As expected the answer is trivial - install lib32stdc++6
The first line above should read:
sudo apt-get install libc6-i386 lib32z1 lib32stdc++6