Get rid of sudo [1/n]
This commit is contained in:
parent
ef6e712a88
commit
2725506a4d
|
@ -39,13 +39,13 @@ if [ -z "$1" ]
|
||||||
then
|
then
|
||||||
echo "Installing OpenCV from source"
|
echo "Installing OpenCV from source"
|
||||||
if [[ -x "$(command -v apt)" ]]; then
|
if [[ -x "$(command -v apt)" ]]; then
|
||||||
sudo apt update && sudo apt install build-essential git
|
apt update && apt install build-essential git
|
||||||
sudo apt install cmake ffmpeg libavformat-dev libdc1394-22-dev libgtk2.0-dev \
|
apt install cmake ffmpeg libavformat-dev libdc1394-22-dev libgtk2.0-dev \
|
||||||
libjpeg-dev libpng-dev libswscale-dev libtbb2 libtbb-dev \
|
libjpeg-dev libpng-dev libswscale-dev libtbb2 libtbb-dev \
|
||||||
libtiff-dev
|
libtiff-dev
|
||||||
elif [[ -x "$(command -v dnf)" ]]; then
|
elif [[ -x "$(command -v dnf)" ]]; then
|
||||||
sudo dnf update && sudo dnf install cmake gcc gcc-c git
|
dnf update && dnf install cmake gcc gcc-c git
|
||||||
sudo dnf install ffmpeg-devel libdc1394-devel gtk2-devel \
|
dnf install ffmpeg-devel libdc1394-devel gtk2-devel \
|
||||||
libjpeg-turbo-devel libpng-devel tbb-devel \
|
libjpeg-turbo-devel libpng-devel tbb-devel \
|
||||||
libtiff-devel
|
libtiff-devel
|
||||||
fi
|
fi
|
||||||
|
@ -75,14 +75,14 @@ if [ -z "$1" ]
|
||||||
-DCV_ENABLE_INTRINSICS=ON -DWITH_EIGEN=ON -DWITH_PTHREADS=ON -DWITH_PTHREADS_PF=ON \
|
-DCV_ENABLE_INTRINSICS=ON -DWITH_EIGEN=ON -DWITH_PTHREADS=ON -DWITH_PTHREADS_PF=ON \
|
||||||
-DWITH_JPEG=ON -DWITH_PNG=ON -DWITH_TIFF=ON
|
-DWITH_JPEG=ON -DWITH_PNG=ON -DWITH_TIFF=ON
|
||||||
make -j 16
|
make -j 16
|
||||||
sudo make install
|
make install
|
||||||
rm -rf /tmp/build_opencv
|
rm -rf /tmp/build_opencv
|
||||||
echo "OpenCV has been built. You can find the header files and libraries in /usr/local/include/opencv2/ and /usr/local/lib"
|
echo "OpenCV has been built. You can find the header files and libraries in /usr/local/include/opencv2/ and /usr/local/lib"
|
||||||
|
|
||||||
# https://github.com/cggos/dip_cvqt/issues/1#issuecomment-284103343
|
# https://github.com/cggos/dip_cvqt/issues/1#issuecomment-284103343
|
||||||
sudo touch /etc/ld.so.conf.d/mp_opencv.conf
|
touch /etc/ld.so.conf.d/mp_opencv.conf
|
||||||
sudo bash -c "echo /usr/local/lib >> /etc/ld.so.conf.d/mp_opencv.conf"
|
bash -c "echo /usr/local/lib >> /etc/ld.so.conf.d/mp_opencv.conf"
|
||||||
sudo ldconfig -v
|
ldconfig -v
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Modify the build file.
|
# Modify the build file.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user