tar -zcvf target.tgz source/
tar -jcvf target.tar.bz2 source/
tar打包,gzip压缩,bzip2压缩
man tar,man gzip,man bzip 具有例子及解释,关于linux命令的使用情况,我最近在看一本书籍,不过是电子版的《linux就该这么学》,明年3月份即将出版,你到时可以购买一本好好看看,关于命令的参数讲解得非常的详细。
wget https://kojipkgs.fedoraproject.org//vol/fedora_koji_archive00/packages/snappy/1.1.0/1.fc19/src/snappy-1.1.0-1.fc19.src.rpmrpm -ivh snappy-1.1.0-2.fc20.src.rpm
yum install -y cmake gcc gcc-c++ python2-devel
wget https://kojipkgs.fedoraproject.org//packages/gtest/1.8.1/1.fc30/src/gtest-1.8.1-1.fc30.src.rpm
rpm -ivh gtest
rpmbuild -ba /root/rpmbuild/SPECS/gtest.spec
报错:
【CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool】
yum install -y make
报错:
【CMake Error at /usr/share/cmake/Modules/WriteBasicConfigVersionFile.cmake:39 (message):
No VERSION specified for WRITE_BASIC_CONFIG_VERSION_FILE()】
解决好久都不行
编译安装 gtest:
解压
cd googletest-release-1.8.1
mkdir build &&cd build
cmake .. &&make
将生成的libgtest.a和libgtest_main.a, 复制到/usr/local/lib/下去
cp ./googlemock/gtest/libgtest_main.a /usr/local/lib/
cp ./googlemock/gtest/libgtest.a /usr/local/lib/
将include中的gtest文件夹复制到/usr/local/include
cp -r ./googletest/include/gtest /usr/local/include/
wget http://rpmfind.net/linux/fedora/linux/releases/28/Everything/aarch64/os/Packages/g/gtest-devel-1.8.0-3.fc28.aarch64.rpm
rpm -ivh gtest-devel-1.8.0-3.fc28.aarch64.rpm --force --nodeps
rpmbuild -ba /root/rpmbuild/SPECS/snappy.spec
执行成功:
cd /root/rpmbuild/RPMS
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)