unable to install libpng12-0 on kali - libpng

I am using the latest version of Kali.
I installed the Cisco Packet Tracer version 7.2.
I ran it I got this error
./PacketTracer7: error while loading shared libraries: libpng12.so.0:
cannot open shared object file: No such file or directory
Now I am going to install libpng12
but I get this error
(Reading database ... 485972 files and directories currently
installed.) Preparing to unpack libpng12-0_1.2.50-2+deb8u3_amd64.deb
... Unpacking libpng12-0:amd64 (1.2.50-2+deb8u3) ... dpkg: error
processing archive libpng12-0_1.2.50-2+deb8u3_amd64.deb (--install):
unable to install new version of
'/usr/lib/x86_64-linux-gnu/libpng12.so.0': No such file or directory
Errors were encountered while processing:
libpng12-0_1.2.50-2+deb8u3_amd64.deb
I am using Debian sources list
https://packages.debian.org/jessie/amd64/libpng12-0/download

I have been through the same problem a solution I found was to :
1-Extract the content of the debian package
mkdir out; dpkg -x libpng12-0_1.2.50-2+deb8u3_amd64.deb ./out
2-Copy the file libpng12.so.0 to your Packet tracer's installation directory inside the .../pt/bin folder like this:
cp ./out/lib/x86_64-linux-gnu/libpng12.so.0 /opt/packettracer/bin/

i also had the same problem. I just installed it and strarted it up
packettracer
then it says
Starting Packet Tracer 7.2.1
but it doesnt start.
and when I tried to run it from the opt/pt directory ./PacketTracer it gives me
./PacketTracer7: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
So what i did was download the libpng12.o.0 from source
https://packages.debian.org/jessie/amd64/libpng12-0/download
choose your architecture and mirror.Next go to the directory where the download is located.
cd Downloads
extract the package using
dpkg -x libpng12-0_1.2.50-2+deb8u3_amd64.deb .
open the lib directory
cd lib/x86_64-linux-gnu/
list using
ls -alis
copy the libpng12.o.0 to where the packet tracer was saved if you installed it using default location using
cp libpng12.so.0 /opt/pt/bin/
type
cd
to move to home dir. Then type
packettracer
and you are good to go.
kali-linuxlibpng12libpngubuntu

after downloading the packettracer
open terminal ctrl+Alt+T
step1: packettracer
It gives error like this
./PacketTracer7: error while loading shared libraries: libpng12.so.0:
cannot open shared object file: No such file or directory
step2:so we want download libpng12.so.0
step3:choose which you want and download it
example:http.us.debian.org/debian
step4:go to the downloads folder right click on .deb file and run it as software installation
step5:open terminal ctrl+Alt+T type
packettracer
starting packettracer

Related

How do you compile OpenCV with cmake?

I'm trying to compile OpenCV so that it has the the sift module.
I downloaded CMake using this tutorial.
I also downloaded and unzipped opencv-4.3.0 and opencv_contrib.
I made an empty folder, opened the terminal, and navigated to it using the following line:
cd ~/opencvMaster/build
Then, while I was in this empty folder in the terminal, I ran the following line:
cmake -DOPENCV_ENABLE_NONFREE:BOOL=ON -DOPENCV_EXTRA_MODULES_PATH= ~/openCVMaster/opencv_contrib-master/modules ~/openCVMaster/opencv-4.3.0
It configured and generated the files. I then input make. Got the following error:
[ 82%] Building CXX object modules/xfeatures2d/CMakeFiles/opencv_xfeatures2d.dir/src/boostdesc.cpp.o
~/opencvMaster/opencv_contrib-e6f32c6a69043456a806a4e802ee3ce7b7059c93/modules/xfeatures2d/src/boostdesc.cpp:654:20: fatal error: boostdesc_bgm.i: No such file or directory
#include "boostdesc_bgm.i"
^~~~~~~~~~~~~~~~~
compilation terminated.
I followed the suggestion found here, and added the following files:
cd ~/openCVMaster/opencv_contrib-4.3.0/modules/xfeatures2d/src
curl wget https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_lbgm.i >boostdesc_lbgm.i
curl wget https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_256.i >boostdesc_binboost_256.i
curl wget https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_128.i >boostdesc_binboost_128.i
curl wget https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_binboost_064.i >boostdesc_binboost_064.i
curl wget https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_hd.i >boostdesc_bgm_hd.i
curl wget https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm_bi.i >boostdesc_bgm_bi.i
curl wget https://raw.githubusercontent.com/opencv/opencv_3rdparty/34e4206aef44d50e6bbcd0ab06354b52e7466d26/boostdesc_bgm.i >boostdesc_bgm.i
curl wget https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_120.i > vgg_generated_120.i
curl wget https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_64.i >vgg_generated_64.i
curl wget https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_48.i >vgg_generated_48.i
curl wget https://raw.githubusercontent.com/opencv/opencv_3rdparty/fccf7cd6a4b12079f73bbfb21745f9babcd4eb1d/vgg_generated_80.i >vgg_generated_80.i
This was a step forward: no more errors relating to vgg or boostdesc. A new error appeared: opencv_contrib-master/modules/xfeatures2d/test/test_features2d.cpp:51:10: fatal error: features2d/test/test_detectors_regression.impl.hpp: No such file or directory
Following the advice of ah-ma here) I downloaded https://github.com/opencv/opencv/tree/master/modules. Once downloaded, I located its subfolder 'features2d' and put it in opencv_contrib-master/modules/xfeatures2d/test/.
Still got an error -
~/openCVMaster/opencv_contrib-master/modules/xfeatures2d/test/features2d/misc/java/src/cpp/features2d_converters.cpp:2:10: fatal error: common.h: No such file or directory
#include "common.h"
I added the following:
cd ~/openCVMaster/opencv_contrib-master/modules/xfeatures2d/test/features2d/misc/java/src/cpp
curl wget https://raw.githubusercontent.com/ray-project/common/master/common.h > common.h
I ran make again, and got the following errors:
~/openCVMaster/opencv_contrib-master/modules/xfeatures2d/test/features2d/misc/java/src/cpp/features2d_converters.cpp: In function ‘void Mat_to_vector_KeyPoint(cv::Mat&, std::vector<cv::KeyPoint>&)’:
~/openCVMaster/opencv_contrib-master/modules/xfeatures2d/test/features2d/misc/java/src/cpp/features2d_converters.cpp:7:38: error: ‘LOGD’ was not declared in this scope
#define CHECK_MAT(cond) if(!(cond)){ LOGD("FAILED: " #cond); return; }
~/openCVMaster/opencv_contrib-master/modules/xfeatures2d/test/features2d/misc/java/src/cpp/features2d_converters.cpp:14:5: note: in expansion of macro ‘CHECK_MAT’
CHECK_MAT(mat.type()==CV_32FC(7) && mat.cols==1);
^~~~~~~~~
~/openCVMaster/opencv_contrib-master/modules/xfeatures2d/test/features2d/misc/java/src/cpp/features2d_converters.cpp: In function ‘void Mat_to_vector_DMatch(cv::Mat&, std::vector<cv::DMatch>&)’:
~/openCVMaster/opencv_contrib-master/modules/xfeatures2d/test/features2d/misc/java/src/cpp/features2d_converters.cpp:7:38: error: ‘LOGD’ was not declared in this scope
#define CHECK_MAT(cond) if(!(cond)){ LOGD("FAILED: " #cond); return; }
Any suggestions welcomed.
# Step 1: Install VS 2017 for cmake
# Step 2: Install CMake
Download and install CMake v3.10.0 from https://cmake.org/download/.
During installation select “Add CMake to system PATH”
# step 3: install Anaconda
# step 4: Download and extract opencv-3.3.1 and opencv_contrib-3.3.1
Go to https://github.com/opencv/opencv/releases and download opencv-3.3.1 source code zip
Go to https://github.com/opencv/opencv_contrib/releases and download opencv_contrib-3.3.1 source code zip
Extract both zip files. Although you can keep opencv and opencv_contrib folders anywhere, I suggest that you should keep both in the same directory. I have placed these two folders in “My Documents” directory.
NOTE : From hereon we will refer the path to opencv-3.3.1 folder as OPENCV_PATH. For example, in my case OPENCV_PATH is C:/Users/Vaibhaw Chandel/Documents/opencv-3.3.1
Depending upon where you have kept opencv-3.3.1 folder, this path would be different.
Step 5: Generate Visual Studio project using CMake
Run Cmake, in box “Where is the source code” write value of OPENCV_PATH (which is path to opencv-3.3.1 folder) and path to build directory. We will choose build directory as OPENCV_PATH/build
Now click configure.
You will be asked for permission to create the build folder. Click Yes
When prompted to select a compiler, select Visual Studio 14 2015 Win64.
Click finish and in the next window keep the default parameters checked.
Click finish. Now CMake will look in the system directories and generate the makefiles.
Step 5.1: Additional changes to CMake config
We will make few changes in the default configuration generated by CMake. Click on the images to see a larger version.
Check “INSTALL_C_EXAMPLES” and “INSTALL_PYTHON_EXAMPLES”
In flag “OPENCV_EXTRA_MODULES_PATH”, give path of modules directory within opencv_contrib-3.3.1. In our case we have kept opencv_contrib-3.3.1 in Documents folder so path is “C:/Users/Vaibhaw Chandel/Documents/opencv_contrib-3.3.1/modules”
Now click configure to apply these changes.
On Windows 10, opencv_saliency module fails to build. So we will disable it. Uncheck BUILD_opencv_saliency
Now click on configure again to include this change.
Step 5.2 : Add Python paths for both Python2 and Python3 (optional)
This section is only for people who want to generate OpenCV binary for both Python2 and Python 3. If you are going to use just one Python either 2 or 3, you should skip this section.
CMake was unable to find paths for my Python3 files.
So I manually added paths for Python3
Now click configure again. After configuring is done, search opencv_python in search bar, both BUILD_opencv_python2 and BUILD_opencv_python3 will be automatically checked. Now we are sure that OpenCV binaries for both Python2 and Python 3 will be generated after compilation.
Step 5.3 : Generate build files
If CMake is able to configure without any errors it should say “Configuring done”.
Click generate.
Note: Whenever you make any changes(check/uncheck boxes or change path) to configuration generated by CMake, always click configure and generate.
Step 6: Compile OpenCV
Step 6.1:Compile opencv in Release mode
Open Windows Command Prompt (cmd).
Go to OPENCV_PATH/build directory and run this command
1
cmake.exe --build . --config Release --target INSTALL
Step 6.2 : Compile opencv in Debug mode
Open CMake GUI again as mentioned in Step 5.
Search “python” in search box
Uncheck INSTALL_PYTHON_EXAMPLES, BUILD_opencv_python3 and BUILD_opencv_python2
Click configure
Click generate
Now in windows command prompt
Go to OPENCV_PATH/build directory and run this command
1
cmake.exe --build . --config Debug --target INSTALL
Now that we have compiled OpenCV we will find out how to test a OpenCV project using CMake.
Step 7: Update System Environment Variables
Step 7.1 : Update environment variable – PATH
Step 7.2 : Update user environment variable – OPENCV_DIR
Download opencv-4.3.0.zip and opencv_contrib-4.3.0.zip. Unzip them.
Open opencv_contrib-4.3.0\modules. Copy the folder that says xfeatures2d. Open opencv-4.3.0\modules, and paste the folder just copied (xfeatures2d)
Make an empty folder, and call it 'Build45.'
Open cmake-gui.
In the box that says, 'Where to build the binaries' put the file path representing your empty folder (Build45)
In the box that says, 'Where is the source code' put the file path representing opencv-4.3.0.
Click configure. Choices will appear.
Input 'free' into the search box and check the box that says OPENCV_ENABLE_NONFREE.
Input xfeatures2d and check the box that says 'Build_opencv_xfeatures2d`
Click configure again. (Doublecheck you've done this right: there is a second box in cmake gui that gives build details. You should see Non-free algorithms: YES.
Click Generate.
Check that the build45 folder is now filled with stuff.
Open your terminal and navigate to the build45 folder (cd ~/opencv-master/build45)
Type cmake .
Type make
NOTE:* It will take a couple hours to compile. Make yourself a cup of tea*.
Type sudo make install
Check that it worked: in your terminal, type python3
Type import cv2
Type sift = cv2.xfeatures2d.SIFT_create()
You should get no errors. If you do get errors, the following troubleshooting tools may be helpful:
import cv2
print cv2.getBuildInformation()
import cv2
funcs = dir(cv2)
for f in funcs:
... print(f)
Also, if you are worried about infringing patents, check here for discussion: https://www.reddit.com/r/computervision/comments/ba1l8g/according_to_this_the_patent_on_sift_was_due_to/

Can't build and run react-native project on Mac

Referring this issue, I've the same problem. I've MacOs El Captain on VMware.
Node v. 7.8.0
npm v.4.6.1
react-native-cli 2.0.1
react-native 0.46.4
Xcode v. 8.2.1
I've two issues:
- when trying to init a new react-native project, the packages fetching hangs on getting react-native 0.46.4 package from repo. Other packages were downloaded successfully. So I've execute npm install from Windows and then copied the node_modules folder on Mac.
- when trying to run the project on iOS simulator I recieve the following error:
** BUILD FAILED **
...
In file included from /Users/michelebombardi/Desktop/ReactNativeProjects/caliup/node_modules/react-native/React/../third-party/folly-2016.09.26.00/folly/Bits.h:70:
/Users/michelebombardi/Desktop/ReactNativeProjects/caliup/node_modules/react-native/React/../third-party/folly-2016.09.26.00/folly/detail/BitIteratorDetail.h:21:10: fatal error: 'boost/iterator/iterator_adaptor.hpp' file not found
#include <boost/iterator/iterator_adaptor.hpp>
The following build commands failed:
CompileC /Users/michelebombardi/Desktop/ReactNativeProjects/caliup/ios/build/Build/Intermediates/React.build/Debug-iphonesimulator/third-party.build/Objects-normal/x86_64/Conv.o /Users/michelebombardi/Desktop/ReactNativeProjects/caliup/node_modules/react-native/third-party/folly-2016.09.26.00/folly/Conv.cpp normal x86_64 c++ com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/CaliUp.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/CaliUp.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist`
I really need to publish my app on the app store before the end of the week.
I've already try all suggested solutions but nothin works.
Could anyone help me?
First try this:
watchman watch-del-all && rm -rf node_modules
If you install node using Homebrew uninstall it and install node from here.(https://nodejs.org/en/)
Now if you used yarn to install node modules:
Try npm install
This error is caused by a failed third party library download in the build step. In your home folder there should be a ~/.rncache directory with a number of compressed C++ libraries. The error occurs when one or more of these files fails to download completely from the github amazon s3 servers. (likely in China)
The problem sticks around because the script in the react-native xcode build doesn't know how to resume the broken download. So you can fix this by deleting your ~/.rncache folder and because these folders are extracted into your modules you should also rm -rf node_modules and reinstall.
More info can be found here and here
May be this will work. Try these steps:
Backup your icons, images etc from ios folder.
Check that app name is set for key "name" in {project-root}\app.json file.
Delete ios/ and android/ directories
Run react-native eject
Replace the icons,images etc you copied earlier
Run react-native link
Launch you app from Xcode using short cut key command+r

How to Configure Dart plugin in eclipse and Dartium in Fedora 18 x86_64

Am getting errors when installing dart plugin in eclipse 4.2 the error is
An error of will appear as it happened to me => /usr/lib64/eclipse/dart-sdk.zip (Permission denied)
and dartium for linux is giving me an error of
./chrome: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory
and an another error
./chrome: error while loading shared libraries: libudev.so.0: cannot open shared object file: No such file or directory
This is to help anyone who comes into these errors while configuring Dart and Dartium when using the fedora 18 os
When installing the dart plugin in eclipse {I am using Eclipse from the fedora official repository which is Juno 4.2.1 && any 4.2 and above will work with this procedure }
add the following URL [ http://www.dartlang.org/eclipse/update ] to the list of available software sites in your Eclipse installation (Window > Preferences > Install/Update > Available Software Sites):
After the downloading and installation procesess finish you will be asked to restart eclipse .
An error of will appear as it happened to me => /usr/lib64/eclipse/dart-sdk.zip (Permission denied)
-Panic not but if you try to change permission on the /usr/lib64/eclipse/ may be to chmod -R 777 eclipse will fail to start
if you do so change back to chmod -R 755 .it will start normally .
-The solution i used was to comment this line -preventMasterEclipseLaunch
on top of eclipse.ini.
-Install the dart plugin and you are off to dart web apps creation.
-If you also need the dartium working errors of :
./chrome: error while loading shared libraries: libbz2.so.1.0: cannot open shared object file: No such file or directory
it might complain of ./chrome: error while loading shared libraries: libudev.so.0: cannot open shared object file: No such file or directory
2 ./chrome: error while loading shared libraries: libudev.so.0: cannot open shared object file: No such file or directory
it might complain of ./chrome: error while loading shared libraries: libudev.so.0: cannot open shared object file: No such file or directory.
Two solutions i have for this are :
1.Locate the location of the two libraries in your system and do symlinks to either /usr/lib/ or to usr/lib64
as below :
you can use the locate command or find command
locate libbz2.so.1.0
if found do ln -s {/path/to/libbz2.so.1.0} {/path/to/dartium/libbz2.so.1.0}
later do
locate libudev.so.0
if found do ln -s {/path/to/libudev.so.0} {/path/to/dartium/libudev.so.0}
if you have google chrome already in your system you can copy the
two libraries from the installation directory of your chrome
what i did was
cp -rfv /opt/google/chrome/libbz2.so.1.0 /usr/lib64/
cp -rfv /opt/google/chrome/libudev.so.0 /usr/lib64/
3.Start chromium with
cd {/path/to/dartium/}
them do chmod +x chrome
start it by on your terminal or konsole type ./chrome

Could not open library 'libcurl': libcurl: cannot open shared object file: No such file or directory

I am trying to execute rake db:create command. I get following error
Could not open library 'libcurl': libcurl: cannot open shared object file: No such file or directory.
Could not open library 'libcurl': libcurl: cannot open shared object file: No such file or directory.
Could not open library 'libcurl.so': libcurl.so: cannot open shared object file: No such file or directory
Can anyone help me with this issue?
Try to install curl.
If it doesn't work, try the command ldconfig (actualising libs)
If it doesn't work :
go to /usr/lib
run find . | grep curl, locate the .so file (eg like curl_path.so or latest libcurl.so.xx)
run ln -s {curl_path.so} /usr/lib/libcurl.so
run ldconfig
Actually - what fixed the problem was installing typhoeus:
gem install typhoeus
Or whatever package is actually needed for libcurl.

OpenCV installation help?

I am on Mac OS X Snow Leopard, and I am trying to get OpenCV to work with CodeBlocks. I downloaded the source files for OpenCV 2.3, and then downloaded the latest version of Cmake. The direct source file contains a folder "include" which has two folders in it labeled OpenCV and OpenCV 2. However after I use Cmake on the source files, the two "OpenCV" and OpenCV 2" folders are gone. Anyone know why this is happening and how to fix it? Instead of the folders all I have now is a CmakeFiles Folder, MakeFile and cmake_install.cmake
Thank You
After you download the source files, go into the opencv folder that's inside the folder you created and execute these commands:
sudo cmake -G "Unix Makefiles" .
sudo make -j8
sudo make install
Don't try to do this from the include folder. That's one level too deep. You want to do it from the folder that contains the include folder.
Terminal is in Applications/Utilities. That's how you get to the Unix command line. To get into your opencv folder, run Terminal and type "cd ". (That's cd followed by a space.) Then drag your opencv folder from a Finder window onto the Terminal window. This will append the folder name to the command line. Then press Return and you'll be in that folder. Then you can enter the commands above.
If you want to use ccmake instead of cmake, just replace "cmake" with "ccmake" in the first command.

Resources