I need to write some data in several database.
I choose sqlapi.com
I have made it for mysql and mssql.
Now I have Problem with Oracle database.
I have installed server and client on Ubuntu.
In browser it works, but sqlapi says:
libnnz10.so: cannot open shared object
file: No such file or directory
DBMS API Library 'libclntsh.so'
loading fails
This library is a part of DBMS client
installation, not SQLAPI++
Make sure DBMS client is installed and
this required library is available for
dynamic loading
Linux/Unix:
1) The directories in the user's
LD_LIBRARY_PATH environment variable
2) The list of libraries cached in
/etc/ld.so.cache
3) /usr/lib, followed by /lib
There are both of these files depp inside /usr/lib.
I have tried a lot of ways to say eclipse path to this folder, but nothing works.
Thanks for help.
I think that you need to set the variable LD_LIBRARY_PATH to the file path of the shared lib.
e.g.
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/oracle/instantclient/lib
set the variable in .profile or .bash_profile. This depends on the shell you are using.
Update
Due to some new security requirements in ubuntu (see https://bugs.launchpad.net/ubuntu/+bug/366728 for details) you cannot use LD_LIBRARY_PATH for non-interactive shells. Use the following procedure (adjust the oracle path to your needs):
echo "/opt/oracle/product/whatever/lib" | sudo tee /etc/ld.so.conf.d/oracle.conf
sudo ldconfig -v
Related
I trying to "debianization" my small programm. My programm has "templates" directory. This folder contains the files the user is working with. The user will also store their files in this directory. But all these operations are done by my program, and I want to hide this folder in the "HOME" directory. But I do not understand how this can be done with the debianization of the package? I can create a bash script that will create the necessary folders for me, but how can I transfer an already prepared folder with files to a package?
A deb package can only install things in /usr and configuration files in /etc. You generally should not modify users' home directories during installation; packages might create customizations for individual users if and when they interact with the installed package e.g. by running an installed utility for the first time.
Obvious workarounds such as looping over all individual users' home directories from the postinst or configure script violate Debian policy, create unpleasant surprises, and obviously don't work for users whose accounts are created after the package was installed.
I installed "StarCluster" using the terminal on my MacOs by following instructions from the link provided below. Now, I need to edit the configuration file to add my AWS credentials. However, I am not sure which folder "StarCluster" is installed on my hard drive. Does anyone know how to locate the folder ? I would appreciate your help.
http://star.mit.edu/cluster/docs/latest/installation.html
According to the easy-install docs:
By default, packages are installed to the running Python installation's site-packages directory, unless you provide the -d or --install-dir option to specify an alternative directory, or specify an alternate location using distutils configuration files.
Here's a guide to finding your site-packages directory.
Problem
The question pretty much says it all. I used the plugin: "cf local" to get the .droplet file for my app in PCF. However, I have no idea how to expand or view the contents of the file.
What I tried
I tried adding a .zip at the end, but that did not work.
I tried viewing in NotePad, but that did not work.
Notes
We are using a Diego back-end which prevents us from using "cf files".
It shouldn't matter but we are deploying a .NET application
Related: Is it possible to download all files of an application in Cloud Foundry?
It's a gziped tar archive. Try adding a .tgz or .tar.gz extension. You may need a third party archive tool, I don't know if Windows will open that file by default. 7zip or something comparable should open it.
Daniel was on the right track, however I wanted to post exactly what I used as an alternative to an extraction utility.
I found that the easiest way is to use bash, within Windows. When we installed Github desktop there was an option to use bash and most of us, in my area, have done this.
If you have already installed it then: Goto Preferences an choose your Git-Shell. Under default Shell you can choose between: CMD, Git Bash, Powershell or Custom.
Once that is in place you can navigate to the folder where the .droplet file lives and execute the following command:
tar -xvzf app-name.droplet
This will extract the contents into a folder called "app" in the current directory which has the contents of your asset that would be in PCF.
I'm trying to install the commerce module in Drupal 8 however I get the error 'BC math PHP extension not found'.
I've searched for this problem and tried different things such as editing the PHP.ini by adding 'bcmath.scale=2' however I still get the error message.
Any help would be appreciated, thanks.
Just install bcmath plugin for your php version with no need to (re)build php as mentioned on accepted answer
# get php version
php -v
# install bcmath based on your version lets assume php 7.1
# for ubuntu
sudo apt install php7.1-bcmath
# for centos
yum install bcmath
# restart apache
sudo systemctl restart apache2
Above problem appears when installing commerce or commerce kickstart using composer
Update 2020
Please refer to #GiorgosK's answer for installing bcmath via a package manager if you are using a distribution that provides a bcmath package for PHP. I will ask the OP in comments to update the recommended answer, since that solution is probably what most people need.
Three years ago when I answered this question, I suggested that you have to rebuild PHP to get bcmath. That was incorrect. I was using an older distribution of Debian/Ubuntu that provided bcmath as a statically linked extension in the core php package. I determined at the time (incorrectly) that bcmath was a core extension that had to be enabled at build-time (like SPL and PCRE).
For those trying to troubleshoot a missing bcmath extension (such as those building/installing PHP themselves or nevertheless encountering issues), I've corrected and updated my original answer below. It explains in detail how to troubleshoot a missing PHP extension.
Original Answer (Corrected)
The error message indicates that PHP wasn't built with bcmath support or can't find the installed extension. PHP extensions are either built into PHP directly or they are loaded from an external dynamic library file at runtime.
Since PHP obviously doesn't have the extension built-in, it can't find the external library file that provides bcmath. This file on POSIX platforms will be called bcmath.so and php_bcmath.dll on Windows.
Extension files are installed under a directory indicated by the extension_dir property in php.ini. To determine the value of this property, run the following command:
php -r 'echo ini_get("extension_dir").PHP_EOL;'
The default value for this property is configured when PHP is built and may vary from distribution-to-distribution.
Once you verify the extension file is installed in this location, you can then check to see if the extension is enabled in php.ini. You should see a line that enables the extension like so:
# POSIX platforms
extension=bcmath.so
# Windows
extension=php_bcmath.dll
For Linux distributions like Ubuntu/Debian that install extensions via the package manager, the format is somewhat different since Debian employs a distributed configuration. Typically the package manager installs everything correctly, but you can check to see if an ini file exists for bcmath under the corresponding conf.d directory. These small ini files are snippets imported into the larger php.ini file, and they are typically symlinked to /etc/phpX/mods-available, allowing modules to be initially enabled for all PHP SAPIs such as CLI, CGI, Apache Mod PHP, ETC. Make sure a symlink exists for the PHP SAPI you need to use.
To ensure your PHP is loading the extension, run phpinfo(); in a test page and search for bcmath. You can also more easily do this with the CLI using a command like:
$ php -i | grep -i bcmath
# Success output: BCMath support => enabled
# (Another command that works well for checking extensions)
$ php -m | grep -i bcmath
# Success output: bcmath
In order for the CLI to show accurate results, it must target the same php.ini file. If it doesn't, then use the -c option to temporarily point the CLI at the correct php.ini (i.e. the one being used by your Drupal site).
Add BC MATH extension for PHP 7.2
If you are getting this (https://prnt.sc/sehmd5) error then, run below command using vagrant ssh
Run these command in root of vagrant ssh
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php7.2-bcmath
service apache2 restart
Then open php.ini and search for bcmath
If bcmath scale is 0, Change it to 2
Restart php
Restart Apache
Hard Reload website
Install required modules
Similarly for any version of PHP, you only need to change PHP version in 3rd command.
I'm trying to use the curl libraries in c++ to download some files with Ubuntu, it has to run in a sever but I can't install the packages because I don't have the privileges on that machine. How can I use those libraries without installing them?
Thanks.
You can take curl library from your development machine, put it near your binary and use LD_LIBRARY_PATH environment variable to point out system to where get curl library
LD_LIBRARY_PATH=path/where/your/curl/library ./your-executable
You can build curl library by hands in form of static library and link with your application.